Groups | Blog | Home
all groups > flash (macromedia) > january 2007 >

flash (macromedia) : button action



kevin raleigh
1/7/2007 11:59:41 PM
if you take a look at this site:
http://www.testbeddesigns.com/runinthesun.html
you will notice that you can click on any button, but when you click on contact
you can't click on the corporate button and get any action.

The code is basic:
click first in the frame then click on the button and place this code in there
on(release){
gotoAndPlay("still0");
}
as far as the frames are concerned I have:
[quoted text, click to view]
Each of the layers is staggered so that they don't over lap on the actions. I
left a gap
of about 3-4 frames beteen each of the button layer action frames.
the interesting thing is I can go down the list of buttons and they act
accordingly,
but when I try to go back up the list of buttons they don't respond on the
page
I am working on. I am trying to duplicate some work that was given to me by
another developer.

Has anyone ever been down this road and resolved the problem?

Thank You
Kevin

MotionMaker
1/8/2007 1:06:35 PM
COuld not see the Flash Movie in Firefox Flash 9. However be sure the
"Corporate" button is not copied to the frame without the same code or any
code. Click on the frame where you see the Corporate button not working and
look at the Actionscript window.
kevin raleigh
1/9/2007 12:16:46 AM
When I click on the frame where the corporate button is to go and apply the
on(release) code, i get this error:

[quoted text, click to view]
Please note that according to the flash I am in the button. Not sure what
gives here. So I studied the example that partick supplied me, which works, and
he clicks in the frame, then on the button, and then places the code.

if Iclick on the button after clicking on the frame I appear to get the same
button action window, but the first time I get an error, and second time it
works.

Do you know of any tutorials that show more than one button being used so I
can see a different perspective?

Kevin
MotionMaker
1/9/2007 1:51:11 PM
You may have the code both on a button and on frame 35. Look at frame 35 on the
timeline and examine all layers. Any layer that contains a keyframe with a
small letter a, needs to be clicked and examined to see what code is in it. If
the code on a frame contains on(release) it must be moved to a button.

As for the one time it works and the second it does not, that may be that the
code is on a frame you are on in one case and not on in another.

You can also use main menu Windows->Movie Explorer and click the Show
Actionscript button down and all the other buttons up to see all actionscript
you have in your movie to help sort out where code is.
kevin raleigh
1/11/2007 12:00:16 AM
I found the problem.
I was putting the code on the button not the frame as required, but only on
the first key frame and not the others in the time line. I was clued by looking
at the explorer as you suggested. It should my code on first key frame, but on
the other keyframes as it was required, and as it was done in my example. Just
didn't think to look beyond the first key frame.
Kevin
AddThis Social Bookmark Button