PDA

View Full Version : another n00b question


indiochano
02-21-2004, 03:09 AM
I'm using the loadmovie action and loading different movies in different levels... the thing is that at some point i have 3 levels each one overlapping the other... unfortuneately, they all have buttons, and what i wanna do is disable the buttons of the 2 first layers while the top layer has its buttons activated... then when i wanna unload the top level and switch back to 2nd level, reactivate its buttons... how can i do that?

thanks.

Abelius
02-21-2004, 12:16 PM
myButton.enabled = true

:)

indiochano
02-21-2004, 12:51 PM
Originally posted by Abelius
myButton.enabled = true

:)
I'm sorry to ask, but where do I place that action? in the button? in the frame? I'm sorry for being a n00b :D

t-omen
02-21-2004, 02:08 PM
Place it at the point where you want to enable the button. That is, anywhere... ;-)

indiochano
02-21-2004, 02:44 PM
Originally posted by t-omen
Place it at the point where you want to enable the button. That is, anywhere... ;-)

So for instance, if my first button instance name is "button1" and the other one is called "button2", then during the scene where I want to disable button1 and enable button 2 i'd have to do this?:

button1.enabled = false
button2.enabled = true

BTW: I wanna place this script within the action of a button... for instance using the on release command, loadmovie under the 2nd level and then input the

button1.enabled = false
button2.enabled = true

commands...
dunno if that's possible, but im going to try it out now...
thanks.

indiochano
02-21-2004, 02:49 PM
Originally posted by indiochano
So for instance, if my first button instance name is "button1" and the other one is called "button2", then during the scene where I want to disable button1 and enable button 2 i'd have to do this?:

button1.enabled = false
button2.enabled = true

BTW: I wanna place this script within the action of a button... for instance using the on release command, loadmovie under the 2nd level and then input the

button1.enabled = false
button2.enabled = true

commands...
dunno if that's possible, but im going to try it out now...
thanks.

Just tried that, and it didn't work :(

t-omen
02-21-2004, 02:51 PM
Be sure to name all instances(?), and then call them with _root... That does the trick everytime for me...

indiochano
02-21-2004, 02:52 PM
Originally posted by t-omen
Be sure to name all instances(?), and then call them with _root... That does the trick everytime for me...

can you plz explain that to me in layman's terms (i'm a retard when it comes to AS... :( )

THanks.:rolleyes:

t-omen
02-21-2004, 02:54 PM
you have movie. In that you have a button. Name the movie movie1 and the button button1. Then call them with _root.movie1.button1._visible = true;

Get it?

indiochano
02-21-2004, 03:01 PM
Originally posted by t-omen
you have movie. In that you have a button. Name the movie movie1 and the button button1. Then call them with _root.movie1.button1._visible = true;

Get it?

I kinda got confused with the _root command... Is the _root command similar to the loadmovie command (i mean do they perform the same function?)

the code you input there (_root.movie1.button1._visible = true), i'm kinda confused about it... you see, i had the button perform a "loadmovie" command, loading the external .swf to level 2 of the movie (overlapping the other movies with an alpha channel, pretending to be a window overlapping the other movies...), so i want the other movies under the top external .swf to be visible, but without the buttons being active... dunno if you'll understand this... :S

thanks.

indiochano
02-21-2004, 03:02 PM
i'm gonna make an illustration to kinda describe my problem... brb

indiochano
02-21-2004, 03:09 PM
http://natura.web1000.com/expla.jpg

Here... thanks.

t-omen
02-21-2004, 03:11 PM
If I understood correctly, disabling the button (_visible=false;) disables the functionality of the button. Sadly it also disables the outlook of that button. I'd duplicate the button, making the other a button and other simply a movie. Then disable the button when needed and at the same time enable the movie (which, of course, resembles the button, but does nothing... ;-) This is not the "correct way" to do things, but should work...

indiochano
02-21-2004, 03:25 PM
Originally posted by t-omen
If I understood correctly, disabling the button (_visible=false;) disables the functionality of the button. Sadly it also disables the outlook of that button. I'd duplicate the button, making the other a button and other simply a movie. Then disable the button when needed and at the same time enable the movie (which, of course, resembles the button, but does nothing... ;-) This is not the "correct way" to do things, but should work...

yea... i guess i'll have to do it the hard way then :(

thanks for everything anyway :)