SEARCH YOUR SOLUTION HERE  

TypeError: #1009 Issues

Okay. I'm trying to make a popup alert modal window thing with an external class. I have a simple swf set up with just some random sample text, a rectangle, and a button (just so I can tell if it's working or not). What I want to happen is for the "alert" class to initialize upon startup of the swf and then when I click the button (instance: btn), the alert will show up. If I get rid of all AS in the swf and set alert as the document class, it shows up just fine, so I think it should be working, but for some reason I get this instead when I try the button function:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at alert$cinit()
at global$init()
at alertTester_fla::MainTimeline/frame1()

Here's the cote in my alertTester swf:

Code: import alert; alert.msgAlert = "This is me testing stuff out."; btn.addEventListener(MouseEvent.CLICK, displayAlert); function displayAlert(e:MouseEvent):void { alert.showAlert(); } And here's the code in alert.as:

Code: package { import flash.display.MovieClip; import flash.display.*; import flash.events.*; import flashx.textLayout.formats.Float; import flash.text.TextField; import flash.geom.Matrix; import flash.text.*; public class alert extends MovieClip { private static var stage:Stage = null; private static var bkgd:Sprite; private static var msgBox:Sprite; private static var msg:TextField; public static var msgAlert:String = "Test."; //for alert box itself public static var rectW:int = 200; public static var rectH:int = 150; private static var rectX:Number = (stage.stageWidth/2) - (rectW/2); private static var rectY:Number = (stage.stageHeight/2) - (rectH/2); public function alert() { addEventListener(Event.ADDED_TO_STAGE, added); } private function added(event:Event):void { init(stage); } private function init(stageRef:Stage):void { stage = stageRef; trace("Initialized!"); } public static function showAlert():void { if (stage == null) { trace("Alert class has not been initialized!"); return; } //initialize bkgd = new Sprite(); msgBox = new MovieClip(); msg = new TextField(); //assign content bkgd = createBkgd(); msgBox = createBox(); msgText(msgAlert); //add children msgBox.addChild(msg); bkgd.addChild(msgBox); stage.addChild(bkgd); } private static function createBkgd() : Sprite { //setup/initialize var overlay:Sprite = new Sprite(); //make rectangle/cover stage overlay.graphics.beginFill(0x929292); overlay.graphics.drawRect(0,0,stage.stageWidth,stage.stageHeight); overlay.graphics.endFill(); overlay.alpha = .85; //return return overlay; } private static function createBox() : Sprite { //setup/initialize necessary variables var box:Sprite = new Sprite(); var colors:Array = new Array(0xFFFFFF, 0xE1E1E1); var alphas:Array = new Array(1, 1); var ratios:Array = new Array(0,125); var mat:Matrix = new Matrix(); //make rectangle/alert box mat.createGradientBox(rectW,rectH,(Math.PI/2),rectX,rectY); box.graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, mat); box.graphics.drawRoundRect(rectX,rectY,rectW,rectH,25,25); box.graphics.endFill(); //return return box; } private static function msgText(alertMsg:String):void { //create formatter and font var myFormat:TextFormat = new TextFormat(); var myFont = new Font(); //format formatter myFormat.size = 14; myFormat.align = TextFormatAlign.CENTER; myFormat.font = "Arial"; //declare and assign message variable var msgWords:String = alertMsg; //set text field properties msg.autoSize = TextFieldAutoSize.CENTER; msg.defaultTextFormat = myFormat; msg.background = false; msg.border = false; msg.selectable = false; msg.type = TextFieldType.DYNAMIC; msg.textColor = 0x000000; msg.antiAliasType = AntiAliasType.ADVANCED; msg.embedFonts = true; msg.text = msgWords; //set position msg.x = rectX + rectW/2 - msg.width/2; msg.y = rectY + rectH/5; } } } I originally had the "init" function as a public static function so I could do "alert.init(stage);" from the swf, but it gave me this same error.

Posted On: Thursday 25th of October 2012 09:26:45 PM Total Views:  427
View Complete with Replies




Related Messages:

TypeError: Error #1009   (128 Views)
, my first every project I've made an mp3 player and implemented an equalizer that syncs to beat. However when executed it works, but I get this error and any attempt to fix it fails. I can get rid of the erro, but then the EQ bars stop working... Anyway here is a sample of the code as I know this is the area of the problem. Code: addEventListener(Event.ENTER_FRAME, onEnterFrame); function onEnterFrame(event:Event):void { // ANIMATED EQ BARS CODE eqLeft1.gotoAndStop (Math.round(my_channel.leftPeak * 9) ); // 10 is the amount of frames in our EQbar clips eqRight1.gotoAndStop (Math.round(my_channel.rightPeak * 11) ); // 10 is the amount of frames in our EQbar clips eqLeft2.gotoAndStop (Math.round(my_channel.leftPeak * 16) ); // 10 is the amount of frames in our EQbar clips And the error ... Quote: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mp3_fla::MainTimeline/onEnterFrame()[mp3_fla.MainTimeline::frame1:94]
Error #1009   (151 Views)
So i'm very new to flash. Like extremely new. I'm working on a project and am getting that error#1009 message over and over again. Here is the code please help me ActionScript Code: stop(); button_1.addEventListener(MouseEvent.MOUSE_OVER, fl_MouseOverHandler_1); function fl_MouseOverHandler_1(event:MouseEvent):void { Door12_open.visible = true; } button_1.addEventListener(MouseEvent.MOUSE_OUT, fl_MouseOutHandler_1); function fl_MouseOutHandler_1(event:MouseEvent):void { Door12_open.visible = false; } button_1.addEventListener(MouseEvent.MOUSE_OVER, fl_MouseOverHandler_2); function fl_MouseOverHandler_2(event:MouseEvent):void { Door12_close.visible = false; } button_1.addEventListener(MouseEvent.MOUSE_OUT, fl_MouseOutHandler_2); function fl_MouseOutHandler_2(event:MouseEvent):void { Door12_close.visible = true; } button_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame); function fl_ClickToGoToAndPlayFromFrame(event:MouseEvent):void { gotoAndPlay(25); } the instance names of the movie clips are correct but I have no clue what I'm doing. Thank you in advanced , trace all of the instance names at the top of the script.
Error 1009 help   (132 Views)
I need help with an 1009 that i can't solve by myself. If you could help i would be very happy. I have a main Game.as class, where i define the array enemies and a y.as class, where the problem is. The probelm when debugging is in the pointed line: ActionScript Code: public function targetNearby(e:Event) { >>for (var v:int = MovieClip(parent).enemies.length - 1; v >= 0 ; v--) { if (this.x + 250 > MovieClip(parent).enemies[v].x) { targetnearby = true; } else { targetnearby = false; } } } This makes me think it is because of enemies.length being null, but that is impossible in that situation... Any ideas
TypeError: Error #1009?   (143 Views)
Alright so I'm working on making a skill calculator for this a game. This one I am working on right now has multiple skill calculators in a single flash file, but for some reason that I can't figure out, the skill calculator won't actually calculate. Here is a pastebin length to the AS code http://pastebin.com/xB6xzJFd Alright, I apoligize for its length, but I really have no idea what I'm doing wrong with this one. Here is the output: Code: TypeError: Error #1009: Cannot access a property or method of a null object reference. at allInOneCalc_fla::MainTimeline/changeCalc() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at fl.controls::ComboBox/onListChange() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at fl.controls::SelectableList/handleCellRendererClick() I get that error the second I select a calc and it goes to that frame, and when I input all the information it gives me a "0 and whatever text I had it add" for the answer. Please help, I've been stuck on this for a while. EDIT: I Believe I did the wrong type of event for lines 22, 25 but I'm still not sure with what type of event I should use. Any advice is greatly appreciated
error 1009 problem   (141 Views)
i am new to flash and have no idea how to get around this problem. (i am using as3) I have added a gotoAndStop function on a symbol to take me back to frame 1 When i run the movie and click on this button i get this error TypeError: Error #1009: Cannot access a property or method of a null object reference. at housedesign1_fla::MainTimeline/frame1() at flash.display::MovieClip/gotoAndStop() at housedesign1_fla::MainTimeline/gohome() I have tried looking through forums to see if anything can help but i still don't have an idea about why this error is occuring. I have a few frames in between frame with function and the destination frame which have a symbol with a similar function. I copied the symbol and changed the instance name in each frame. This is the code for the function home_btn.addEventListener(MouseEvent.CLICK,gohome) ; function gohome(evt:MouseEvent): void { gotoAndStop(1); } I also get the error from the code i used to make text appear and disappear. The error occurs when i click on box1. Here is the code for this. txt1.visible=false box1.addEventListener(MouseEvent.MOUSE_OVER, showtxt); box1.addEventListener(MouseEvent.MOUSE_OUT, hidetxt); function showtxt(evt:MouseEvent): void { txt1.visible=true; } function hidetxt(evt:MouseEvent): void { txt1.visible=false; } box1.addEventListener(MouseEvent.CLICK, solarpage); function solarpage(evt:MouseEvent): void { gotoAndStop(16); } I get the same type of error for this too TypeError: Error #1009: Cannot access a property or method of a null object reference. at housedesign1_fla::MainTimeline/hidetxt() This is my guess as to where the error may be but im not sure. These two errors are not related to each other. If this code is of no use then i will put other parts up. I tried to attach the file but the file size was too big.
TypeError: #1009 Issues   (158 Views)
Okay. I'm trying to make a popup alert modal window thing with an external class. I have a simple swf set up with just some random sample text, a rectangle, and a button (just so I can tell if it's working or not). What I want to happen is for the "alert" class to initialize upon startup of the swf and then when I click the button (instance: btn), the alert will show up. If I get rid of all AS in the swf and set alert as the document class, it shows up just fine, so I think it should be working, but for some reason I get this instead when I try the button function: TypeError: Error #1009: Cannot access a property or method of a null object reference. at alert$cinit() at global$init() at alertTester_fla::MainTimeline/frame1() Here's the code in my alertTester swf: Code: import alert; alert.msgAlert = "This is me testing stuff out."; btn.addEventListener(MouseEvent.CLICK, displayAlert); function displayAlert(e:MouseEvent):void { alert.showAlert(); } And here's the code in alert.as: Code: package { import flash.display.MovieClip; import flash.display.*; import flash.events.*; import flashx.textLayout.formats.Float; import flash.text.TextField; import flash.geom.Matrix; import flash.text.*; public class alert extends MovieClip { private static var stage:Stage = null; private static var bkgd:Sprite; private static var msgBox:Sprite; private static var msg:TextField; public static var msgAlert:String = "Test."; //for alert box itself public static var rectW:int = 200; public static var rectH:int = 150; private static var rectX:Number = (stage.stageWidth/2) - (rectW/2); private static var rectY:Number = (stage.stageHeight/2) - (rectH/2); public function alert() { addEventListener(Event.ADDED_TO_STAGE, added); } private function added(event:Event):void { init(stage); } private function init(stageRef:Stage):void { stage = stageRef; trace("Initialized!"); } public static function showAlert():void { if (stage == null) { trace("Alert class has not been initialized!"); return; } //initialize bkgd = new Sprite(); msgBox = new MovieClip(); msg = new TextField(); //assign content bkgd = createBkgd(); msgBox = createBox(); msgText(msgAlert); //add children msgBox.addChild(msg); bkgd.addChild(msgBox); stage.addChild(bkgd); } private static function createBkgd() : Sprite { //setup/initialize var overlay:Sprite = new Sprite(); //make rectangle/cover stage overlay.graphics.beginFill(0x929292); overlay.graphics.drawRect(0,0,stage.stageWidth,stage.stageHeight); overlay.graphics.endFill(); overlay.alpha = .85; //return return overlay; } private static function createBox() : Sprite { //setup/initialize necessary variables var box:Sprite = new Sprite(); var colors:Array = new Array(0xFFFFFF, 0xE1E1E1); var alphas:Array = new Array(1, 1); var ratios:Array = new Array(0,125); var mat:Matrix = new Matrix(); //make rectangle/alert box mat.createGradientBox(rectW,rectH,(Math.PI/2),rectX,rectY); box.graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, mat); box.graphics.drawRoundRect(rectX,rectY,rectW,rectH,25,25); box.graphics.endFill(); //return return box; } private static function msgText(alertMsg:String):void { //create formatter and font var myFormat:TextFormat = new TextFormat(); var myFont = new Font(); //format formatter myFormat.size = 14; myFormat.align = TextFormatAlign.CENTER; myFormat.font = "Arial"; //declare and assign message variable var msgWords:String = alertMsg; //set text field properties msg.autoSize = TextFieldAutoSize.CENTER; msg.defaultTextFormat = myFormat; msg.background = false; msg.border = false; msg.selectable = false; msg.type = TextFieldType.DYNAMIC; msg.textColor = 0x000000; msg.antiAliasType = AntiAliasType.ADVANCED; msg.embedFonts = true; msg.text = msgWords; //set position msg.x = rectX + rectW/2 - msg.width/2; msg.y = rectY + rectH/5; } } } I originally had the "init" function as a public static function so I could do "alert.init(stage);" from the swf, but it gave me this same error.
Flashgame TypeError: Error #1009 AND howto stoptimer   (202 Views)
, i'm making my first flash game but Ive run into some problems. Is there anyone here that can help Here is the game: http://www.2shared.com/file/gZfjkJFY/theGame.html Everytime I reach the next level I get this error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at Game_fla::MainTimeline/movecircle() I also want the timer to stop counting when I die or finnish. I've tried Code: if (platforms.currentFrame == platforms.totalFrames -1) { timer.stop(); } which didn't work.
CS4: Error #1009   (129 Views)
I'm making an interactive video in Flash for a class. I'm having trouble when importing more than one video. Whenever I do, I get this error (Error #1099): Cannot access a property or method of a null object reference. This error occurs in Scene 3 specifically. I have tried re-importing the video, but that didn't fix it. Below is the ActionScript I'm attempting to use. ActionScript 3.0: Scene 1: stop(); /*tell both buttons to listen for a click and if there is a click, to perform a specific function*/ myPlayButton.addEventListener(MouseEvent.CLICK, StartMovie); myStopButton.addEventListener(MouseEvent.CLICK, StopMovie); mySkipButton.addEventListener(MouseEvent.CLICK, SkipMovie); //start the movie function StartMovie(evt:MouseEvent):void { forestIntro.play(); } //stop the movie function StopMovie(evt:MouseEvent):void { forestIntro.stop(); } //skip the movie function SkipMovie(evt:MouseEvent):void { gotoAndPlay(1,"Scene 2"); } Scene 2: stop(); myForestButton.addEventListener(MouseEvent.CLICK, SkipMovie2); function SkipMovie2(evt:MouseEvent):void { gotoAndPlay(1,"Scene 3"); } Scene 3: stop(); /*tell both buttons to listen for a click and if there is a click, to perform a specific function*/ myPlayButton2.addEventListener(MouseEvent.CLICK, StartMovie2); myStopButton2.addEventListener(MouseEvent.CLICK, StopMovie2); mySkipButton2.addEventListener(MouseEvent.CLICK, SkipMovie3); //start the movie function StartMovie2(evt:MouseEvent):void { forestIntro2.play(); } stop the movie function StopMovie2(evt:MouseEvent):void { forestIntro2.stop(); } //skip the movie function SkipMovie3(evt:MouseEvent):void { gotoAndPlay(1,"Scene 4"); }
Error 1009 at MethodInfo-6   (193 Views)
So I'm making a game and I keep getting this error; TypeError: Error #1009: Cannot access a property or method of a null object reference. at MethodInfo-6() And I'm really not sure why. Or what MethodInfo 6 is. If anyone would mind taking a look at what I have/have any ideas or advice I'd appreciate it forever! I uploaded the file here; this! Muchas Gracias!
1009 Error, for no noticeable reason   (184 Views)
I am a complete rookie when it comes to flash, but I have coded in many programming languages before this. The reason why I am so totally confused as to why this error is occurring, is simply because I didn't change any code to get this error. I was messing around with a glow filter, I test my game and BOOM. The infamous 1009 error apears when I test my little game. =[ I even pressed Ctrl + Z a million times to get back to a state where I knew my project worked, but I still get the same error. I get an output error of: "TypeError: Error #1009: Cannot access a property or method of a null object reference. at DocumentMain/enterFrameHandler()" Can anyone think of any quick fixes Thank you very much for any help. =] Here's my code - pastebin(D O T)com(S L A S H)DfN3h8ye
Between Errors 1009 and 1010   (183 Views)
Obviously I have not assigned correct instances hence the errors though I spent hours reading the relevant posts. The problem seems to be that I don't know how to define the instance "shut" of close_btn inside the instance "popup1" of 01_mc_master. The line giving the error 1009 is: popup1.shut.close_btn.addEventListener(MouseEvent. CLICK, closebuttClick); and the 1010: popup1.close_btn.addEventListener(MouseEvent.CLICK , closebuttClick); Thank you for directing me here. Maciek
1009 error   (196 Views)
I have just started action scripting......not doing very difficult stuff, just giving the navigation for an application.....got stuck and getting this error TypeError: Error #1009: Cannot access a property or method of a null object reference. at aug_19_2011_03_fla::MainTimeline/frame139() at flash.display::MovieClip/gotoAndPlay() at aug_19_2011_03_fla::MainTimeline/onloginclick() here is the entire code findmycar_btn.addEventListener(MouseEvent.CLICK,onf indmycarclick); locatedealer_btn.addEventListener(MouseEvent.CLICK ,onlocatedealerclick); mymazda_btn.addEventListener(MouseEvent.CLICK,onmy mazdaclick); maintenance_btn.addEventListener(MouseEvent.CLICK, onmaintenanceclick); service_btn.addEventListener(MouseEvent.CLICK,onse rviceclick); function onfindmycarclick(e:MouseEvent):void { gotoAndPlay("findmycar"); } function onlocatedealerclick(e:MouseEvent):void { gotoAndPlay("locatedealer"); } function onmymazdaclick(e:MouseEvent):void { gotoAndPlay("mymazda"); } function onmaintenanceclick(e:MouseEvent):void { gotoAndPlay("maintenance"); } function onserviceclick(e:MouseEvent):void { gotoAndPlay("service"); } offers_btn.addEventListener(MouseEvent.CLICK,onoff ersclick); function onoffersclick(e:MouseEvent):void { gotoAndPlay("offers") } recall_btn.addEventListener(MouseEvent.CLICK,onrec allclick); function onrecallclick(e:MouseEvent):void { gotoAndPlay("recall") } The moment i am adding recall button during the end i am getting this error..please help me to sort out this.
stage.stageWidth & Height not working: 1009   (210 Views)
I've decided to start re-writing my project, but this time making the use of class files rather than nesting code inside my MovieClips. Now it's come to the "message box" that I previously wrote, and I'm having some troubles. (note: I don't really want to download a pre-built one as my message box class end up being the backbone for several custom interfaces). The problem is that I cannot, for the life of me, figure out why my message box class cannot access "stage.stageWidth", "stage.stageHeight", "MovieClip(root).currentWidth", etc. I'm rather hoping that someone will be able to shed some light on what I'm hoping is a novice error. (I'm very new to using class files.. as in.. this project new). This is the code for the working "messageBox.as": ActionScript Code: package com.components{ import flash.display.Shape; import flash.display.MovieClip; public class messageBox extends MovieClip { public function messageBox():void { drawBacking(); } public function drawBacking():void { var rectangle:Shape = new Shape ;// initializing the variable named rectangle rectangle.graphics.beginFill(0x000000); rectangle.graphics.drawRect(0, 0, 100, 100); rectangle.graphics.endFill(); rectangle.alpha=0.5; addChild(rectangle); } public function clear():void { var num:int = this.numChildren; for (var i:int=0; i
papervision3d typeerror error 1009   (205 Views)
, I have following error when using papervision3d, setting "mouse3D.enabled = true;" in Lines3D typeerror error 1009 cannot access a property or method of a null object reference at org.papervision3d.core.utils::Mouse3D/updatePosition() at org.papervision3d.core.utils::InteractiveSceneMana ger/handleEnterFrame() Anyone know how to fix the problem.
CS3 TypeError #1009 when using a preloader   (147 Views)
I keep getting the same error message ever since I tried adding a preloader. Everything seems to function properly, but obviously there's something wrong. Does anyone know how to fix this TypeError: Error #1009: Cannot access a property or method of a null object reference. at CaptainSUL_fla::MainTimeline/onProgress() heres my script: stop(); this.loaderInfo.addEventListener(ProgressEvent.PRO GRESS, onProgress); this.loaderInfo.addEventListener(Event.COMPLETE, onComplete); function onProgress(e:ProgressEvent):void { var loaded:Number = e.target.bytesLoaded; var total:Number = e.target.bytesTotal; var pct:Number = loaded/total; loader_mc.scaleX = pct; loaded_txt.text = "Loading..."+(Math.round(pct*100))+"%"; } function onComplete(e:Event):void { gotoAndStop("2"); }
Error 1009 Null object reference   (144 Views)
Guys, So I embed a graphic, [Embed(source = "../../../_site/graphics/pinksquare.png", mimeType="application/octet-stream")] public var pub_graph1:Class; and then I reference it to render it as a bitmap. var var_bmpImage:BitmapData = (new pub_graph1() as Bitmap).bitmapData; this is where the problem lies. I can trace pub_graph1() right before this line of code and it comes back [class achieve_pub_graph1] I can't figure out what is causing this error. Any Ideas
TypeError: Error #1009: Cannot access a property or method of a null object reference   (131 Views)
Just starting to delve into as3. I have made a flash website with four navigation buttons (home, products, about, contact). When user clicks on "products", an external movie clip is loaded and everything works fine. User clicks any button after that, and myLoader.unloadAndStop, the swf is removed when you navigate away from "products". However, if the "home", "about", or "contact" buttons are clicked first (before the external swf has been loaded), it of course, throws the 1009 error. I need some sort of if/else statement to check whether or not the external swf is loaded, remove it if it is, and if not, just navigate to the "page" clicked. buttons code: home_mc.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler); home_mc.buttonMode = true; home_mc.useHandCursor = true; function fl_MouseClickHandler(event:MouseEvent):void { myLoader.unloadAndStop(); gotoAndStop("home"); } products_mc.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler2); products_mc.buttonMode = true; products_mc.useHandCursor = true; function fl_MouseClickHandler2(event:MouseEvent):void { gotoAndStop("products"); } about_mc.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler3); about_mc.buttonMode = true; about_mc.useHandCursor = true; function fl_MouseClickHandler3(event:MouseEvent):void { myLoader.unloadAndStop(); gotoAndStop("about"); } contact_mc.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler4); contact_mc.buttonMode = true; contact_mc.useHandCursor = true; function fl_MouseClickHandler4(event:MouseEvent):void { myLoader.unloadAndStop(); gotoAndStop("contact"); } "products" code: var myLoader:Loader = new Loader(); var url:URLRequest = new URLRequest("newTees/newTees.swf"); myLoader.load(url); addChild(myLoader); myLoader.x = 262; myLoader.y = 150;
TypeError: Error #1009   (158 Views)
Hi - This error occurs whenever I return to a particular frame that contains the following AS... import fl.controls.UIScrollBar; my_text.addEventListener(Event.SCROLL,updateScroll Bar); function updateScrollBar(evt:Event):void{ my_scroll.update(); } var req:URLRequest = new URLRequest("external.txt"); var loader:URLLoader = new URLLoader(); function fileLoaded(event:Event):void { my_text.text = loader.data; } loader.addEventListener(Event.COMPLETE, fileLoaded); loader.load(req); This is the first frame of the movie that contains a dynamic text control that is loaded with the contents of an external text file. There is no problem when it first loads, the error occurs when I return to this frame from another one. I suspect the problem is with the addEventListener but I do not know how to handle this. Please help
Preloader pops TypeError: Error #1009:   (129 Views)
Hi to you all. I've made preloaders in the past, but now I'm getting this error, and I don't know what is exactly the problem. TypeError: Error #1009: Cannot access a property or method of a null object reference at com.mugui::Footer() If I erase all references of the footer from my Main Class the flash works normal. So the problem comes from my footer, but why. My main class: Code: public class MuguiMain extends MovieClip { private var contentHolder:Sprite = new Sprite; private var mainContent:MainContent = new MainContent(); private var footer:Footer = new Footer(); private var loader:Loader; private var swfContent:MovieClip; private var swfContentHolder:Sprite = new Sprite(); public function MuguiMain():void { this.addEventListener(Event.ENTER_FRAME, preload); } public function preload (e:Event):void { var total:Number = this.stage.loaderInfo.bytesTotal; var loaded:Number = this.stage.loaderInfo.bytesLoaded; loaderText.text = Math.floor((loaded/total)*100) + "%"; if(total == loaded) { gotoAndStop("ini"); this.removeEventListener(Event.ENTER_FRAME, preload); MuguiIni(); } } public function MuguiIni():void { addEventListener("clickCatalogo", clickCatalogo,false,0,true); addEventListener("clickClose", unLoadSwf,false,0,true); addEventListener("clickInicio", clickInicio,false,0,true); addEventListener("clickQuienes", clickQuienes,false,0,true); addChild(contentHolder); contentHolder.addChild(mainContent); contentHolder.addChild(footer); } My footer class: Code: public function Footer():void { this.x = 1000; this.y = 432; catalogoBtn.addEventListener(MouseEvent.CLICK, clickCatalogo,false,0,true); TweenMax.to(this,2,{x:523, ease:Expo.easeOut}); catalogoBtn.buttonMode = true; } public function clickCatalogo(e:MouseEvent):void { dispatchEvent(new Event("clickCatalogo",true)); } } } Hope anyone can spot the problem. Thank in advance for any hint on this issue. Greetings.