walker6o9
10-16-2008, 03:29 PM
I have a dynamic text box inside a movie clip. The movie clip resides below a bunch of other images and movie clips on the stage, so that if the other movie clips are moved across the screen, they cover up the text box.
The problem I have is that I added a link dynamically, and now the textbox appears on top of everything else. Is there a way I can make this sit behind everything else again?
My code:
public function showContent():void {
this.gotoAndStop( "content" );
// hide various screens
hideClip( this.startmenu );
hideClip( this.downloadscreens );
showClip( this.bodytext );
setClipLanguage( this.bodytext );
this.bodytext.introCopy.htmlText += "Disc 1 is totally baller. Some other text. Etc, etc, etc. Please review the the <a href='event:Link Clicked'>usage guidelines (PDF) </a> before beginning work.";
addChild(this.bodytext.introCopy);
this.bodytext.introCopy.addEventListener(TextEvent .LINK, linkEvent);
this.bodytext.language.addEventListener( MouseEvent.CLICK, this.selectLanguage );
}
function linkEvent(event:TextEvent):void {
trace("HOORAY! I'm a PIRATE");
// Link Clicked
}
I tried to add this code:
Stage.setChildIndex(this.bodytext.introCopy, 0);
but I got an error, Stage is not a variable
The problem I have is that I added a link dynamically, and now the textbox appears on top of everything else. Is there a way I can make this sit behind everything else again?
My code:
public function showContent():void {
this.gotoAndStop( "content" );
// hide various screens
hideClip( this.startmenu );
hideClip( this.downloadscreens );
showClip( this.bodytext );
setClipLanguage( this.bodytext );
this.bodytext.introCopy.htmlText += "Disc 1 is totally baller. Some other text. Etc, etc, etc. Please review the the <a href='event:Link Clicked'>usage guidelines (PDF) </a> before beginning work.";
addChild(this.bodytext.introCopy);
this.bodytext.introCopy.addEventListener(TextEvent .LINK, linkEvent);
this.bodytext.language.addEventListener( MouseEvent.CLICK, this.selectLanguage );
}
function linkEvent(event:TextEvent):void {
trace("HOORAY! I'm a PIRATE");
// Link Clicked
}
I tried to add this code:
Stage.setChildIndex(this.bodytext.introCopy, 0);
but I got an error, Stage is not a variable