Hi!
I need help in selecting options correctly and in the same time view the selected option's value using UP and Down arrows. Please take a look at the example *.FLA file that I've made using flash mx.
make an mc with 5 frames, for one option each and put the arrow in it and place it next to the optiontexts accordingly.
in the up and down key functions goto next or previous frame of that mc. with the _currentframe property you can read which option is currently selected.
and don't forget to pot a stop(); in that one mc
Who do you trust?
Will they feed us the womb?
Clone the fetal mirage
Will they feed us the womb?
Originally posted by Ubersquid make an mc with 5 frames, for one option each and put the arrow in it and place it next to the optiontexts accordingly.
in the up and down key functions goto next or previous frame of that mc. with the _currentframe property you can read which option is currently selected.
and don't forget to pot a stop(); in that one mc
thanks for the reply..
I've made 5 frames and add these code there, it doesn't work properly..
Hi Ubersquid,
Thanks, It's working fine, but the selection is very very very sensitive. WHen I move the arrow once, it drag me to next automatically till the end..
I've little problem in assigning IF argument under the on(keyPress("<Up"), only able to assing that like this:
(but too sensitive again.. it's jumping few options while selecting..)
:: Works(executing) but TOO sensitive, doesn't work properly. Running to the end fast. Cannot select the options, jumping 1 to 3, 6..
well the secon one's error is exactly what it says, you can't put an on-handler into another on-handler. you have to put the if into each handler, like this
Originally posted by Ubersquid well the secon one's error is exactly what it says, you can't put an on-handler into another on-handler. you have to put the if into each handler, like this
Hi Ubersquid,
I'm very sorry for the late reply
Thanks for the reply..
I'm trying to execute this code, but it produces some errors.
Code:
onClipEvent(enterFrame){
//IF Skill is NOT selected
if(_root.SkillSelected == false){
//if NOT paused or movable
if(_root.Paused == false){
if(_root.Movable == false){
//IF MainCursorEnabled
if(_root.MainMenuCursorEnabled == true){
//move the arrow in the menu
on(keyPress "<Up>")
{
this.prevFrame();
}
on(keyPress "<Down>")
{
this.nextFrame();
}
}
}
}
}
}
Error:
Code:
**Error** Symbol=Tween 1, layer=arrow, frame=1:Line 11: on handlers may not nest within other on handlers
on(keyPress "<Up>")
Total ActionScript Errors: 1 Reported Errors: 1
Can you pls help me to get rid of this error to make the menu to work smoothly?
it seems you only quoted my previous post without reading it...
you need to put the ifs in each of the on(keyPress) handlers and get rid of the onClipEvent(enterFrame)
the on(keyPress) handler is executed everytime the specific key is pressed, no matter on what frame in your animation you currently are or what other code is executed at that moment. flash can execute multiple codesegments parallel, which can be a bit hard to see through sometimes
Who do you trust?
Will they feed us the womb?
Clone the fetal mirage
Will they feed us the womb?