Fullwidth slider using background image Flexslider WordPress

From WordPress 4.4 onwards, you can use the_post_thumbnail_url() inside The Loop to easily get the featured image source:

<div style="background-image: url(<?php the_post_thumbnail_url(); ?>);">
    //Your html code
</div>

If you need compatibility with releases prior to the 4.4, wp_get_attachment_image_src() will do the work. Contrary to what its name suggests, it won’t return the image location directly, but an array with the location, the width, the height and its resize value. You need to access the first elements of the returned array:

<?php

    $post_thumbnail_id = get_post_thumbnail_id();
    $featured_image = wp_get_attachment_image_src( $post_thumbnail_id, 'full' ); //The second argument is the size

?>
<div style="background-image: url(<?php echo $featured_image[0]; ?>);">
    //Your html code
</div>

Apart from that, you should avoid using query_posts() unless you are sure what you are doing. You can read more on the topic here. As an alternative use get_posts() followed by setup_postdata() to work normally as if you where within The loop or build your query with a WP_Query object.