Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Drop Down Menu manipulation problem

Participant ,
Jun 08, 2013 Jun 08, 2013

Hi, I have a dropdown Menu code for AS2 as the follow, this code is applied to a buttonOne on stage, and the buttonOne's next frame is the menu content.** No stop(); at any frame in the button movie.

onClipEvent(enterFrame){        // if the mouse IS over the menu ...

   

    if (this.hitTest(_root._xmouse, _root._ymouse, true)) {     // if the menu is NOT fully open

       

        if (this._currentframe<this._totalframes) {

           

            nextFrame();        // go to the next frame of the menu opening sequence

        }

      

    } else {            // if the mouse is NOT over the menu

      

        if (this._currentframe>1) {               // if the menu is NOT fully closed

           

            prevFrame();               // play the previous frame of the menu opening sequence

        }

    }

***on the next frame, I have  a buttonUp and a movie text1, buttonUp has code as the follow:

on(rollOver) {

    onEnterFrame = function (){

    text1._y -=4;}    // so text1 would move up when pressed.

}

on(rollOut) {

    delete this.onEnterFrame;

}


****NOW****, what I need is to make buttonOne work as a Press button instead of Rollover button, and when pressed, next frame will remain on stage even when mouse move away ( I will apply a close window button later on).

My problem right now is, I can change the first part of the code to :

on(press){

     gotoAndStop(2);  //or something like that

}

while put stop();  on both frames in the movie, but then by doing this would remove the funtionality on

onEnterFrame = function (){

    text1._y -=4;} 

so text1 don't move at all if there is a stop(); applied to that current frame. I tried a few methods but none work, tried to search the web but all the tutorials I found are all Rollover type drop down menu.

TOPICS
ActionScript
429
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Jun 08, 2013 Jun 08, 2013

problem solved... instead of applying on(press) on the movie, just create another button and call gotoAndStop from there solve the issue

(...)

thanks reading

Translate
Participant ,
Jun 08, 2013 Jun 08, 2013

http://www.dcphonecases.com/test02/wordTest.html

this is the movie. as you see the because the next part of the movie is a word input test, it becomes so inconvenient when you try to type something into the field and your mouse moves out and the window disappear.  (** update: just tested,  on(press) <> gotoAndStop() method would disable Input-text field as well)

that is why I wanted to make it a on(press) <> gotoAndStop() method, and when pressed, the drop-down would stay until a close button is pressed.

but then the 'choose font' onEnterFrame function destroyed if I put stop(); at the frame, I'm not sure what to do now.

Thanks for reply

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 08, 2013 Jun 08, 2013
LATEST

problem solved... instead of applying on(press) on the movie, just create another button and call gotoAndStop from there solve the issue

(...)

thanks reading

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines