SEARCH YOUR SOLUTION HERE  

TypeError: Error #1009: Cannot access a property or method of a null object reference

hello, I'm new to flash and AS3, so maybe this is a dumb question but, I have a preloader that I want to tween down the alpha and move to the next frame. I have a tween variable tweening the alpha channel down to 0 and adding an event listener that moves to the next frame. here's my code:

Code: stop(); this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, 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; } function onComplete(e:Event):void { var loaderTween:Tween = new Tween(loaderOutline_mc,"alpha",Strong.easeOut,1,0,1,true) var loaderTween2:Tween = new Tween(loader_mc,"alpha",Strong.easeOut,1,0,1,true) } //************NEEDS TO BE CORRECTED************* loader_mc.addEventListener (Event.ENTER_FRAME, menuLoad); function menuLoad (event:Event):void { //trace(loader_mc.alpha) if (loader_mc.alpha==0) { nextFrame(); loader_mc.removeEventListener (Event.ENTER_FRAME, menuLoad); } } when I run the application it moves to the next frame, however I get an error code that repeats consecutively reading:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Production_6_fla::MainTimeline/menuLoad()

and does not stop repeating. I can still run the program but this is really making everything run super slow... I commented out everything in the "if statement" seperately and evrything outside of the "if statement"to see where the problem lies. the problem is in the nextFrame(); code.

I tried to add "stage.nextFrame(); but that did not work, and Stage.nextFrame(); and gotoAndStop(2); and stage.gotoAndStop(2); and I really can't figure out what is going on... I'm banging my head against the wall on this one.

Posted On: Thursday 25th of October 2012 10:53:27 PM Total Views:  391
View Complete with Replies




Related Messages:

