all groups > macromedia flash sitedesign > may 2004 >
You're in the

macromedia flash sitedesign

group:

Help please, this should be so easy???


Help please, this should be so easy??? Brian
5/28/2004 1:16:27 PM
macromedia flash sitedesign:
I really am startled by this. I think I have done this many time just
the same way and now it is not working for some reason.

I am trying to trigger these buttons with the following script:

page_btn_01.onRelease = function(){
textMC.gotoAndStop("page_one");
trace("button 01");
}

page_btn_02.onRelease = function(){
textMC.gotoAndPlay("page_two");
trace("button 02");
}

etc.


And it just will not work. I can't trace or do the goto action.

If I attach the action directly to the button it works such as so:

on(release){
trace("button 01");
textMC.gotoAndPlay("page_one");
}

I would like to do it the other way though. The action is on the same
frame number on a actions layer below the layer with the buttons. The
paths to the buttons are right as far as I can tell also. So I really
don't know what is going on and why this will not work.

I would really appriciate help.

Thank you very much!!!
Brian
Re: Help please, this should be so easy??? Adam brulia
5/29/2004 7:00:18 AM
I think this is it

if your "page_one" refers to a label or a keyframe on maintime line you need
_root.textMC.gotoAndStop
refering the playhead back to main timeline to play textMC.

it should work
Re: Help please, this should be so easy??? Peter Blumenthal
5/29/2004 10:33:12 AM
no, from a button on the _root timelime, textMC.gotoAndStop("page_one"); is
correct. Besides which, the trace statement would execute, even if the path
to the mc was wrong. Might sound obvious, but you have given your buttons
instance names of page_btn_01 and page_btn_02 i suppose?

--
---------------------------------------
http://www.phageinteractive.com
PhageInteractive Ltd.
remove mm_ to mail
---------------------------------------
'If I come across as a grumpy and twisted old man, it's just because I'm a
grumpy, twisted, old man." - me
---------------------------------------

Re: Help please, this should be so easy??? tralfaz
5/29/2004 11:58:09 AM
[quoted text, click to view]

I agree with you Peter. It is not so intuitive because if the code were
attached to a movieclip on the main timeline you would have to use
_root.textMC but if the code is attached to a button on the main timeline
you don't. It's like the buttons are considered to be part of the timeline
they are on. They don't have their own timelines.

I think your analysis is correct. Since the trace statement isn't working
then the button code is not being activated. It can only be that the
instance name used is not matching the buttons.
tralfaz

AddThis Social Bookmark Button