Copy link to clipboard
Copied
Hey Everyone,
So I haven't used actionscript 3 in a very long time and am still trying to get my head around the basics. I only studied it for a short period of time before hand aswell so I'm still
quite new.
Anyway, I have 5 buttons, all with movie clips in the up, over and down states. When I watch the .swf the navigation works fine when I click them and the animation plays when I hover over but the buttons flash on and off for some strange reason. I checked all my stop actions they are correct. Please help, this is for an assignment and I'm running out of time!
My code:
stop();
import flash.events.MouseEvent;
////// Rationale Button
rationale_btn.addEventListener(MouseEvent.CLICK, clickRationale);
function clickRationale(event:MouseEvent):void
{
gotoAndPlay("rationale");
}
////// Dimensions Button
dimensions_btn.addEventListener(MouseEvent.CLICK, clickDimensions);
function clickDimensions(event:MouseEvent):void
{
gotoAndPlay("dimensions");
}
/////// Assessment Button
assessment_btn.addEventListener(MouseEvent.CLICK, clickAssessment);
function clickAssessment(event:MouseEvent):void
{
gotoAndPlay("assessment");
}
//// Course Outline Button
courseoutline_btn.addEventListener(MouseEvent.CLICK, clickCourse);
function clickCourse(event:MouseEvent):void
{
gotoAndPlay("course outline");
}
/////// Student Work Button
studentwork_btn.addEventListener(MouseEvent.CLICK, clickStudent);
function clickStudent(event:MouseEvent):void
{
gotoAndPlay("student work");
}
Copy link to clipboard
Copied
you need a stop() on frame 1 of each of your movieclip buttons. and you need to add mouseover,mouseout and possibly mousedown and mouseup code to each button.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now