Hi forum
I’m doing a small project for a client. I have been given an ‘AS2’ FLA containing this code:
stop();
addEventListener(Event.ENTER_FRAME, loading);
function loading(event:Event)
{
var bytestotal = stage.loaderInfo.bytesTotal;
var bytesloaded = stage.loaderInfo.bytesLoaded;
var sclbar = Math.round(bytesloaded*100/bytestotal);
loader_mc.LoadingText.text = sclbar + "%";
loader_mc.gotoAndPlay(sclbar);
if (bytesloaded >= bytestotal)
{
gotoAndPlay(2);
removeEventListener(Event.ENTER_FRAME, loading);
}
}
Can anyone confirm if this is AS2 or AS3 please?
I ask because it won’t compile, stating:
"Scene=preloader, layer=Layer 1, frame=1, Line 4 The class or interface 'Event' could not be loaded."
Thanks