1
votes

Im trying to load an image to my swf by actionscript. I tried code like below:

var myLoader:Loader = new Loader();


    myLoader.x = 250;
    myLoader.y = 0;



    myLoader.load(new URLRequest("z.jpg"));


    addChild(myLoader);

It works well but i need set the all images i load in same size. As many sites i searched i found something code below:

myLoader.height=40;
myLoader.width=40;

But when i add this code my image dissapears. what is the problem and how can i fix it? thanks for help

1

1 Answers

0
votes

I believe that this question was already answered here. Read his/her question and then the first answer.