Share Posted May 31, 2012 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; video.load(); video.playVideo(); } Link to comment Share on other sites More sharing options...
Share Posted June 1, 2012 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. thx Link to comment Share on other sites More sharing options...
Author Share Posted June 5, 2012 Works perfectly. Thanks again, Carl. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now