papervision3d typeerror error 1009   (188 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.
syntax error   (307 Views)
I have an old AS2 application that I am updating to AS3. When I run the application I get an error 1087: Syntax error: extra characters found after end of program. It refers to Frame 21, line 1 and the source sited in the compile out box window is: on (release) { But when I go to Frame 21, line 1, I don't see any on(release) functions if I search the action script for that frame there are no on (release) { functions. If I double click the error it usually takes me to the spot in the code where the error is located but it doesn't do that either. So what is this error telling me How do I find the on (release) { function it's complaining about
swf error only the first time   (151 Views)
I have a main.swf that contains 3 swfs (one.swf, two.swf, three.swf). If I go to three.swf , it gives an error (TypeError: Error #1009). However, if I go to two.swf and return to three.swf, it works. I don't know why Thank you
class error - must subclass   (156 Views)
I've made a movie clip with buttons in it called 'myContent'. I want each button to reference a different video in the video player on the main stage. This movie clip is linked to a scrollpane, since there is not enough real-estate. I right clicked on the myContent movie clip in the library and chose 'export for actionscript' under properties. then used the script: scrollPane.source=myContent; scrollPane.setSize(205, 500); to get the scroll bar to work. When I add the script in the myContent movie clip to reference the different videos I get a few errors: 1152: A conflict exists with inherited definition flash.displayisplayObject.name in namespace public. 5000: The class 'fl.controls.ScrollBar' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type. It seems I must tell the scroll bar to look in a subclass When I get rid of the script telling it to load the videos, the scroll bar works and I get no errors, but when I put in the script to load the videos, its a major malfunction. Any ideas would be much appreciated.
Loading External Swf error   (130 Views)
Basically I'm trying to load a swf into another swf. This is the code I'm using: Code: function startLoad() { var mLoader:Loader = new Loader(); var mRequest:URLRequest = new URLRequest("http://henshouse.com/Adrenaline.swf"); mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler); mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler); mLoader.load(mRequest); } function onCompleteHandler(loadEvent:Event) { addChild(loadEvent.currentTarget.content); } function onProgressHandler(mProgress:ProgressEvent) { var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal; percentText.text = String(Math.floor(percent*100)); trace(Math.floor(percent*100)); } startLoad(); It loads the swf properly, but at some point in the loaded swf, some functions are called, and a ton of errors are thrown at me. Code: *** Security Sandbox Violation *** SecurityDomain 'http://henshouse.com/Adrenaline.swf' tried to access incompatible context 'file:///C|/Documents%20and%20Settings/Henry%20Hauser/My%20Documents/HensHouse%20Files/Flash/Main.swf' SecurityError: Error #2070: Security sandbox violation: caller http://henshouse.com/Adrenaline.swf cannot access Stage owned by file:///C|/Documents%20and%20Settings/Henry%20Hauser/My%20Documents/HensHouse%20Files/Flash/Main.swf. at flash.display::Stage/flash.display:Stage::requireOwnerPermissions() at flash.display::Stage/addEventListener() at Control/::makeBegin() at Control/::makeShip() at Control/::gotoGame() I honestly have no idea what this error means and how to fix it.
Sending mail using AS 3.0 error.   (223 Views)
I made an email form and it sends data entered in the form as httpservice to the url where the php file is hosted which contains the mail() call. During testing and locally it gets sent to my email id. But when I embed it website it throws the following error. Code: [RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:220] at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:53] at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103] at DirectHTTPMessageResponder/securityErrorHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:389] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/redirectEvent() Why is it so. Is it some security sandbox something something.. (don't know much about that in detail). I'm trying to send the data to my gmail account. What should I do. I'm using Flex 3 (any way its not possible via Flash too) Instead of relying on server side script like php, can I directly send it to my gmail account (or any other possible mail account) using server sockets (binary). Can you please guide me. After a lot of googling I found that there must be some file that verifies some ports etc. If so how to setup Please help. Thank You.
SQL Row insertion error   (140 Views)
SQLite Row insertion error I use an AIR made program called sqliteadmin. I created a database called myDatabase.db Created a table like: CREATE TABLE cs (req TEXT, res TEXT); then trying to populate: INSERT INTO cs (req, res) VALUES('', 'Hi'); // Error # 3115when executing this query Any idea how to do it Please help. Thank You
where to add Event.ADDED_TO_STAGE with error #1009   (379 Views)
. I have an error code #1009 and have been googling around and found a lot of links, yet I'm not sure where to put the Event.ADDED_TO_STAGE to make my project work. The error code is Code: TypeError: Error #1009: Cannot access a property or method of a null object reference. at be.boulevart.google.ajaxapi.translation::GoogleTranslation/onResponse() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() and my as3 code is: Code: package{ import flash.display.*; import flash.events.*; import gs.*; import fl.motion.easing.*; import framework.utils.LoadXML; import be.boulevart.google.ajaxapi.translation.*; import be.boulevart.google.ajaxapi.*; import be.boulevart.google.ajaxapi.search.* import be.boulevart.google.apicore.GoogleApiKeyStore; import be.boulevart.google.events.*; public dynamic class wotd_widget extends MovieClip{ //vars var loadXML:LoadXML = new LoadXML('http://wordsmith.org/awad/rss1.xml',onComplete); private var mc01:MovieClip; private var mclayout:MovieClip; //constructor public function wotd_widget():void{ trace('wotd'); init_btn(); } private function onComplete($xml:XML):void{ trace($xml.channel.item[0].title); trace($xml.channel.item[0].description); wotd_In.text = $xml.channel.item[0].title; des_In.text = $xml.channel.item[0].description; var gt:GoogleTranslation = new GoogleTranslation(); gt.translate($xml.channel.item[0].title,'en','de'); gt.addEventListener(GoogleApiEvent.TRANSLATION_RESULT,onTranslate); } private function onTranslate(e:GoogleApiEvent):void{ trans_In.text = e.data.result; } private function init_btn():void{ this.mc01 = new trans_btn; this.mc01.x = 340.9; this.mc01.y = 234.4; addChild(this.mc01); TweenMax.to(this.mc01,1,{x:340.9, y:234.4, ease:Cubic.easeOut,onComplete:onComplete1}); } private function onComplete1():void{ this.mc01.buttonMode = true; this.mc01.addEventListener(MouseEvent.ROLL_OVER,mEvent01); this.mc01.addEventListener(MouseEvent.ROLL_OUT,mEvent01); this.mc01.addEventListener(MouseEvent.CLICK,mEvent01); } function mEvent01(e:MouseEvent):void{ switch(e.type){ case 'rollOver': //this executes when you rollover the target TweenMax.to(MovieClip(e.target),0,{tint:0xFF75B6}); break; case 'rollOut': //this executes when you rolloff the target TweenMax.to(MovieClip(e.target),0,{removeTint:true}); break; case 'click': //this executes when you click the target onClick01(); break; } } private function onClick01():void{ var gt:GoogleTranslation = new GoogleTranslation(); gt.translate(input_trans.text,'en','de'); gt.addEventListener(GoogleApiEvent.TRANSLATION_RESULT,onTranslation); } function onTranslation(e:GoogleApiEvent):void{ trace(e.data.to); trace(e.data.orig); trace(e.data.from); trace(e.data.result); output_trans.text = e.data.result; } } } NEED YOUR HELP REALLY REALLY FAST!
google translate and error code   (156 Views)
! I'm pretty new to AS3 and have a problem. I'm trying to build a WOTD (where the WOTD gets translated into German) widget and an extra add-on that is a input text translator. The WOTD part works fine but my translator isn't. I'm using a google translation api btw. At the moment when clicking on my translate button I get Error Code #1009: TypeError: Error #1009: Cannot access a property or method of a null object reference. at be.boulevart.google.ajaxapi.translation::GoogleTra nslation/onResponse() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() here's my code and I'd really appreciate any help! Code: package{ import flash.display.*; import flash.events.*; import gs.*; import fl.motion.easing.*; import framework.utils.LoadXML; import be.boulevart.google.ajaxapi.translation.*; import be.boulevart.google.ajaxapi.*; import be.boulevart.google.ajaxapi.search.* import be.boulevart.google.apicore.GoogleApiKeyStore; import be.boulevart.google.events.*; public dynamic class wotd_widget extends MovieClip{ //vars var loadXML:LoadXML = new LoadXML('http://wordsmith.org/awad/rss1.xml',onComplete); private var mc01:MovieClip; private var mclayout:MovieClip; //constructor public function wotd_widget():void{ trace('wotd'); init(); init_btn(); } private function onComplete($xml:XML):void{ //trace($xml); trace($xml.channel.item[0].title); trace($xml.channel.item[0].description); wotd_In.text = $xml.channel.item[0].title; des_In.text = $xml.channel.item[0].description; var gt:GoogleTranslation = new GoogleTranslation(); gt.translate($xml.channel.item[0].title,'en','de'); gt.addEventListener(GoogleApiEvent.TRANSLATION_RESULT,onTranslate); } private function onTranslate(e:GoogleApiEvent):void{ //trace(e.data.to); //trace(e.data.orig); //trace(e.data.from); //trace(e.data.result); trans_In.text = e.data.result; } private function init_btn():void{ this.mc01 = new trans_btn(); this.mc01.x = 340.9; this.mc01.y = 234.4; addChild(this.mc01); TweenMax.to(this.mc01,1,{x:340.9, y:234.4, ease:Cubic.easeOut,onComplete:onComplete1}); } private function onComplete1():void{ this.mc01.buttonMode = true; this.mc01.addEventListener(MouseEvent.ROLL_OVER,mEvent01); this.mc01.addEventListener(MouseEvent.ROLL_OUT,mEvent01); this.mc01.addEventListener(MouseEvent.CLICK,mEvent01); } function mEvent01(e:MouseEvent):void{ switch(e.type){ case 'rollOver': //this executes when you rollover the target TweenMax.to(MovieClip(e.target),0,{tint:0xFF75B6}); break; case 'rollOut': //this executes when you rolloff the target TweenMax.to(MovieClip(e.target),0,{removeTint:true}); break; case 'click': //this executes when you click the target onClick01(); break; } function onClick01():void{ var gt2:GoogleTranslation = new GoogleTranslation(); gt2.translate(input_trans.text,'en','de'); gt2.addEventListener(GoogleApiEvent.TRANSLATION_RESULT,onTranslate2); } function onTranslate2(e:GoogleApiEvent):void{ trace(e.data.to); trace(e.data.orig); trace(e.data.from); trace(e.data.result); output_trans.text = e.data.result; } }
Oversized graphic... no error?   (151 Views)
I'm building out an engine where the developer will commonly be externally loading large bitmaps. I understand that Flash has bitmap size restrictions, and I provide the developers a way around this. However, I am trying to find a way to throw them an error when they attempt to load a bitmap that is too large. Flash does not seem to throw an error when it loads an oversized bitmap. The ProgressEvent.PROGRESS handler just counts all the way up to 100%, but the COMPLETE event never fires and the image never appears. It just silently fails. Does anyone know how to capture an event when a bitmap fails to load/display because it's too large
Argument error 2109 when buttons are clicked   (138 Views)
, I'm still a newbie when it comes as3. I am working on a website and I have my buttons within a MC and they are revealed when you rollover the MC. buttons are independent buttons from my library and they each have unique instance names. These very instance names for the buttons match frame labels that I have in the first scene/main timeline. Here is the argument error that I receive when I click on one of my four buttons: ArgumentError: Error #2109: Frame label instance7 not found in scene Scene 1. at flash.display::MovieClip/gotoAndPlay() at secondsdwebsite2_fla::MainTimeline/btnClick() Here is the only code I have (the rest are "stop();" scripts in the places need): --------------------------------------------------------------------------------- stop(); main_btn.addEventListener(MouseEvent.MOUSE_OVER, slidein); main_btn.addEventListener(MouseEvent.MOUSE_OUT, slideout); function slidein(event:MouseEvent):void { buttons.play(); } function slideout(event:MouseEvent):void { buttons.stop(); } buttons.addEventListener(MouseEvent.CLICK, btnClick); var btnName = ""; function btnClick(event:MouseEvent):void { btnName = event.target.name; gotoAndPlay(btnName); } /* works_btn.buttonMode=true; about_btn.buttonMode=true; contact_btn.buttonMode=true; resume_btn.buttonMode=true; works_btn.useHandCursor=true; about_btn.useHandCursor=true; contact_btn.useHandCursor=true; resume_btn.useHandCursor=true; */ --------------------------------------------------------------------------------------- Please tell me what I'm doing wrong. Better yet, how can I fix it
simple error but dunno what the problem is   (152 Views)
anyone!!help me!! this is driving me insane!!! i got this error Cannot access a property or method of a null object reference. whenever I clicked on my button Code: TypeError: Error #1009: Cannot access a property or method of a null object reference. at test_fla::MainTimeline/onClick() I know it means that the onClick is not on the stage,but I do put my buttons all in the same frame with the actionscript here is my full actionscript,simple switch case Code: stop(); play_btn.addEventListener(MouseEvent.CLICK, onClick); instruction_btn.addEventListener(MouseEvent.CLICK, onClick); option_btn.addEventListener(MouseEvent.CLICK, onClick); score_btn.addEventListener(MouseEvent.CLICK, onClick); quit_btn.addEventListener(MouseEvent.CLICK, onClick); function onClick(evt:MouseEvent):void { switch (evt.target) { case play_btn : trace("play"); content_mc.gotoAndPlay("play"); break; case instruction_btn : content_mc.gotoAndPlay("instruction"); break; case option_btn : content_mc.gotoAndPlay("option"); break; case score_btn : content_mc.gotoAndPlay("score"); break; case quit_btn : fscommand("quit"); break; } } the trace can works but not the link i'm desperate :'(
Sprite trying to remove itself from the stage is throwing errors.   (187 Views)
I'm trying to have a bullet Sprite remove itself from the stage once it is off the stage, but Flash keeps throwing #1009 errors at me. I've looked over the code several times and don't understand what's wrong. Bullet code: Code: package { import flash.display.Sprite; import flash.display.MovieClip; import flash.events.*; public class Bullet extends Sprite { private var bullet_direction; private var bullet_speed; public function Bullet(xLoc:Number, yLoc:Number, angle:Number, speed:Number) { x = xLoc; y = yLoc; bullet_direction = angle; bullet_speed = speed; addEventListener(Event.ENTER_FRAME, BulletMovement,false,0,true); } public function BulletMovement(e:Event) { y -= bullet_speed * Math.sin(bullet_direction); x += bullet_speed * Math.cos(bullet_direction); if ( x > 500 || x < -20 || y > 660 || y < -20 ) { DestroyBullet(); } } public function DestroyBullet():void { removeEventListener(Event.ENTER_FRAME, BulletMovement); (stage as MovieClip).removeChild(this); } } } Error message: Code: TypeError: Error #1009: Cannot access a property or method of a null object reference. at Bullet/DestroyBullet() at Bullet/BulletMovement()
navigateToURL error????   (135 Views)
Hi I am having issues with a navigateToURL command in AS3. When I run it in flash i get no errors but when i publish the file i get the following error: SecurityError: Error #2148: SWF file file:///C:/Users/jack bauer/Documents/Flash Projects/Banner2.swf cannot access local resource xml/links.xml. Only local-with-filesystem and trusted local SWF files may access local resources. at flash.net::URLStream/load() at flash.net::URLLoader/load() at Banner2_fla::MainTimeline/frame1() I have also posted the AS3 code related to this navigation below and i hope someone can help. thanks! stop(); var linkList:Array = [];// this array has the link information stored in it var xmlURLLoad:URLLoader = new URLLoader();//variable to load an XML var xmlURLReq:URLRequest = new URLRequest("xml/links.xml");//Variable to request a specific XML file var a:Number = 0; xmlURLLoad.load(xmlURLReq); xmlURLLoad.addEventListener(Event.COMPLETE, dataLoaded);//event listener to listen for when the data is loaded function dataLoaded(event:Event):void {//function to do something once the XML data is loaded var xmlData:XML = new XML (xmlURLLoad.data); var n:Number = xmlData.url.length();//variable to assign a number to how many videos there are //These are the event listeners that are listening for certain actions to be performed on certain objects peopleBttn.addEventListener(MouseEvent.MOUSE_DOWN, peopleStart); projectsBttn.addEventListener(MouseEvent.MOUSE_DOWN, projectsStart); collabBttn.addEventListener(MouseEvent.MOUSE_DOWN, collabStart); while(a < n){ linkList.push(xmlData.url[a]); a++; } /////////////////////////////////////////////////////////////////////// ///////////////////////////FUNCTIONS/////////////////////////////////// /////////////////////////////////////////////////////////////////////// function peopleStart(evt:Event):void { navigateToURL(new URLRequest(linkList[0]),"_self"); trace(linkList[0]); } function projectsStart(evt:Event):void { navigateToURL(new URLRequest(linkList[1]),"_self"); trace(linkList[1]); } function collabStart(evt:Event):void { navigateToURL(new URLRequest(linkList[2]),"_self"); trace(linkList[2]); } } /////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
60 sec upload generates error   (192 Views)
I'm uploading multiple files to my server with the fileReferenceList. But it seems like if the upload takes more than 60 sec I get a error message. I found this might be the problem, but I cant get it to work anyway. Anybody knows how to fix this problem..
I keep getting this error: TypeError: Error #1034: Please help!   (272 Views)
I keep getting this error and I'm not sure why. TypeError: Error #1034: Type Coercion failed: cannot convert flash.text::TextField@3a062121 to fl.controls.TextArea. at SrHome_fla::MainTimeline/frame3() at flash.display::MovieClip/gotoAndPlay() at SrHome_fla::intro_mc_3/frame139() I am fairly new at this As 3.0 stuff so bare with me if this is an easy fix. Here is the code that I am using that produces that error. import fl.controls.*; var info_txt:TextArea = photoArea_mc.photoSquare_mc.info_txt; var image:XML = new XML(); image.@fileName = "pic1.jpg"; image.photographer = "Photographer 1"; info_txt.text = image.photographer; stop();
AS3 Image Map Linking Issue - No compiler errors   (202 Views)
, I've made an image map in Flash using AS3, however it does not seem to be working properly. The links only work in a strange succession. In order to click all the links you must first click the last link followed by the first link, then the second link. After that the image map behaves as it is supposed to. I'm not sure why this is happening. It complies without error and aside from the little quirk mentioned above, it works beautifully. I've checked and double checked the AS, even copied and pasted some code from one button to another to see if it would make a difference, but to no avail. I am using the code listed below: [codebox] button1.addEventListener(MouseEvent.CLICK, callLink1); function callLink1 (event: MouseEvent) :void { var url:String = ("http://www.google.com"); var request:URLRequest = new URLRequest (url); try { navigateToURL (request, "_parent"); } catch (e:Error) { trace ("Error occurred!"); } [/codebox] Any and all help would be much appreciated,
Need help with a 1119 error plz   (126 Views)
Description 1119:Access of possibly undefined property myLoader through a reference with static type flash.display.DisplayObjectContainer. Source this.parent.myLoader.load(new URLRequest(event.target.name + ".swf")); I am pretty new to CS3 and i cant understand why i am getting this compiler error. The source is in a mc with buttons of the same name as the external swfs it loads. This mc is in my main Timeline. I cant get my main Timeline(menu) to load any external swf. I would really appreciate some advice on this problem if anyone can.
error message   (164 Views)
TypeError: Error #1009: Cannot access a property or method of a null object reference. at play_fla::MainTimeline/frame1() I am receiving this error message when my site loads. I have set up a simple flash button to go from frame 1 to frame 2. Frame 2 has a video on it and I am getting the above error message when the page loads. The url is http:www.apvoices.com/main Here is the code I have used to create the simple flash page. I am very new to AS3 so dont judge me forward_btn.addEventListener(MouseEvent.CLICK, moveForward); back_btn.addEventListener(MouseEvent.CLICK, moveBackward); function moveForward(e:MouseEvent):void { nextFrame(); //or gotoAndStop(2); } function moveBackward(e:MouseEvent):void { prevFrame(); //or gotoAndStop(1); }
1009 error after putting the preloader.   (375 Views)
i've put simple preloader on frame 1. since then i get an 1009 error message. I debugged the file and it seems like it is referring to 'franklin_button' but this is the button on the stage. i've checked the instance name thousand times and it is correct name. yet without the preloader, the whole thing works find without a problem. I do not see where it should have gone wrong. Please help! frame 1(preloader script) stop(); this.loaderInfo.addEventListener(ProgressEvent.PRO GRESS,checkLoadProgress); function checkLoadProgress(event:ProgressEvent):void { var progressPercentComplete:Number=(event.bytesLoaded / event.bytesTotal)*100; loaded_txt.text=String(Math.floor(progressPercentC omplete))+" %"; if (progressPercentComplete==100) { this.loaderInfo.removeEventListener(ProgressEvent. PROGRESS,checkLoadProgress); play(); } } frame 2(main script) stop(); var franklin:franklin_descprtion = new franklin_descprtion(); var tour:tour_d = new tour_d(); var clock:clock_d = new clock_d(); var identity:identity_d = new identity_d(); var buio:buio_d = new buio_d(); this.franklin_button.addEventListener(MouseEvent.M OUSE_OVER, mouseOverHandler); function mouseOverHandler(event:MouseEvent):void { this.franklin.x=264.6; this.franklin.y=36.6; addChild(franklin); } this.franklin_button.addEventListener(MouseEvent.M OUSE_OUT, mouseOutHandler); function mouseOutHandler(event:MouseEvent):void { this.removeChild(franklin); } this.franklin_button.addEventListener(MouseEvent.M OUSE_DOWN, mouseDownHandler); function mouseDownHandler(event:MouseEvent):void { var jscommand1:String="window.open('http://www.0303pm.net/motion/frank.mov','win','height=350,width=300,toolbar=no, scrollbars=yes');"; var url1:URLRequest=new URLRequest("javascript:"+jscommand1+" void(0);"); navigateToURL(url1, "_blank"); } this.identity_button.addEventListener(MouseEvent.M OUSE_OVER, mouseOverHandler_1); function mouseOverHandler_1(event:MouseEvent):void { this.identity.x=196.9; this.identity.y=91.6; this.addChild(this.identity); } this.identity_button.addEventListener(MouseEvent.M OUSE_OUT, mouseOutHandler_1); function mouseOutHandler_1(event:MouseEvent):void { this.removeChild(this.identity); } this.identity_button.addEventListener(MouseEvent.M OUSE_DOWN, mouseDownHandler_1); function mouseDownHandler_1(event:MouseEvent):void { var jscommand1:String="window.open('http://www.0303pm.net/motion/identity.mov','win','height=350,width=300,toolbar= no,scrollbars=yes');"; var url1:URLRequest=new URLRequest("javascript:"+jscommand1+" void(0);"); navigateToURL(url1, "_blank"); } this.buio_button.addEventListener(MouseEvent.MOUSE _OVER, mouseOverHandler_2); function mouseOverHandler_2(event:MouseEvent):void { this.buio.x=558.5; this.buio.y=314.6; this.addChild(this.buio); } this.buio_button.addEventListener(MouseEvent.MOUSE _OUT, mouseOutHandler_2); function mouseOutHandler_2(event:MouseEvent):void { this.removeChild(this.buio); } this.buio_button.addEventListener(MouseEvent.MOUSE _DOWN, mouseDownHandler_2); function mouseDownHandler_2(event:MouseEvent):void { var jscommand1:String="window.open('http://www.0303pm.net/motion/buio.avi','win','height=350,width=300,toolbar=no,s crollbars=yes');"; var url1:URLRequest=new URLRequest("javascript:"+jscommand1+" void(0);"); navigateToURL(url1, "_blank"); } this.tour_button.addEventListener(MouseEvent.MOUSE _OVER, mouseOverHandler_3); function mouseOverHandler_3(event:MouseEvent):void { this.tour.x=212.5; this.tour.y=359; this.addChild(this.tour); } this.tour_button.addEventListener(MouseEvent.MOUSE _OUT, mouseOutHandler_3); function mouseOutHandler_3(event:MouseEvent):void { this.removeChild(this.tour); } this.tour_button.addEventListener(MouseEvent.MOUSE _DOWN, mouseDownHandler_3); function mouseDownHandler_3(event:MouseEvent):void { var jscommand:String="window.open('http://www.0303pm.net/motion/tour.avi','win','height=350,width=300,toolbar=no,s crollbars=yes');"; var url:URLRequest=new URLRequest("javascript:"+jscommand+" void(0);"); navigateToURL(url, "_blank"); } this.clock_button.addEventListener(MouseEvent.MOUS E_OVER, mouseOverHandler_4); function mouseOverHandler_4(event:MouseEvent):void { this.clock.x=985.8; this.clock.y=270.5; addChild(this.clock); } this.clock_button.addEventListener(MouseEvent.MOUS E_OUT, mouseOutHandler_4); function mouseOutHandler_4(event:MouseEvent):void { this.removeChild(this.clock); } this.clock_button.addEventListener(MouseEvent.MOUS E_DOWN, mouseDownHandler_4); function mouseDownHandler_4(event:MouseEvent):void { var jscommand1:String="window.open('http://www.0303pm.net/motion/clock.mov','win','height=350,width=300,toolbar=no, scrollbars=yes');"; var url1:URLRequest=new URLRequest("javascript:"+jscommand1+" void(0);"); navigateToURL(url1, "_blank"); } p.s. i also tried to seperate them on different scenes but this doesn't work either.