-
Cant get drop down menu to work
I'm a newbie, so sorry in advance! I got a lot of help coding this dress up game, and now I would love to be able to have the "banners" in the menu drop down and have for example hair and hair2 and so on. So it SHOULD not be so hard, but I just can't get it to work..
I tried this tutorial but I got Syntax error when I tried it. And then I tried some other tutorial and then the links didn't work.
I would really really appreciate if someone could take a look in my code and see if there is a simple solution maybe!
Thanks! (I will attach an fla-file without the images)
My version is CS5 but I use AS2 (unfortunaly I know)
style2.fla
-
Client Software Programmer
-
But there is sooo much code, isn't it easier to look at the fla-file?
-
I can't paste all of the code here, it says it's too long :/
-
Ok now I tried again with the first tutorial, and now I didn't get syntax error for some reason. But the menu button is showing all the time and won't disappear.
I've made an invisible "catcher button" on a layer below the whole menu as it says in the tutorial, and this is the code
Code:
function invisible (){
btn_tops2.visible = false;
}
btn_tops.onRollOver = function(){
btn_tops2.visible = true;
};
invisible ();
btn_catcher.OnRollOver = function(){
invisible();
}
-
Prid - Outing
Hi,
Love your game, the art is really unique and I love all the different options
Could you post your updated FLA file where you've tried implementing the drop down effect? I just can't seem to quite understand WHAT you're actually trying to achieve :O
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
Thank you so much! Yes perhaps I'm being a bit unclear. I'm feeling a bit confused myself
Here is the file with the drop down menu code
style3.fla
-
Prid - Outing
You almost had it, just a few naming errors -- most likely because you're probably used to AS3 or just made a simple mistake
Code:
btn_catcher.OnRollOver = function(){
invisible();
}
you wrote OnRollOver with a capital O -- that's wrong, it's: onRollOver
also, for the visible property you've been using the AS3 name:
Code:
btn_tops2.visible = false;
the correct AS2 notation is: _visible
So with all the mistakes cleared up, here's the fixed code you should be using for the buttons:
PHP Code:
function invisible(){ btn_tops2._visible = false; } btn_tops.onRollOver = function(){ btn_tops2._visible = true; }; invisible();
btn_catcher.onRollOver = function(){ invisible(); }
I hope this works and that it helps you
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
Client Software Programmer
nig
-
THANK YOU!! I'm so happy there are nice people like you, helping us n00bs in need. It works perfectly now!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|