Hi!
I am doing this for test purposes and it is scaling up the image.I just want to animate the square and after it finishes scaling up I want to load an image inside this square. But it is scaling up the image as well.
here is my code:
package
{
import flash.display.Loader;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.net.URLRequest;
import gs.TweenMax;
public class mySite extends MovieClip
{
var boxBack : Sprite = new Sprite();
var palce : MovieClip = new MovieClip();
var imgLoader : Loader = new Loader();
public function mySite()
{
init();
}
private function init():void
{
createBoxBack();
}
private function createBoxBack():void
{
boxBack.graphics.lineStyle(1, 0, 100);
boxBack.graphics.drawRect(5,0, 50,50);
addChild(boxBack);
TweenMax.to(boxBack, 1, { scaleX:10, scaleY:10 } );
imgLoader.load(new URLRequest("imagem.jpg"));
imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleto);
}
private function onCompleto(e:Event):void
{
palce.addChild(imgLoader);
boxBack.addChild(palce);
}
}
}