Hey everyone, i know this is a very common problem and i have looked over all the posts for the same type of area and still there is one problem that’s been annoying me. Heres the Scenario, basically i’ve made a flash advert within flash cs5 and am using AS3 and there is 4 scenes in total with different types of adverts on with navigation buttons on each scene with their instance own instance names of course etc.
I want to link each button to a different scene, but unfortunately everything I try seems to backfire with that annoying 1009 error (Advertv1_fla::MainTimeline/frame60()[Advertv1_fla.MainTimeline::frame60:3].
Now after reading countless times about this error being caused due to referencing something that hasn’t loaded up yet i checked and made sure that the actionscript is wrote up on the last frame of scene 1:
stop();
design_btn.addEventListener(MouseEvent.CLICK, nxtScene);
function nxtScene(event:MouseEvent):void{
gotoAndPlay(“design”);
}
Design being the label name of a frame on Scene 2 (one of the first frames)
What i think the problem is that the 1009 error happens because the frame that i am referencing is on another scene which hasn’t loaded up yet (due scene 1 being visible). The 1009 error message appears within the Output window and not the Compiler error, when the movie runs the animations etc of Scene 1 the stop command comes into play of course and from there the button that i’m assigning the AS3 to called design_btn doesn’t do anything.
Now like i said its been bugging me for awhile after looking frantically for a solution around different forum posts, so I’ve decided to post the problem myself that i’m having just to see if anyone has any ideas on solving the problem. Thanks for your time.
Note: The reason why i used scenes was because I was specifically tasked to create an advert that uses scenes, normally i would avoid them and just use one timeline with different frames for sections etc. Also if there is a solution, then i need to know asap, hopefully before saturday if its not too much trouble.