Hi!
I am trying to build my first web site using pure(or almost pure) .AS file.
Inside my main fla file I have a MC with an animation that is an introduction.
I am doing this at my as file:
var animacao : intro = new intro();
and I have a function to load up the animation when a user first enter the site with this code
private function loadAnimation():void
{
animacao.x = 190;
animacao.y = 450;
addChild(animacao);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function onEnterFrame(e:Event):void
{
if (animacao.fim)
{
animacao.fim = false;
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
removeChild(animacao);
loadBackground();
}
}
this onEnterFrame event is to know when my animatin reachs the end.
Everything is working correctly except that I need to put a preloader before a load this animation but how do I do this since I am using it from my fla file?
thank you