all groups > flash actionscript > february 2004 >
You're in the

flash actionscript

group:

Disable _root.btn1.onRollOver=null


Disable _root.btn1.onRollOver=null Reza Saheban
2/4/2004 8:24:28 PM
flash actionscript: Hi.Flash MX user.
I'm to design a logo for a company and I really need help.
I have a logo(movie clip) which I want to turn,but when you move your mouse over it.When you do that, it will turn once (one 360") and it'll stop after that.During this rotation if you move your mouse over it I want nothing happens until this rotation(one 360") become complete.I use this for btn(button) which is invisible on the logo.
(we give it to a frame)(mc=movie Clip)(2 is the number of frame)

btn1.onRollOver=function(){
_root.mc1.mc2.gotoAndPlay(2);


And this for mc(Movie Clip) to disable event till the rotation gets complete:
_root.btn1.onRollOver=null

but for after the rotation becomes complete I want to disable this
for the next rollover.How do you disable _root.btn1.onRollOver=null
? I need something like:
_root.btn1.onRollOver= not null
or _root.btn1.onRollOver=! null
but we don't have such thing here in actionscript.Could you write
something which can disable _root.btn1.onRollOver=null ?
You can download the source file from:
(istead of click, copy and paste it in your browser)
http://www.geocities.com/rezasaheban/for_email_test2.zip
and if you find it easy you can fix it and sent it to
rezasaheban@yahoo.com
Thank you very much.
please if you send anything save it as Flash MX not 2004
I don't have 2004 right now.
(this logo is simplified for you)
Regards
Reza

Re: Disable _root.btn1.onRollOver=null Matheus
2/5/2004 8:05:21 AM
You can disable the button:

btn1.enabled = false;

And them enable it again:

btn1.enabled = true;


"Reza Saheban" <webforumsuser@macromedia.com> escreveu na mensagem
news:bvrkds$8r9$1@forums.macromedia.com...
[quoted text, click to view]
mouse over it.When you do that, it will turn once (one 360") and it'll stop
after that.During this rotation if you move your mouse over it I want
nothing happens until this rotation(one 360") become complete.I use this for
btn(button) which is invisible on the logo.
[quoted text, click to view]

Please view this one: Reza Saheban
2/9/2004 11:19:44 PM
Thanks for the reply.You are right.but this works as well:(for main timeline)

btn1.onRollOver=function()
_root.mc1.mc2.gotoAndPlay(2)
_root.btn1.onRollOver=null


And for last frame of mc2 we rewrite this

_root.btn1.onRollOver=function()

_root.mc1.mc2.gotoAndPlay(2)
_root.btn1.onRollOver=null


stop()

Ok but if this works why this doesn't work:(like before we write:

btn1.onRollOver=function()
_root.mc1.mc2.gotoAndPlay(2)
_root.btn1.onRollOver=null


but for mc2 we write something else

_root.btn1.onRollOver=function()
_root.gotoAndPlay(1)


This should work as well but it doesn't.Why? When you say
_root.gotoAndPlay(1); it is like rewriting that fuction becaus
it should go to _root and read the actionscript of that location
btn1.onRollOver=function()
_root.mc1.mc2.gotoAndPlay(2)
_root.btn1.onRollOver=null


but it doesn't read that, why


Re: Please view this one: CesareRocchi
2/10/2004 11:53:05 AM
you can also try:

_root.btn1.onRollOver= undefined

or even

delete _root.btn1.onRollOver;

HTH,

AddThis Social Bookmark Button