Groups | Blog | Home
all groups > flash actionscript > march 2004 >

flash actionscript : Targeting issue


Dave Mennenoh
3/21/2004 9:59:31 PM
This must be simple but I just cannot seem to figure it out. I have a movie
clip containing three buttons that I want to set the enabled state on. This
clip is sitting on my main timeline at frame 25, and has the following code
attached:


--


Dave
http://www.blurredistinction.com/director

Dave Mennenoh
3/21/2004 10:06:20 PM
Ooops. I'll start over:
This must be simple but I just cannot seem to figure it out. I have a movie
clip containing three buttons that I want to set the enabled state on. The
clip's instance name is 'edit_wythe_buttons'. The three buttons are named
wythe1, wythe2 and wythe3. This clip is sitting on my main timeline at frame
25, and has the following code attached:

onClipEvent (load) {
_root.set_state_wythe_buttons();
}


This calls the set_state_wythe_buttons() function, which is on frame 1 on
the main timeline. So far so good. Now, from within the function I simply
want to set enabled on either of the three buttons. I cannot get it to work.

function set_state_wythe_buttons(){
edit_wythe_buttons.wythe1.enabled = false;
}

That doesn't disable the button. I don't get why it's not targeting it
correctly though. I can do this:

onClipEvent (load) {
this.wythe1.enabled = false;
_root.set_state_wythe_buttons();
}

and it properly disables the button. What am I doing wrong?


Dave
http://www.blurredistinction.com/director

Dave Mennenoh
3/21/2004 10:24:40 PM
I got it... It wasn't the targeting - it was my bad with Flash's Switch
construct is all. Thanks.

--


Dave
http://www.blurredistinction.com/director

AddThis Social Bookmark Button