Hi AS3 community, I've run into a brick wall and was hoping I could use your help. I have the following class set up: package { import flash.events.MouseEvent; import flash.text.TextField; import flash.display.MovieClip; import flash.text.TextFormat; public class NPC extends MovieClip { public function NPC(varX:Number,varY:Number,varName:String) { // constructor code this.x=varX; this.y=varY; this.addEventListener(MouseEvent.CLICK,actionWindow); } public function actionWindow(event:MouseEvent):void { var format:TextFormat= new TextFormat(); format.size=15; var dialogue:TextField=new TextField(); dialogue.defaultTextFormat=format; dialogue.text="Welcome to Russ's Test Environment!"; dialogue.border=true; dialogue.background=true; dialogue.backgroundColor=0xE8F2FA; dialogue.wordWrap=true; dialogue.width=650; dialogue.x=25; dialogue.y=25; addChild(dialogue); } } } And have the following on the timeline: var compy:NPC = new NPC(400,200,"Joe"); addChild(compy); This correctly creates my object on the stage, however when I click on it the dialogue box appears in relation to the object and not the stage itself (in this instance, x 425 y 225). What would I want to do in order to place the text box at x 25 y 25?
... View more