FORUMS: list search recent posts

Button disconnect CS4

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
David Maltese
Button disconnect CS4
on Feb 27, 2011 at 4:07:36 am

Having a strange problem with a really simple Flash/AS3 function.
I have 4 menu buttons, but button4 will not work unless button1 is punched first. So basically, I can punch button1 and go to page 1, button2 goes to page 2, etc. But button4 will only go to page 4 if I return to page 1 first. Accordingly, I cannot go from page 2 or 3 to page 4 without going to page 1 first.

Does anyone know why this is?
Thank you!


Return to posts index

demetri tashie
Re: Button disconnect CS4
on Feb 27, 2011 at 2:49:14 pm

please post some code so we can see where the problem lies


Return to posts index

David Maltese
Re: Button disconnect CS4
on Feb 27, 2011 at 6:32:08 pm

Here is the code. As I said, VERY simple...I cannot see why there would be any problem with this. If anyone has a fix, I'd really appreciate the help.

stop();

function button1_clicked(e:MouseEvent):void{
gotoAndStop("page1");}

function button2_clicked(e:MouseEvent):void{
gotoAndStop("page2");}

function button3_clicked(e:MouseEvent):void{
gotoAndStop("page3");}

function button4_clicked(e:MouseEvent):void{
gotoAndStop("page4");}

button1.addEventListener(MouseEvent.CLICK, button1_clicked);
button2.addEventListener(MouseEvent.CLICK, button2_clicked);
button3.addEventListener(MouseEvent.CLICK, button3_clicked);
button4.addEventListener(MouseEvent.CLICK, button4_clicked);



Return to posts index


demetri tashie
Re: Button disconnect CS4
on Feb 27, 2011 at 6:42:57 pm

where is your code placed? is it all, and ONLY on the first frame, 'carried over' all the frames, or is it on individual frames?


Return to posts index

David Maltese
Re: Button disconnect CS4
on Feb 27, 2011 at 8:28:39 pm

Hi Demetri,

It is on the first frame, carried over.


Return to posts index

demetri tashie
Re: Button disconnect CS4
on Feb 27, 2011 at 8:38:17 pm

if that is really the case, then it should be working. it does feel like the code for btn4 is only on or available to, frame label 'page1' . check to make sure there is no other key frame created on the actions layer after the first frame. besides the first frame which holds the code, the layer needs to be empty of any other keyframe at least up until frame label 'page4'

if there is still an issue, post your file, i am sure it will be something simple interfereing with it functioning correctly.


Return to posts index


David Maltese
Re: Button disconnect CS4
on Feb 28, 2011 at 9:04:51 pm

Hi Demetri,
File is attached...Thanks for your help! I really do appreciate it.

1687_dmsite2.fla.zip


Return to posts index


demetri tashie
Re: Button disconnect CS4
on Feb 28, 2011 at 9:48:07 pm

ok, this is what's wrong. a few things to fix.

first thing is, the actions were NOT acarried over all of those frames. they stop on frame 1 and thus once you are on any other fame, the code is not accessible. carry the frames over the whole timeline ( create an empty frame on th elast frame.

second is - why do you have those buttons on every frame? clear all the keyfames except the first one, so the buttons reside on the first frame, but are seen and accessible throughout the timeline.

then, ungroup those buttons. not necessary, but i'd prefer that they NOT be grouped if they are all separate clickable movieclips.

that will make it work. see the image below - the first shows the timeline as you had it, the second one below it is as it should appear.

hope that helps.


Return to posts index

David Maltese
Re: Button disconnect CS4
on Feb 28, 2011 at 10:45:16 pm

Thank you Demetri! I was sure I had missed doing something, and you were right, it was something ridiculously simple.

Thanks for the tip on the menu buttons! I'll change it to your recommendation.

Also, I hadn't planned on keeping the buttons grouped...I did that temporarily so that I could move the menu around the page easier, as a whole. But thank you for pointing that out, I might have forgotten to ungroup them.

Thank you again!


Return to posts index

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