A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: can't attach rollover actions to dynamic menu

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Posts
    306

    can't attach rollover actions to dynamic menu

    I'm trying to build a dynamic menu but I am having trouble attaching the actions to the clip.

    Here is my code:
    this.createEmptyMovieClip("menu", -1);
    menu.attachMovie("invis", "invis", 1);
    menu.invis._x += 15;
    menu.attachMovie("arrow", "arrow", 2);
    menu.arrow._y += 3.8;

    menu.invis.onRollOver = function(){
    this.arrow._visible = 0;
    }
    menu.invis.onRollOut = function(){
    this.arrow._visible = 1;
    }


    I can't get the items in red to actually work. The only way I can get it to work is if I hard code in the location of the "arrow" movieclip from the root level.

    Here is my sample file: http://jfoley37.googlepages.com/pleasework.fla

    Any help is appreciated. Thanks!

  2. #2
    Senior Member
    Join Date
    Nov 2004
    Posts
    928
    this.createEmptyMovieClip("menu", 1);
    menu.attachMovie("invis", "invis", 1);
    menu.invis._x += 15;
    menu.attachMovie("arrow", "arrow", 2);
    menu.arrow._y += 3.8;

    menu.invis.onRollOver = function(){
    menu.arrow._visible = 0;

    }
    menu.invis.onRollOut = function(){
    menu.arrow._visible = 1;
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center