Access of undefined property (loader)

I am trying to run the simple code as following:
<fx:Script>
<![CDATA[
                              import flash.display.*;
                              import flash.net.URLRequest;
                              Security.allowDomain("www.youtube.com");
                              var url2:String = "image2.jpg";
                              var urlRequest:URLRequest = new URLRequest(url2);   //problem code
                              var loader:Loader = new Loader();     //problem code
                              loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_complete);   //problem code
                              loader.load(urlRequest);
                              addChild(loader);
                              function loader_complete(evt:Event):void {
                                        var target_mc:Loader = evt.currentTarget.loader as Loader;
                                        target_mc.x = (stage.stageWidth - target_mc.width) / 2;
                                        target_mc.y = (stage.stageHeight - target_mc.height) / 2;
                    ]]>
          </fx:Script>
However, I got errors saying
    'access of undefined property 'loader_complete'
    'access of undefined property 'loader'
    'access of undefined property 'loader'
    'access of undefined property 'loader'
    'access of undefined property 'urlReguest'
I haven't used Flash builder for a while and need some assistants. Any thoughts? Thanks for the help.

I am just testing some codes for youtube api. It seems like that I can't use the Loader Class properties. Not sure why.
I copied some code from the example in this website.
https://developers.google.com/youtube/flash_api_reference

