kapricious
03-28-2012, 09:24 PM
This is my first day with actionscript and I am really stumped here. Basically I have 4 slides which contain objects in motion that come to rest, they fade out, next slide objects come in, etc. All was fine and playing perfectly until I tried to add navigation dots (so a user could select a specific slide).
All I've done was add actionscript to frame 1 which contains the default code snipet for "Go To a Frame and Play", which is:
nav1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame);
function fl_ClickToGoToAndPlayFromFrame(event:MouseEvent):v oid
{
gotoAndPlay(1);
}
(4 times over, with the correct button names and frames for each)
When I publish the SWF, the animation no longer begins unless I click one of the buttons, and then it plays the entire thing. I even tried (foolishly, I'm sure) adding play() to the very top of my actionscript.
I'm STUMPED! What am I missing here??? Nothing in the above code seems like it should halt the playing of the animation which, prior to trying to add this nav, played just fine.
Really hope someone can explain what little thing I am missing... google has failed me for the last hour+ :( Thank you in advance!!
P.S. I also tried moving my actionscript in the timeline to frame 20 and, low and behold, the animation begins to play until it reaches frame 20. It has to be something in my code????
All I've done was add actionscript to frame 1 which contains the default code snipet for "Go To a Frame and Play", which is:
nav1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame);
function fl_ClickToGoToAndPlayFromFrame(event:MouseEvent):v oid
{
gotoAndPlay(1);
}
(4 times over, with the correct button names and frames for each)
When I publish the SWF, the animation no longer begins unless I click one of the buttons, and then it plays the entire thing. I even tried (foolishly, I'm sure) adding play() to the very top of my actionscript.
I'm STUMPED! What am I missing here??? Nothing in the above code seems like it should halt the playing of the animation which, prior to trying to add this nav, played just fine.
Really hope someone can explain what little thing I am missing... google has failed me for the last hour+ :( Thank you in advance!!
P.S. I also tried moving my actionscript in the timeline to frame 20 and, low and behold, the animation begins to play until it reaches frame 20. It has to be something in my code????