Skip to main content
December 28, 2009
Question

reaching a movie on the stage from inside another movie clip

  • December 28, 2009
  • 1 reply
  • 343 views

I'm trying to reach a body of text which i turned into a movie clip which is on the main stage, and have it scroll up/down whenever it rolls over the designated hot spots. Here's what i have.

stage.addEventListener(MouseEvent.MOUSE_MOVE,down1,false,0,true);

function down1(e:MouseEvent):void {

     if (mouseX>=0 && mouseX<=42 && mouseY>111.1 && mouseY<146.1) {

          stage.addEventListener(Event.ENTER_FRAME,scrolldown1);

     } else {

          stage.removeEventListener(Event.ENTER_FRAME, scrolldown1);

     }

}

function scrolldown1(e:Event):void {

     if(MovieClip(this.root).resume_txt.y > 219) {

          MovieClip(this.root).resume_txt.y += 5;

     } else {

          this.removeEventListener(Event.ENTER_FRAME, scrolldown1);

     }

}

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
December 28, 2009

Can you explain the purpose bhind these lines...

     if(MovieClip(this.root).resume_txt.y > 219) {

          MovieClip(this.root).resume_txt.y += 5;

It seems as though if it is >219, it will move until the mouse moves out of the region.  Is there any specific aspect of it that you can pinpoint as not woking?.

December 28, 2009

oh my bad nevermind the numbers, I just copied and pasted parts of the code from elsewhere and those are the numbers left behind, i'm just trying to link to the movie clip on the stage

December 28, 2009

nvm its linked