Similar Messages

  • Access of undefined property...

    When trying to compile AS 3.0 in Flex Builder 2, I get
    errors. I just can't figure out why these properties are undefined.
    Here is the code and the errors follow:
    <mx:Script>
    <![CDATA[
    import flash.events.Event;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    var externalXML:XML;
    var loader:URLLoader = new URLLoader();
    var request:URLRequest = new URLRequest("myXML.xml");
    loader.load(request);
    loader.addEventListener(Event.COMPLETE, onComplete);
    function onComplete(event:Event):void
    var loader:URLLoader = event.target as URLLoader;
    if (loader != null)
    externalXML = new XML(loader.data);
    trace(externalXML.toXMLString());
    else
    trace("loader is not a URLLoader!");
    ]]>
    </mx:Script>
    Access of undefined property loader
    Access of undefined property request
    Access of undefined property loader
    Access of undefined property onComplete
    Any help is greatly appreciated.
    Dex

    Sorry, I found the answer here:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=587&threadid =1267500&enterthread=y

  • GotoAndStop error 1120:Access of undefined property on MC's loaded from .swc

    I am trying to tell a MovieClip added from a .swc library to do simple things like "gotoAndStop()" and all I get is a red X error message 1120: Access of undefined property whenever I do.
    I can add the MovieClip to the application and position it without any problem. I cannot make it do anything. In my Flash IDE library the CustomCheckBox()'s base class is
    import flash.display.MovieClip;
    import mx.flash.UIMovieClip;
         //  **** TRIED EACH IMPORT STATEMENT AND BOTH**** (NEITHER of which work at all).
    private var _checkPlaylist:MovieClip = new CustomCheckBox();
    private var _checkClassroom:MovieClip = new CustomCheckBox();
    _checkPlaylist.gotoAndStop(1);
    _checkClassroom.gotoAndStop(2);
    I can declare my CustomCheckBox as a MovieClip and in my Symbol Properties panel it's base class is — mx.flash.UIMovieClip — and it shows up just fine. I just can't make the thing stop or do anything else a MovieClip is supposed to be able to do.
    One of the other developers here who is way more advanced than I am also cannot get a ******* movie clip to stop either.
    I am new to Flash Builder — yet have been using Flash and AS3 for years and I have never had a more difficult time getting up to speed with a new technology than Flex / Flash Builder has become for me. I feel stupid that I keep spending days on end just trying to figure out basic things like this.

    I keep answering my own questions. When I added a gotoAndStop command to the referenced MC inside of the init function it stopped throwing that error at me. I was trying to initialize the button states after declaring them as MC variables, but the compiler did not like that.

  • Error, please help? 1120: Access of undefined property event

    I have ActionScript 3 in two frames of my piece. In this 2nd frame, I get an error: "1120: Access of undefined property event" for "myXML=XML(event.target.data);" Can anyone help? I am not sure how to fix this.
    var myloader:URLLoader=new URLLoader();
    myloader.dataFormat=URLLoaderDataFormat.VARIABLES;
    myloader.addEventListener(Event.COMPLETE, guestBookWriteFunc);
    function guestBookWriteFunc(e:Event):void{
              var loader:URLLoader=URLLoader(e.target);
              var vars:URLVariables=new URLVariables(loader.data);
              var url:String="makexml.asp";
                   var sendloader:URLLoader=new URLLoader();
                   var request:URLRequest=new URLRequest(url);
                   trace("xml page created");
    var urlRequest:URLRequest=new URLRequest("makexml.asp");
    var urlLoader:URLLoader=new URLLoader();
    urlLoader.addEventListener(Event.COMPLETE, fileLoaded);
    urlLoader.load(urlRequest);
    //Setting up the XML
    var myXML:XML=new XML();
    myXML.ignoreWhitespace=true;
    var xmlList:XMLList;
    //Setting up the data holder Arrays
    var theUserName:Array=new Array();
    var theUserEmail:Array=new Array();
    var theUserComment:Array=new Array();
    function fileLoaded(e:Event):void{
         myXML=XML(event.target.data);
         xmlList=myXML.children();
         for (var i:int=0; i<xmlList.length(); i++){
              var xmlName:String=xmlList[i].username;
              var xmlEmail:String=xmlList[i].useremail;
              var xmlComment:String=xmlList[i].usercomment;
              theUserName.push(xmlName);
              theUserEmail.push(xmlEmail);
              theUserComment.push(xmlComment);
              if(i==xmlList.length()-1){
                   updateText();
    //Populating the text field to display messages
    var maximumMessages:Number=5;
    var currentMessages:Number=0;
    function updateText(){
         guestText.htmlText="";
         for (var i=currentMessages; i<maximumMessages; i++){
                   guestText.htmlText+=("<b><u>Name:</u></b>" + theUserName[i]);
                   guestText.htmlText+=("<b><u>Email:</u></b>" + theUserEmail[i]);
                   guestText.htmlText+=("<b><u>Comment:</u></b>" + theUserComment[i]);
                   guestText.htmlText+=(".................................");
                   currentMessages=i;
                   myScroller.scrollTarget=guestText;

    You are more likely to get a reply if you ask in the Flash or ActionScript forum.

  • I am getting an error while coding between CS5 and Flash CC specifically: Access of undefined property instrument_txt. I am using a book that is made for CS5. Is there a current book or resources for Actionscript 3.0 and Flash CC?

    Scene 1, Layer 'actions', Frame 1, Line 47, Column 2
    1120: Access of undefined property instrument_txt.
    this is my problem. any ideas. thanks

    I did try this and nothing happened, same error codes. The code works fine from CS5 and CS6 Flash versions. The animation runs well, the text displays where it should in the instrument_txt frame. It is when I try this in Flash CC that it creates the code error. here was an error that came up regarding text problems, something with FLT text converted to another text (I am not sure of the name of the text-type and the "FLT" I am not sure of either).
    thanks

  • Access of undefined property _btn (problems with all my buttons)

    I keep getting this error:
    Scene 1, Layer 'actionscript', Frame 1, Line 1
    1120: Access of undefined property tennis1_btn.
    Scene 1, Layer 'actionscript', Frame 1, Line 7
    1120: Access of undefined property tennis2_btn.
    Scene 1, Layer 'actionscript', Frame 1, Line 13
    1120: Access of undefined property tennis3_btn.
    Scene 1, Layer 'actionscript', Frame 1, Line 19
    1120: Access of undefined property tennis4_btn.
    Scene 1, Layer 'actionscript', Frame 1, Line 25
    1120: Access of undefined property tennis5_btn.
    Scene 1, Layer 'actionscript', Frame 1, Line 31
    1120: Access of undefined property tennis6_btn.
    Here is a screen print of my code
    I'll also paste below:
    tennis1_btn.addEventListener(MouseEvent.CLICK, gotennis1);
    function gotennis1(event:MouseEvent):void {
              var gotennis1url:URLRequest= new URLRequest ("juniortennis.php");
              navigateToURL(gotennis1url,"_parent");
    tennis2_btn.addEventListener(MouseEvent.CLICK, gotennis2);
    function gotennis2(event:MouseEvent):void {
              var gotennis2url:URLRequest= new URLRequest ("adulttennis.php");
              navigateToURL(gotennis2url,"_parent");
    tennis3_btn.addEventListener(MouseEvent.CLICK, gotennis3);
    function gotennis3(event:MouseEvent):void {
              var gotennis3url:URLRequest= new URLRequest ("http://abbottsports.com/membership/memberships.php#tennis");
              navigateToURL(gotennis3url,"_parent");
    tennis4_btn.addEventListener(MouseEvent.CLICK, gotennis4);
    function gotennis4(event:MouseEvent):void {
              var gotennis4url:URLRequest= new URLRequest ("staff.php");
              navigateToURL(gotennis4url,"_parent");
    tennis5_btn.addEventListener(MouseEvent.CLICK, gotennis5);
    function gotennis5(event:MouseEvent):void {
              var gotennis5url:URLRequest= new URLRequest ("calendar.php");
              navigateToURL(gotennis5url,"_parent");
    tennis6_btn.addEventListener(MouseEvent.CLICK, gotennis6);
    function gotennis6(event:MouseEvent):void {
              var gotennis6url:URLRequest= new URLRequest ("tenniscourts.php");
              navigateToURL(gotennis6url,"_parent");
    Please help:  i have a couple of them types of menus but this is the only one that is giving me problems.  Here is the website I'm using them on:
    www.abbottsports.com  Working
    http://abbottsports.com/football/football.php Working
    http://abbottsports.com/motocross/motocross.php working
    I was adding another on to our tennis page. I just copied the flash files to my tennis folders and renamed everything tennis instead of football including the buttons like you can see on the right side of the page in the photo.
    I'm pretty sure it has something to do with me renaming the button, because I never changed anything in the code except replacing the word football to tennis in every spot. and renamed my buttons to tennis instead of football.
    Thanks for any assistance.

    yeah they are all named right.
    tennis1_btn
    tennis2_btn
    tennis3_btn
    tennis4_btn
    tennis5_btn
    tennis6_btn
    I uploaded it here:
    http://abbottsports.com/tennis/flash/tennismenu.swf
    http://abbottsports.com/tennis/flash/tennismenu.fla
    http://abbottsports.com/tennis/flash/tennismenu.html

  • Simple question (Trace issue) Access of undefined property

    Having a strange issue with my new Flash Builder and the trace command. Anyone seen this before and why?
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
         <fx:Declarations>
               <!-- Place non-visual elements (e.g., services, value objects) here -->
         </fx:Declarations>
    <fx:Script>
         <![CDATA[
              var myString:String = "Help";
              trace(myString);
              //Error 1120: Access of undefined property myString.
         ]]>
    </fx:Script>
    </s:Application>

    your trace command isn't in a function
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"          
                   xmlns:s="library://ns.adobe.com/flex/spark"          
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" applicationComplete="doThis()">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                private var myString:String = "Help";
                private function doThis():void
                    trace(myString);
            ]]>
        </fx:Script>
    </s:Application>

  • Getting the very lovely 1120: Access of undefined property...

    Hi Guys n Gals,
    I’m getting the "1120: Access of undefined property texttwo_mc." error I've done this code before and no issue.
    What I’m doing is simple, click a button and it will go to a movie clip within a movie clip to start the label named "_go", and this error accrued. The MC I’m calling is on the beginning of the timeline.
    Thanks
    BTW for some odd reason my SWF keeps deleting it self, thats on 2 differnt PC's ones CS5 and CS4.

    Hi Ned,
    Ok ill be as detailed as possible.:
    In the main stage I have a MC with a instance name of texttwo_mc, within that i have a mocvie clip "about button" that acts like a button and its on 5 on the timeline.
    The "about button" is not viable till timeline 5 but there's a stop on timeline 1 and it goes to timeline 5 (to make itself viable) when its told to in action scripting. And there's a button on the main stage that makes it go from 1 to 5 in action scripting.
    and thats where the eror is.
    BTW the "about button" is on timeline 1..just not viable till 5.

  • Flex marking a sample code invalid "Access of undefined property"?

    Hey,
    I used the code from this link: http://tdotblog.info/?q=node/6
    When i put it into Flex Builder 3, it has several issues with the code like "Access of undefined property FileStream" (or File).
    When I run the application, only the typical gray background appears.
    What am I doing wrong?
    Thanks, Erthy

    OK, so I used the code (btw thanks for the link, it is awesome, i already marked as much answers and helpful answers I could) and I came up with something like this:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
         <mx:Script>
              <![CDATA[
                   import flash.filesystem.*;
                   import mx.controls.Alert;
                   public var prefsFile:File; // The preferences prefsFile
                   [Bindable] public var prefsXML:XML; // The XML data
                   public var stream:FileStream; // The FileStream object used to read and write prefsFile data.
                   public function starter():void
                   // stage.nativeWindow.addEventListener(Event.CLOSING, windowClosingHandler);
                   prefsFile = File.applicationStorageDirectory;
                   prefsFile = prefsFile.resolvePath("slovnik.xml");
                   readXML();
                   private function readXML():void
                   stream = new FileStream();
                   if (prefsFile.exists) {
                       stream.open(prefsFile, FileMode.READ);
                       processXMLData();
                   else
                       Alert.show("Nenalezeny žádné slovníky!");
                   // stage.nativeWindow.visible = true;
                   private function processXMLData():void
                   prefsXML = XML(stream.readUTFBytes(stream.bytesAvailable));
                   stream.close();
                   // var slovicko = prefsXML.slovicko.cs;
                   Alert.show("Česky je to: " + prefsXML.slovicko.@cs + "\n Anglicky je to: " + prefsXML.slovicko.@en);
                   // stage.nativeWindow.x = prefsXML.windowState.@x;
                   // stage.nativeWindow.y = prefsXML.windowState.@y;
                   // stage.nativeWindow.width = prefsXML.windowState.@width;
                   // stage.nativeWindow.height = prefsXML.windowState.@height;
                   private function writer():void
                   createXMLData();
                   writeXMLData();
                   private function createXMLData():void
                   prefsXML = <slovicka/>;
                   prefsXML.slovicko.@id = 2;
                   prefsXML.slovicko.@cs = "kočka";
                   prefsXML.slovicko.@en = "cat";
                   // prefsXML.windowState.@width = stage.nativeWindow.width;
                   // prefsXML.windowState.@height = stage.nativeWindow.height;
                   // prefsXML.windowState.@x = stage.nativeWindow.x;
                   // prefsXML.windowState.@y = stage.nativeWindow.y;
                   // prefsXML.saveDate = new Date().toString();
                   private function writeXMLData():void
                   var outputString:String = '<?xml version="1.0" encoding="utf-8"?>\n';
                   outputString += prefsXML.toXMLString();
                   outputString = outputString.replace(/\n/g, File.lineEnding);
                   stream = new FileStream();
                   stream.open(prefsFile, FileMode.WRITE);
                   stream.writeUTFBytes(outputString);
                   stream.close();
              ]]>
         </mx:Script>
         <mx:Button id="start" label="Start" width="130"
                      click="starter()"/>
        <mx:Button id="write" label="Write" width="130"
                      click="writer()" x="138"/>
    </mx:WindowedApplication>
    However, when I change the value, it overwrites the contents of the file. How can I just add one more "slovicko" element to the XML, so it would look like this:
    <?xml version="1.0" encoding="utf-8"?>
    <slovicka>
      <slovicko id="1" cs="blah" en="blah" />
      <slovicko id="2" cs="kočka" en="cat"/>
    </slovicka>
    after adding a new element, instead of just overwriting the previous content leaving only the id=2 element.
    Thanks, I failed to find it and I am sorry for my English.

  • FB 4.5: Flash Professinal Project - Access to undefined property

    I have a "Flash Professinal Project" in my Flash Builder. So, I have a FLA file with the scene and some symbols on it. And a pack of AS files with code.
    The trouble is with symbols in FLA file.
    For example, I have a movieclip with instance name "dlg" on my scene.
    And when I try to access this movieclip like "dlg.gotoAndStop(2)" in some code, the Flash Builder 4.5 underlines "dlg" and puts the orange question mark to the left saying "Access to undefined property dlg". Of course, FB doesn't know about existance of this movieclip. But 4.0 version didn't underline it orange.
    Project compiles ok, but some code parts looks very annoying.
    Half of my code looks like this:
    The additional uncomfortable thing is that when I use FB4 and type dlg. , it opens the autocomplete dialog assuming that "dlg" is a MovieClip by default. FB4.5 doesn't do autocomplete even after I type "dlg.gotoAndS" and press "Ctrl+Space".
    So, is there any way to get rid of this annoying orange question makrs? Maybe, there's a way to describe such instances specially for FB so it can find out their existance? Or just return the way it was in 4.0 ?

    Ok, I have finally found my issue. the "switch" syntax must have changed somewhere between Flex Builder 3 and Flash Builder 4.5.1
    This used to work in Flex Builder 3. The 'case "t", "tr"' will cause code completion to stop working, and also give the "?" warnings all over the souce. Jusr use a separate line for each "case" fixed the issue.
    This has been extremely frustrating for me, I don't have a half a day to google all over with no luck. I wound up making a copy of the project and commenting out most of the code a bit at a time to find this. Sure hope this helps someone else out there!
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                                                         xmlns:s="library://ns.adobe.com/flex/spark"
                                                         xmlns:mx="library://ns.adobe.com/flex/mx"
                                                         invoke="onInvoke(event);"  >
      <fx:Script>
                        <![CDATA[
                                  private function onInvoke(invokeEvent:flash.events.InvokeEvent):void {
                                            var s:String;
                                            try {
                                                      switch ( s.toLowerCase() )
                                                                case "t", "tr":
                                                                case "trace":
                                                                          s = "trace";
                                                                          break;
                                                                case "l":
                                                                case "log":
                                                                          s = "log";
                                                                          break;
                                                                default:
                                                                          s = "?";
                                                                          break;
                                            catch ( err:Error ) {
                                                      s = "error";
                        ]]>
      </fx:Script>
      <fx:Declarations>
      </fx:Declarations>
    </s:WindowedApplication>

  • Why am I getting "Error: Access of undefined property TextInputSkin." and "Error: Definition spark.skins.mobile:TextInputSkin could not be found." errors?

    I'm using amxmlc to build a SWF from an MXML source code file. I'm passing -swf-version=13 to amxmlc.
    In the MXML source, I have the following line:
    <s:TextArea id="inputTextArea" width="100%" height="100" fontSize="28" borderColor="#000000" skinClass="spark.skins.mobile.TextInputSkin" />
    I get these errors when running the amxmlc command:
    ...App.mxml(428):  Error: Access of undefined property TextInputSkin.
                <s:TextArea id="inputTextArea" width="100%" height="100" fontSize="28" borderColor="#000000" skinClass="spark.skins.mobile.TextInputSkin" />
    ...App.mxml(428):  Error: Definition spark.skins.mobile:TextInputSkin could not be found.
                <s:TextArea id="inputTextArea" width="100%" height="100" fontSize="28" borderColor="#000000" skinClass="spark.skins.mobile.TextInputSkin" />
    Why am I getting these errors? I need to be able to use the spark.skins.mobile.TextInputSkin in order to have use of the soft keyboard on iOS devices.

    you need the classes mentioned after 'Definition" in the lines below and they should be place in de/alex_uhlmann/animationpackage subdirectory of your default directory.
    Symbol 'nms_new_all.flv', Layer 'Layer 6', Frame 1, Line 2, Column 50
    1172: Definition de.alex_uhlmann.animationpackage.animation could not be found.
    Symbol 'nms_new_all.flv', Layer 'Layer 6', Frame 1, Line 3, Column 48
    1172: Definition de.alex_uhlmann.animationpackage.drawing could not be found.
    Symbol 'nms_new_all.flv', Layer 'Layer 6', Frame 1, Line 4, Column 48
    1172: Definition de.alex_uhlmann.animationpackage.utility could not be found.
    you also need penner's easing class in com/robertpanner

  • Error Code 1120 access of undefined property...help please

    I am fairly new to Flash - I have CS4 and am not sure if I am in the right place to get help.
    I am trying to build a click through gallery with small buttons that you click on and it switches the larger image out as you click through.
    I copied over a gallery I had successfully built with 10 images.  The new gallery has 20 images.
    Basically the movie just runs continuously without being able to click on the thumbnails.
    I am getting the following compiler errors
    Scene1 Layer 'actions', Frame 1, Line 42 1120:Access of undefined property btn11_btn Source - btn11_btn.addEventListener(MouseEvent.CLICK, showimage11);
    I get this for image 11 through 20
    The following is my code
    stop();
    btn1_btn.addEventListener(MouseEvent.MOUSE_OVER, showimage1);
    function showimage1(event:MouseEvent):void {
    gotoAndPlay("label1");
    btn2_btn.addEventListener(MouseEvent.CLICK, showimage2);
    function showimage2(event:MouseEvent):void {
    gotoAndPlay("label2");
    btn3_btn.addEventListener(MouseEvent.CLICK, showimage3);
    function showimage3(event:MouseEvent):void {
    gotoAndPlay("label3");
    btn4_btn.addEventListener(MouseEvent.CLICK, showimage4);
    function showimage4(event:MouseEvent):void {
    gotoAndPlay("label4");
    btn5_btn.addEventListener(MouseEvent.CLICK, showimage5);
    function showimage5(event:MouseEvent):void {
    gotoAndPlay("label5");
    btn6_btn.addEventListener(MouseEvent.CLICK, showimage6);
    function showimage6(event:MouseEvent):void {
    gotoAndPlay("label6");
    btn7_btn.addEventListener(MouseEvent.CLICK, showimage7);
    function showimage7(event:MouseEvent):void {
    gotoAndPlay("label7");
    btn8_btn.addEventListener(MouseEvent.CLICK, showimage8);
    function showimage8(event:MouseEvent):void {
    gotoAndPlay("label8");
    btn9_btn.addEventListener(MouseEvent.CLICK, showimage9);
    function showimage9(event:MouseEvent):void {
    gotoAndPlay("label9");
    btn10_btn.addEventListener(MouseEvent.CLICK, showimage10);
    function showimage10(event:MouseEvent):void {
    gotoAndPlay("label10");
    btn11_btn.addEventListener(MouseEvent.CLICK, showimage11);
    function showimage11(event:MouseEvent):void {
    gotoAndPlay("label11");
    btn12_btn.addEventListener(MouseEvent.CLICK, showimage12);
    function showimage12(event:MouseEvent):void {
    gotoAndPlay("label12");
    btn13_btn.addEventListener(MouseEvent.CLICK, showimage13);
    function showimage13(event:MouseEvent):void {
    gotoAndPlay("label31");
    btn14_btn.addEventListener(MouseEvent.CLICK, showimage14);
    function showimage14(event:MouseEvent):void {
    gotoAndPlay("label14");
    btn15_btn.addEventListener(MouseEvent.CLICK, showimage15);
    function showimage15(event:MouseEvent):void {
    gotoAndPlay("label15");
    btn16_btn.addEventListener(MouseEvent.CLICK, showimage16);
    function showimage16(event:MouseEvent):void {
    gotoAndPlay("label16");
    btn17_btn.addEventListener(MouseEvent.CLICK, showimage17);
    function showimage17(event:MouseEvent):void {
    gotoAndPlay("label17");
    btn18_btn.addEventListener(MouseEvent.CLICK, showimage18);
    function showimage18(event:MouseEvent):void {
    gotoAndPlay("label18");
    btn19_btn.addEventListener(MouseEvent.CLICK, showimage19);
    function showimage19(event:MouseEvent):void {
    gotoAndPlay("label19");
    btn20_btn.addEventListener(MouseEvent.CLICK, showimage20);
    function showimage20(event:MouseEvent):void {
    gotoAndPlay("label20");
    Any advice would be great
    I dont know if I have to start from scratch - which would be a pain for sure
    Thanks

    I feel foolish - I solved my own problem!
    I figured out that I had not given buttons 11 - 20 an instance name
    Once I did that - voila problem solved
    Sorry for bothering you all.

  • Need help with error msg 1120: Access of undefined property

    I am not a coder, so I need coding help. Any help would be greatly appreciated.
    I'm doing a Flash banner that has clickTAG instructions from Google. The code they said to put on the button is:
    ClickTAG parameter code for ActionScript 3:
    import flash.events.MouseEvent;
    import flash.net.URLRequest;
    someButton_or_displayObject_to_receive_mouseClick.addEventListener(
          MouseEvent.CLICK,
          function(event: MouseEvent) : void {
          flash.net.navigateToURL(new URLRequest( root.loaderInfo.parameters.clickTAG), "_blank");
    Replace someButton_or_displayObject_to_receive_mouseClick with the actual name of button that will receive the click.
    Note that it's not necessary to specify the destination URL for the ad anywhere in this code; this is taken care of through the usage of clickTAG. Also, depending on the structure of your Flash ad, it may be necessary to prepend "_root." or "_level0." to "clickTAG" above, resulting in "_root.clickTAG" or "_level0.clickTAG". It is strongly recommended to upload the ad into your account and verify that the ad is behaving normally prior to it going live, allowing time for any necessary changes.
    And this is the code I put in (btnClickTag is the name of my button):
    import flash.events.MouseEvent;
    import flash.net.URLRequest;
    btnClickTag.addEventListener(
          MouseEvent.CLICK,
          function(event: MouseEvent) : void {
          flash.net.navigateToURL(new URLRequest( root.loaderInfo.parameters.clickTAG), "_blank");
    and this is the error I got:
    Scene1, Layer 'actions', Frame 1, 1120: Access of undefined property btnClickTag. btnClickTag.addEventListener(

    First, make sure you have assigned that name to the button via the properties panel, then, be sure to adjust the code so that it is not spread out over several lines... normally it needs to be on one line.  You should not nest the function in the event listener either, so try the following (no need for the import statements)...
    btnClickTag.addEventListener(MouseEvent.CLICK, tagClick);
    function tagClick(event:MouseEvent):void {
          navigateToURL(new URLRequest( root.loaderInfo.parameters.clickTAG), "_blank");

  • Flex Builder marking a sample code invalid "Access of undefines property"?

    Hey,
    I used the code from this link: http://tdotblog.info/?q=node/6
    When i put it into Flex Builder 3, it has several issues with the code like "Access of undefined property FileStream" (or File).
    When I run the application, only the typical gray background appears.
    What am I doing wrong?
    Thanks, Erthy

    You probably just need to have import statements for these classes in your code:
    import flash.filesystem.File;
    import flash.filesystem.FileStream;
    import flash.filesystem.FileMode;
    It looks like whoever wrote that tutorial forgot to add those. If you were typing in the code rather than pasting it in, the import statements would get automatically added, so maybe the author just didn't notice that they were necessary.
    Related Flex Builder tip:
    If you get this error for any class, it means that the compiler can't find the class definition (which usually means you're missing an import statement). The easiest way to add the import statement is to put your cursor at the end of the class name (e.g. right after the word File) and hit Ctrl-Enter (on Windows -- probably Cmd-Enter on Mac). Ctrl-Enter is the shortcut to trigger a code hint, but if you trigger it that way it will recognize the class and just add the import statement for you.

  • CS4 Flash Access of undefined property ...

    cs4 flash don't compile cs3 code.
    I get 35 errors Access of undefined property and Attempted
    access of inaccessible property.
    What difference in lang?
    Where I can read about?

    I have found difference.
    I used nondocumented feature, place some class definitions
    under public class
    package{
    public class Main{
    var a:A= new A;
    var b:B= new B;
    class A{
    class B{

Maybe you are looking for