View Full Version : DISABLE BUTTON ON ANOTHER LEVEL
JayFranchize
August 10th, 2005, 01:08 PM
My main movie is on level 0, of course. On level 0 I created an empty movie clip named "container". Now, I load another movie into container, and I loaded it on Level 1. Now, I want to put a code inside a Movie Clip that is on level 1, which is the new, loaded movie that will disable a red button on level1. Here's the code I used:
_level1.redbutton.enabled= false;
That didn't work, so I went this route:
_root.redbutton.enabled=false;
That worked to no avail as well. So, I'm wondering if the code that disables and enables buttons only work with a handler? Like an onClipEvent or on (release) handler? I'm puzzled right now, because this is really elementary but i just don't know it right now...any aid will be appreciated...keep flashing
stringy
August 10th, 2005, 03:05 PM
My main movie is on level 0, of course. On level 0 I created an empty movie clip named "container". Now, I load another movie into container, and I loaded it on Level 1. Now, I want to put a code inside a Movie Clip that is on level 1, which is the new, loaded movie that will disable a red button on level1. Here's the code I used:
_level1.redbutton.enabled= false;
That didn't work, so I went this route:
_root.redbutton.enabled=false;
That worked to no avail as well. So, I'm wondering if the code that disables and enables buttons only work with a handler? Like an onClipEvent or on (release) handler? I'm puzzled right now, because this is really elementary but i just don't know it right now...any aid will be appreciated...keep flashing
I think you are confusing _levels with depths.
in the mc you are loading try
this.redbutton.enabled =false;
or from the main timeline (you must wait until the movie has loaded)
yourcontainername.redButton.enabled = false;
JayFranchize
August 10th, 2005, 03:20 PM
Thanks for the reply.
[after] the movie in level1 loads, I need to disable a button in level1, which has the instance name redbutton. Level1 doesn't have a container; it was loaded into a container on level 0, the main movie.
Therefore, I should just be able to diable the buttons like this:
_level1.redbutton.enabled = false;
but obviously I can't . I believe it's a simple path issue, or the enbale property only works with a handler. I'm testing workarounds now and I'll post my results...
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.