Jump to content


Updating VideoLoader url

Recommended Posts

Here's an easy one:


How do I update the url that a conditional statement determines?


What I have so far does not work:


var video:VideoLoader = new VideoLoader('', {name:"weatherVideo", container:mc_video, width:756, height:672, scaleMode:"proportionalInside", bgColor:0x000000, autoPlay:false, volume:0, estimatedBytes:75000});

if( condition == "Cloudy.png" ){
getVideos( 'video' );

function getVideos( url:String ):void {
video.getLoader( 'weatherVideo' ).url = url;

Link to comment
Share on other sites

video.getLoader( 'weatherVideo' ) 


is incorrect. since you know that video is the var that references your VideoLoader you can just use


video.url = url


getLoader() is a LoaderMax method. You could also do


LoaderMax.getLoader( ' weatherVideo' ).url = url


but I would stick with the first suggestion.


pls let me know if that works.



Link to comment
Share on other sites

Works perfectly.


Thanks again, Carl.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.