1

Here i'm adding a movie clip on the stage.

var mc:MovieClip = new movieClip();
addChild(mc);

And here i'm fetching gif from the server and set it into a movie clip

var request:URLRequest = new URLRequest("file Path");
var player:GIFPlayer = new GIFPlayer();
player.load(request);
mc.addChild(player);

Now the problem is that i want to resize the gif width and height, but i'm not able to do it.

how to resize width and height of gif in as3?

Maher
  • 2,517
  • 1
  • 19
  • 32
Abhi.S
  • 11
  • 1
  • 1
    You need to wait for the image to load, otherwise its dimensions are 0 and 0 and you cannot affect them. However, you can use **scaleX** and **scaleY** properties. – Organis Jun 14 '17 at 08:22
  • Is it okay to just set `mc.width = n` and `mc.height = n` (where _n = pixel size_ amount)? – VC.One Jun 14 '17 at 15:44

1 Answers1

1

In the Adobe Flash CC you need to create a movieClip and then inside the movieClip you need to addChild the gif then come out to the movieClip then use the Free Transform Tool adjust the movieClip then automatically gif is also resized Check it will Work.. Please Check my attached file I have integrated as your query.

https://drive.google.com/open?id=0B6f5z55WOf3peWlSYm8tX1hlUlk

Hemanth Raj
  • 187
  • 10