Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

My buttons flash on and off when I watch the .swf file

New Here ,
Aug 14, 2014 Aug 14, 2014

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");

}

TOPICS
ActionScript
157
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 14, 2014 Aug 14, 2014
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines