Jump to content

Codepen Notification

You didn't provide a codepen sample that illustrates the problem. It really helps us quickly identify problems. This isn't mandatory, but it will get you better/faster results. Would you like to add one?

ImageLoader | Declare var later?

Started by Bams, Feb 03 2017 08:57 AM

1 reply to this topic
Bams

Post #1 by Bams , 03 February 2017 - 08:57 AM

Hi,

 

Sorry if my topic is stupid but is there a way to do something like this :

 

var asset:ImageLoader = new ImageLoader ( assetUrl, { name:assetName } );

 

if ( myVar == true )

{

asset.scaleMode= "proportionalInside";

}

 

else

{

asset.scaleMode= "proportionalOutside";

}

 

asset.load();


  • Back to top

Carl
  • Carl
  • 5,383 Likes (Superhero)
  • 7,746 posts

Post #2 by Carl , 04 February 2017 - 03:25 AM

Please try

asset.vars.scaleMode="proportionalOutside"
  • Back to top




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

3rd Party Advertisement