-
new issue.. how to stop at end of specific frame & return to home page?
I've been troubleshooting a school project all day, and I think I'm finally near the end.
My new issue is when I play through my project, the only "Home" button that works is on the "Theory" page, which is where the actionscript happens to be located(frame 76).. In other words, if I click on the "Theory" button, I'm able to return to my home page. However if I click on any other button, it plays straight through the remaining frames and loops back to the beginning.
I've attached my code to give you a better idea of what's going on..
Frame 75(nav buttons)-
Code:
stop();
import flash.events.*;
import flash.display.*;
theory_btn.addEventListener(MouseEvent.CLICK,playtheory);
function playtheory(event:MouseEvent):void{
gotoAndPlay("theory");
}
history_btn.addEventListener(MouseEvent.CLICK,playhistory);
function playhistory(event:MouseEvent):void{
gotoAndPlay("history");
}
future_btn.addEventListener(MouseEvent.CLICK,playfuture);
function playfuture(event:MouseEvent):void{
gotoAndPlay("future");
}
credits_btn.addEventListener(MouseEvent.CLICK,playcredits);
function playcredits(event:MouseEvent):void{
gotoAndPlay("credits");
}
Frame 76(home button)-
Code:
stop();
home_btn.addEventListener(MouseEvent.CLICK,playhome);
function playhome(event:MouseEvent):void{
gotoAndPlay("home");
}
-
Flash/Flex Developer
Code that must exist through the project, should be place on it own layer so when new keyframes are introduced, it doesn't clear out the commonly used code. That is what is going on in your case, I've run into the same problems in my day.
Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|