FORUMS: list search recent posts

buttons work, then stop working...

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mike Throck
buttons work, then stop working...
on Aug 2, 2010 at 1:51:01 am

My site has a thumbnail gallery that loads larger images that then jump to sections containing flash video.

Everything works great when I test my movie and all buttons work. But after clicking on one certain button (my "about" button in the header), all of a sudden the large image buttons stop working.

I'm so confused.


Return to posts index

demetri tashie
Re: buttons work, then stop working...
on Aug 2, 2010 at 1:54:08 am

not enough info to offer an answer. if you post a file, we could see what's going on


Return to posts index

Mike Throck
Re: buttons work, then stop working...
on Aug 2, 2010 at 2:05:42 am

Here's my code, it definitely has something to do with the about button. The only thing that gets it working again is clicking the home button after, sending everything back to the first frame.

stop();


//Animate a fade using the Tween class.
import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.media.SoundMixer;
var myAplhaTween:Tween = new Tween(home_mc, "alpha", Regular.easeOut, 0, 1, 1, true);


//handle events for video buttons...

fuelapp.addEventListener(MouseEvent.CLICK, clickSectionVideo);
jfabtn.addEventListener(MouseEvent.CLICK, clickSectionVideo);
motionreel.addEventListener(MouseEvent.CLICK, clickSectionVideo);
nixonbtn.addEventListener(MouseEvent.CLICK, clickSectionVideo);
webbtn.addEventListener(MouseEvent.CLICK, clickSectionVideo);


function clickSectionVideo(evtobj:MouseEvent) {
//trace shows what's happening.. in the output window
trace ("The "+evtobj.target.name+" button was clicked!")
//go to the section clicked on...
gotoAndStop(evtobj.target.name);
}

//handle events for gallery buttons...
reel.addEventListener(MouseEvent.CLICK, clickSection);
home.addEventListener(MouseEvent.CLICK, clickSection);
jfa.addEventListener(MouseEvent.CLICK, clickSection);
nixon.addEventListener(MouseEvent.CLICK, clickSection);
web.addEventListener(MouseEvent.CLICK, clickSection);
about.addEventListener(MouseEvent.CLICK, clickSection);

function clickSection(evtobj:MouseEvent) {
//trace shows what's happening.. in the output window
trace ("The "+evtobj.target.name+" button was clicked!")
SoundMixer.stopAll();
//go to the section clicked on...
gotoAndPlay(evtobj.target.name);
}

//handle events for return button...

returnbtn.addEventListener(MouseEvent.CLICK, clickReturn);


function clickReturn(evtobj:MouseEvent) {
//trace shows what's happening.. in the output window
trace ("The return button was clicked")
SoundMixer.stopAll();
//go to the section clicked on...
gotoAndStop(1);
}

//handle events for reel top bar button...

reel2.addEventListener(MouseEvent.CLICK, clickReel);

function clickReel(evtobj:MouseEvent) {
//trace shows what's happening.. in the output window
trace ("The reel2 button was clicked")
SoundMixer.stopAll();
//go to the section clicked on...
gotoAndStop(10);
}


Return to posts index


Mike Throck
Re: buttons work, then stop working...
on Aug 2, 2010 at 3:29:16 am

Here's the actual file

951_websitetryout2.fla.zip


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]