Scene 1 layer Actions 1120: access of the window using the undefined property!

I'm really new to Flash and I use the current CC of Flash to create a banner with the evolution of the images and a button that target changes for each slide.

I'm in a HTML Canvas and everything seems to work okay in test Ctrl + entry with the button goes to different pages.

5 errors occur when I export to SWF Movie

Scene1, layer, frame 1 line 4 column 2 1120: access of undefined property window.

Scene1, actions layer, frame 40 line 4 column 2 1120: access of undefined property window.

Go looking around, it seems to be the button actions that I used code snippets for.

Actions: Frame1

this.buttonOne.addEventListener ("click", fl_ClickToGoToWebPage);

function fl_ClickToGoToWebPage() {}

window.open ("http://www.fireflybbq.eu/#!") ("product/prd1/2832376001/kansas-sweet-%26-smoky-bbq-rub", "_blank");

}

Actions: Frame 40

this.buttonTwo.addEventListener ("click", fl_ClickToGoToWebPage_2);

function fl_ClickToGoToWebPage_2() {}

window.open ("http://www.fireflybbq.eu/#!") ("rub / c1faw", "_blank");

}

Im not sure what is wrong with the code as it runs in the test, but not in the export any help would be appreciated

This should work for a publication of html5, but not for a swf file

to a swf file, you must use actionscript, not javascript window.open is the javascript code.

Use the externalinterface class call javascript in html file swf or navigateToURL incorporation

Tags: Adobe Animate

Similar Questions

  • Scene 1, Layer 'Actions', image1, line 27 1084: syntax error: expected rightbrace before _01_010.

    I need help with this code please!

    Stop_btn.addEventListener (MouseEvent.CLICK, fl_ClickToPauseVideo_3);

    function fl_ClickToPauseVideo_3(event:MouseEvent):void

    {

    Assets/01_01_010.Fla.pause ();

    }

    Play_Btn.addEventListener (MouseEvent.CLICK, fl_ClickToPlayVideo_3);

    function fl_ClickToPlayVideo_3(event:MouseEvent):void

    {

    Assets/01_01_010.fla. Play();

    }

    Restart_btn.addEventListener (MouseEvent.CLICK, fl_ClickToPauseVideo);

    function fl_ClickToPauseVideo(event:MouseEvent):void

    {

    Assets/01_01_010.fla. Seek (0);

    }

    Tranz_Btn.addEventListener (MouseEvent.CLICK, fl_ClickToPosition_3);

    var fl_TF_3:TextField;

    var fl_TextToDisplay_3:String = "FEMA mission is to support our citizens and first responders to ensure that as long as nation, we work together to build, maintain, and improve our ability to prepare, protect, respond, to recover from and mitigate all risks.»

    FEMA mitigation efforts may reduce risks associated with the events of potential dangers are underway. This course focuses on the operations of FEMA risk mitigation joint offices, which are established after a disaster declaration to focus on mitigation of the effects of future risks of the State affected by the disaster. « ;

    function fl_ClickToPosition_3(event:MouseEvent):void

    {

    fl_TF_3 = new TextField();

    fl_TF_3.AutoSize = TextFieldAutoSize.LEFT;

    fl_TF_3.background = true;

    fl_TF_3.border = true;

    fl_TF_3.x = 200;

    fl_TF_3.y = 100;

    fl_TF_3.text = fl_TextToDisplay_3;

    addChild (fl_TF_3);

    }

    each line with a slash has a problem.

    1. all paths/filenames must be enclosed in quotes.

    2. I don't see any reason, you need to reference a fla in actionscript

    3. you could certainly not apply actionscript as play (), pause () and seek() methods to a fla.

    Bottomline: you have almost certainly incorrect references to what appears to be an instance of the flvplayback component.

  • Scene 1, Layer 'actions', image1, line 1084: Syntax error: expecting identifier before plusassign.

    butt.addEventListener (MouseEvent.MOUSE_UP, makeMC);     var mc1:MovieClip = new MYMC();     function makeMC (event: MouseEvent): void {if (clipAdded) {/ / same as if (clipAdded is true) removeChildAt (numChildren - 1);}}  Last added} addChild (mc1);   clipAdded = true; MC1.x = & = 100; MC1.y = 300; MC1. Play(); clipAdded = true; } removeChildAt (numChildren - 1); }} var clipAdded:Boolean = false;     / * child feature (mc1) {clipAdded = true ;} * /}

    Your code is a mess... anyway, it contains the following may be where the problem lies...

    MC1.x = & = 100;

    It is or = or +=, but it cannot be both

  • AS creation on a layer actions and frame 1 of the main timeline

    / * Set up files, this program works 'actions are directly fixed on the buttons.
    the instance names:
    ball_mc
    start_btn
    stop_btn

    The clip of ball is a simple animation that bounces a ball up and down, I dragged an instance of the latter staging and added ball_mc.stop; for a layer actions, I created in the main time line.

    I added the following to the start_btn * /.
    {We (Release)}
    This.ball_mc. Play();
    }

    I added the following to the stop_btn
    {We (Release)}
    This.ball_mc. Stop();
    }

    This program works. I simply press the start and stop buttons. And the clip ball_mc instance
    symbol start / stop when I press buttons.

    / * I'm trying to access the same buttons through the main time line. I have put all my actionscript on frame 1 of the layer and the same 'a layer called actions' layer actions. Here is the code I tried, but the ball_mc will not start or stop. Here's the code I used: * /.

    This.ball_mc. Stop();
    This.start_btn.onRelease = function() {}
    This.ball_mc. Play();
    }
    This.stop_btn.onRelease = function() {}
    This.ball_mc. Stop();
    }

    I hope that I'm not asking something as stupid, I tried just about everything I could. That's why I ask your help now.

    Thank you
    Dennis

    remove the 'this' (s) of your codes:

    ball_mc. Stop();
    start_btn.onRelease = function() {}
    ball_mc. Play();
    }
    stop_btn.onRelease = function() {}
    ball_mc. Stop();
    }

    'this' inside a function can refer to the object assigned to the function.

  • 1120: access of undefined property

    Hi, I need a solution to my script for school work.

    This is my code:

    Stop();

    var Keo: Boolean = false;

    var kiri:Boolean = false;

    var jumlah:int = 0;

    var n = 0;

    var t = 3;

    Kalah.Visible = false;

    mulai.addEventListener (MouseEvent.CLICK, mulaimain);

    function mulaimain(event:MouseEvent):void

    {

    Kalah.Visible = false;

    Mulai.Visible = false;

    Home.Visible = false;

    n = 0; score. Text = string(n);

    t = 3; Lives.Text = String (t);

    stage.addEventListener (KeyboardEvent.KEY_DOWN, tekantombol);

    stage.addEventListener (KeyboardEvent.KEY_UP, lepastombol);

    cacto.addEventListener (Event.ENTER_FRAME, jalan);

    taco.addEventListener (Event.ENTER_FRAME, set);

    heart.addEventListener (Event.ENTER_FRAME, jatuhhati);

    function tekantombol (event: KeyboardEvent): void

    {

    switch (event.keyCode)

    {

    -case Keyboard.RIGHT: {kekchose = true; break ;}}

    -case Keyboard.LEFT: {kiri = true; break ;}}

    }

    }

    function lepastombol (event: KeyboardEvent): void

    {

    cacto.gotoAndPlay (1);

    switch (event.keyCode)

    {

    -case Keyboard.RIGHT: {kekchose = false; jumlah = 0; break ;}}

    -case Keyboard.LEFT: {kiri = false; jumlah = 0; break ;}}

    }

    }

    jalan function (event: Event): void

    {

    Cacto.x += jumlah;

    If (kanan) {cacto.gotoAndStop (3); jumlah = 11 ;}}

    If (kiri) {cacto.gotoAndStop (2); jumlah = - 11 ;}}

    If (cacto.x > = 997) {cacto.x = - 10 ;}

    If (cacto.x < =-37) {cacto.x = 977 ;}

    }

    function jatuh(event:Event):void

    {

    Taco.y += 7;

    If (taco.y > = 390)

    {

    t = t-1; Lives.Text = String (t);

    Taco.y =-2;

    Taco.x = Math.Floor (Math.Random () * 800);

    }

    If (Taco.hitTestObject (Cacto))

    {

    n = n + 1; score. Text = string(n);

    Taco.y =-2;

    Taco.x = Math.Floor (Math.Random () * 800);

    }

    if(t==0)

    {

    cacto.removeEventListener (Event.ENTER_FRAME, jalan);

    taco.removeEventListener (Event.ENTER_FRAME, set);

    Kalah.Visible = true;

    Mulai.Visible = true;

    }

    function jatuhhati(event:Event):void

    {

    Heart.y += 12;

    If (heart.y > = 390)

    {

    Heart.y =-30;

    Heart.x = Math.Floor (Math.Random () * 800);

    }

    If (Heart.hitTestObject (Cacto))

    {

    t = t + 1; Lives.Text = String (t);

    Heart.y =-30;

    Heart.x = Math.Floor (Math.Random () * 800);

    }

    }

    }

    }

    Scene 1, Layer 'Actions', frame 1, line 261120: access of undefined property jatuhhati.

    and this output:

    ReferenceError: Error #1065: Variable TCMText is not defined.

    Can someone help me?

    For Error 1120, you seem to have nested in another function jatuhhati function.  The compiler cannot see because of that.  Never recommended to nest the functions called within other functions.  Get what it out on its own so that you can see when the assignment of the listener that uses it gets compiled.

    With regard to the 1065 error will I can't see any of this object named in your code.  This usually makes me conclude that there is a component any you use which has such a textfield.

    One thing you should always do when you start getting errors is to go to your publication of Flash settings and select the option to enable debugging.  This can help in pointing to more specific information in the error messages you get, such as line numbers.

  • Need help with the error msg 1120: access of undefined property

    I'm not a coder, so I need help coding. Any help would be greatly appreciated.

    I'm a Flash banner that was given instructions "clickTAG" of Google. The code, they said to put the button is:

    Parameter ClickTAG for ActionScript 3 code:

    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 the button that will receive the click.

    Note that it is not necessary to specify the destination URL of the ad anywhere in this code; This is supported through the use of "clickTAG". In addition, according to the structure of your Flash Ad, it may be necessary to add "_root." or "_level0." for "clickTAG" above, resulting in a "_root.clickTAG" or "_level0.clickTAG". It is strongly recommended to download the ad on your account and check the ad behaves normally until she'll live, granted for the necessary changes.

    And this is the code that 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', image1, 1120: access of undefined property btnClickTag. () btnClickTag.addEventListener

    First of all, make sure that you have assigned this name to the button using the properties panel, and then, don't forget to adjust the code so that it is not spread over several lines... normally it must be on a single line.  Do not nest the function where the listener either, so try the following (not necessary for import declarations)...

    btnClickTag.addEventListener (MouseEvent.CLICK, tagClick);

    function tagClick(event:MouseEvent):void {}

    navigateToURL (new URLRequest (root.loaderInfo.parameters.clickTAG), '_blank');

    }

  • 1120: access of undefined property scene.

    Hello

    I get this error: 1120: access of undefined property scene in my document class. On the two lines where I commented.

    I am looking for a picture of the main timeline. Pass through a function then adds the objects in the scene based on that number is in the table.

    My Document class:

    package  {
         
         import flash.display.MovieClip;
         import flash.display.Stage;
    
         public class Levelcreator extends MovieClip{
         
              public function Levelcreator() {
                   // constructor code
              }
              
              public static function getArray(levelArray:Array):void {
                   for(var i:uint = 0; i < 6; i++){
                        switch (levelArray[i]){
                             case 0:
                                  var grid_mc:Grid = new Grid;
                                  grid_mc.x = (40*i) + 60;
                                  grid_mc.y = 60;
                                  stage.addChild(grid_mc);//error here
                                  break;
                             case 1:
                                  var house_mc:House = new House;
                                  house_mc.x = (40*i) + 60;
                                  house_mc.y = 60;
                                  stage.addChild(house_mc);//error here
                                  break;
                        }
                   }
              }
    
         }
         
    }
    

    then on the maintime I'm moving a table to it with:

    Levelcreator.getArray([0, 1, 0, 0, 1, 0]);
    

    I can't understand what I'm doing wrong here. Help would be very appreciated. Thank you.

    :

    package  {
    
         import flash.display.MovieClip;
         import flash.display.Stage;
    
         public class Levelcreator extends MovieClip{
    
              public function Levelcreator() {
                   // constructor code
              }
    
              public function getArray(levelArray:Array):void {
                   for(var i:uint = 0; i < 6; i++){
                        switch (levelArray[i]){
                             case 0:
                                  var grid_mc:Grid = new Grid;
                                  grid_mc.x = (40*i) + 60;
                                  grid_mc.y = 60;
                                  stage.addChild(grid_mc);//error here
                                  break;
                             case 1:
                                  var house_mc:House = new House;
                                  house_mc.x = (40*i) + 60;
                                  house_mc.y = 60;
                                  stage.addChild(house_mc);//error here
                                  break;
                        }
                   }
              }
    
         }
    
    }
    
    

    then on the maintime

    getArray([0, 1, 0, 0, 1, 0]);
    
    
  • Error: 0 x 80070005 access denied: the requested action requires elevated privileges.

    I downloaded and install a copy of assessment of RC of windows 7 build 7100 and use the key to legitimate windows 7 RC to activate and he succeeded.

    After a few days, my pc hangs and after reset, he began asking to activate windows now. Although pressing ok product error '0x80070005' (I am using the administrator account). Even using the command "slmgr.vbs" does not display ' error: 0 x 80070005 access denied: the requested action requires elevated privileges. "

    Please help and thank you.

    Your question has nothing to do with Windows Update (compared to the upgrade of Windows). Please repost your question here rather: http://social.answers.microsoft.com/Forums/en-US/w7install/threads ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • Flash Action user incorrect 1120: access of undefined property

    I work in flash, creating a document drag / move and when I try to make a link to my target I get the following error 1120: access of undefined property. Can anyone help?

    target is null.   It does not point to what it is.

    What do you want it to be?

  • As for access to the id of the component in the element of the action script converter

    Hello

    I enclose the screenshot and the code snippet, as a result of the screenshot, I explain my problem.

    input_image.JPG

    Here you can see two panels with the same data, but each Panel is to have his own dataprovider. I used for combobox itemRenderer. When the type of the parameter 'Date' is selected in one of the row of each Panel, then at that time date combobox must become visible, as I'll have different date formats in the comboxbox. I used the outerDocument to call the method in the actionscript code, but I cannot access the id of the combobox of date format. As I rolled alert to check is I am able to call the method, tht works very well. Please help me how to control the visibility(visible=true/visible=false) of the list box dropdown date format on the choice of date in the parameter type combo box. Also, I paste the snippet of code here...

    < mx:Script >
    <! [CDATA]
    Import mx.controls.Alert;
    Import mx.controls.ComboBox;
    Import mx.events.CloseEvent;
    TO check the status on ComboBox
    public void closeHandler(event:Event):void {}
    Alert.Show ('Hello');
    If (SelectedIndex of the ComboBox (event.target) == 1)
    Alert.Show ('parentApplication.paramType')

    inputGrid.paramType.visible = true;
    parentApplication.comboD.visible = true;
    on the other
    parentApplication.comboD.visible = false;
    }
    []] >
    < / mx:Script >
    < mx:XMLList id = 'service' xmlns = "" >
    < parameter >
    < parameterName > Param - 1 < / parameterName >
    < comboSlctIdx > 0 < / comboSlctIdx >
    < validSlctIdx > 0 < / validSlctIdx >

    < / parameter >

    < parameter >
    < parameterName > Param - 2 < / parameterName >
    < comboSlctIdx > 0 < / comboSlctIdx >
    < validSlctIdx > 0 < / validSlctIdx >
    < dtSlctIdx > 0 < / dtSlctIdx >

    < / parameter >
    < / mx:XMLList >
    < mx:XMLList id = "comboDS" xmlns = "" >
    < parameter >
    < label > String < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > Date < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > Integer < / label >
    < data > true < / data >
    < / parameter >
    < / mx:XMLList >

    < mx:XMLList id = "comboV" xmlns = "" >
    < parameter >
    < label > required < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > not required < / label >
    < data > true < / data >
    < / parameter >

    < / mx:XMLList >

    < mx:XMLList id = "comboD" xmlns = "" >
    < parameter >
    < label > JJ/MM/AAAA < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > JJ/MM/AAAA < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > AAAA/MM/JJ < / label >
    < data > true < / data >
    < / parameter >
    < / mx:XMLList >

    < mx:XMLList id = "service1" xmlns = "" >
    < parameter >
    < parameterName > Param - 1 < / parameterName >
    < comboSlctIdx > 0 < / comboSlctIdx >
    < validSlctIdx > 0 < / validSlctIdx >
    < / parameter >

    < parameter >
    < parameterName > Param - 2 < / parameterName >
    < comboSlctIdx > 0 < / comboSlctIdx >
    < validSlctIdx > 0 < / validSlctIdx >
    < dtSlctIdx > 0 < / dtSlctIdx >
    < / parameter >
    < / mx:XMLList >

    < mx:XMLList id = "comboDS1" xmlns = "" >
    < parameter >
    < label > String < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > Date < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > Integer < / label >
    < data > true < / data >
    < / parameter >
    < / mx:XMLList >

    < mx:XMLList id = "comboV1" xmlns = "" >
    < parameter >
    < label > required < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > not required < / label >
    < data > true < / data >
    < / parameter >

    < / mx:XMLList >

    < mx:XMLList id = "comboD1" xmlns = "" >
    < parameter >
    < label > JJ/MM/AAAA < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > JJ/MM/AAAA < / label >
    < data > true < / data >
    < / parameter >
    < parameter >
    < label > AAAA/MM/JJ < / label >
    < data > true < / data >
    < / parameter >
    < / mx:XMLList >

    < mx:DataGrid id = "inputGrid" width = "100%" dataProvider = "{services}" >
    < mx:columns >
    < mx:DataGridColumn headerText = "Parameter name" dataField = "parameterName" fontFamily = "Arial" letterSpacing = "1" textAlign = "center" / >
    < mx:DataGridColumn headerText = "Parameter Type" fontFamily = "Arial" letterSpacing = "1" textAlign = "center" >
    < mx:itemRenderer >
    < mx:Component >
    < mx:HBox horizontalAlign = "center" >

    < mx:ComboBox id = dataProvider = "{parentApplication.comboDS"paramType"}" selectedIndex = "{data.comboSlctIdx}"close = "outerDocument.closeHandler (event);" / >

    < / mx:HBox >
    < / mx:Component >
    < / mx:itemRenderer >
    < / mx:DataGridColumn >

    < mx:DataGridColumn headerText = "Validation" fontFamily = "Arial" letterSpacing = "1" textAlign = "center" >
    < mx:itemRenderer >
    < mx:Component >
    < mx:HBox horizontalAlign = "center" >
    < mx:ComboBox dataProvider = "{parentApplication.comboV}" selectedIndex = "{data.validSlctIdx}" / > "
    < / mx:HBox >

    < / mx:Component >
    < / mx:itemRenderer >
    < / mx:DataGridColumn >
    < mx:DataGridColumn headerText = "" >
    < mx:itemRenderer >
    < mx:Component >
    < mx:HBox horizontalAlign = "center" >
    "< mx:ComboBox id = dataProvider =" {parentApplication.comboD "dtType"} "selectedIndex =" {data.dtSlctIdx} "visible ="false"/ >
    < / mx:HBox >

    < / mx:Component >
    < / mx:itemRenderer >
    < / mx:DataGridColumn >

    < / mx:columns >
    < / mx:DataGrid >

    Thanxs

    Gerard

    follow these steps:

    -the change of Manager from the drop-down list type, change a property of the row (data)

    change = "{Data .selectedParamType = paramType.SelectedItem.Label.ToString () ;} ', for

    -Change the visible property of the combo of date:

    visible = "{Data .selectedParamType =='Date ' '} ', for"

  • Access of undefined property _btn (problems with the buttons)

    I get this error message:

    Scene 1, Layer 'actionscript', frame 1, line 11120: access of undefined property tennis1_btn.
    Scene 1, Layer 'actionscript', frame 1, line 71120: access of undefined property tennis2_btn.
    Scene 1, Layer 'actionscript', frame 1, line 131120: access of undefined property tennis3_btn.
    Scene 1, Layer 'actionscript', frame 1, line 191120: access of undefined property tennis4_btn.
    Scene 1, Layer 'actionscript', frame 1, line 251120: access of undefined property tennis5_btn.
    Scene 1, Layer 'actionscript', frame 1, line 311120: access of undefined property tennis6_btn.

    Here is a screenshot of my code

    flashscripterror.jpg

    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 it's the only one that gives me problems.  Here is the site that I use on:

    www.abbottsports.com of work

    http://abbottsports.com/football/football.php Working

    http://abbottsports.com/Motocross/Motocross.php working

    I add another on our page of tennis. I just copied the flash files on my tennis records and renamed all tennis instead of football, including buttons, as you can see on the right side of the page in the photo.

    I'm sure it has something to do with me rename the button, because I never changed anything in the code except substitute the word tennis football in each place. and renamed my buttons to tennis instead of football.

    Thanks for any help.

    Instance names your buttons are 'football1_btn '... 'football6_btn '.

    Rename them to "tennis1_btn"... "tennis6_btn" and you're golden.

  • AS of CS4 Error 1120 - access of undefined property.

    I feel like a real noob and need help!

    I'm new to Flash, but were able to dig my way through scripts for action with a little help from old messages of the forum.

    What I've done so far: developed a small map with buttons for navigation for the Web page, all worked fine with every button link to a separate page.

    What I do: I have new content that needs to be added, so I need another button. everything went fine the new button, name, new layer etc.

    I copied the same code for this button to work (just the name chaning) since the other 7 work buttons in the swf file.

    The error I get is 1120: access of undefined property wind. for the last line of code below:

    A button that does not work:

    import flash.events.MouseEvent;

    function gotoWIND(event:MouseEvent):void {}
    var windURL = new URLRequest ("http://www.hydro.com.au/node/462");
    navigateToURL (windURL, "_self");
    }

    wind.addEventListener (MouseEvent.CLICK, gotoWIND);

    Button (s) that works:

    import flash.events.MouseEvent;

    function gotoKING(event:MouseEvent):void
    {
    var kingURL:URLRequest = new URLRequest ("http://www.hydro.com.au/node/405/");
    navigateToURL (kingURL, "_self");
    }

    king.addEventListener (MouseEvent.CLICK, gotoKING);

    I did some research and found that this means that I have not named the right of the button, but I double and triple checked, redone with a simpler Word (wind) but still no joy. And the only other response, that I could find on this forum was about several images - but as it is a 'static' navigation panel there is only one image for each layer.

    Help, please!

    in the frame that contains your code, use the following syntax, click on wind and copy and paste your text from exit sign.

    import flash.events.MouseEvent;

    trace (Wind);

    function gotoWIND(event:MouseEvent):void {}

    trace("**",Event.currentTarget.Name);
    var windURL = new URLRequest ("http://www.hydro.com.au/node/462");
    navigateToURL (windURL, "_self");
    }

    wind.addEventListener (MouseEvent.CLICK, gotoWIND);

  • Access to the number of property may not set through a reference with static type...

    Hi all!

    I encounter this problem today... Take a look at the code:

    import com.trick7.effects.TeraFire;

    for (var j: uint = 0; j < 10; j ++) {}

    var fire: TeraFire = new TeraFire();

    Fire.x = j * 40 + 20;

    Fire.y = 100;

    Fire.Number = j; This line is causeing the problem

    addChild (fire);

    fire.buttonMode = true;

    }

    Class TeraFire creates fire particles. Compiler error is:

    Scene 1, Layer 'layer 1', frame 1, line 7.1119: access of the number of property may not set through a reference with static type com.trick7.effects:TeraFire.

    Can someone help me find a solution to this problem.

    I can do this 'number' with a clip, but not in this case. What can I do?

    Sorry oops misspelling... I meant fire ['number'] = j;

    The class must also be dynamic for this work, i.e.:

    public dynamic class TeraFire extends MovieClip
    

    (a dynamic class extension is not the class dynamic sub...)

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.UK/

  • Error 1120 in Flash CS3... Access of undefined property.

    Help, please!

    I am new to Flash, but get the hang of it pretty quickly.

    So far I have a nice animation of an intro's, which consists of 90 images.

    In the 90th, I set an action (stop)... test it and it stops as it is supposed to.

    I add another layer to the other actions, and almost verbatum following code from a website, I declare 3 buttons and give them functions.

    Code below:

    *****************************************************************************************
    arch_btn.addEventListener (MouseEvent.CLICK, archPageClick);
    studio_btn.addEventListener (MouseEvent.CLICK, studioPageClick);
    personal_btn.addEventListener (MouseEvent.CLICK, personalPageClick);


    function archPageClick(e:MouseEvent):void
    {
    gotoAndStop ("Architecture");
    }

    function studioPageClick(event:MouseEvent):void
    {
    gotoAndStop ("Studio");
    }

    function personalPageClick(event:MouseEvent):void
    {
    gotoAndStop ("Personal");
    }

    *****************************************************************************************

    I checked the other sites of the error (1120). What I get from them, is that my buttons are not named correctly or the names of instances is no correlation with buttons in stock... Well, this is not correct. I have double and triple checked the names of the instance and they are correct. They are exactly as shown previously. Here is a screenshot of my Architecture button...

    Picture 1.png

    As you can see the instance name of the button Architecture is "arch_btn". Even as in the code of the action. I don't understand why I get this error! I get it for all 3 buttons btw.

    ALSO... after I add this layer to actions for my buttons, action to stop on the other layer stops working. The movie now plays right through 90... After I deleted the layer with the button actions, the layer of action stop work again... Weird?

    If someone could help it would be greatly appreciated!

    Thank you.

    Post edited by: mmellonphotography

    When you have encoding problems, files usually won't play properly, so once solve you the problem of coding it must play well again.

    Make sure that you have assigned the button instance names in all keyframes, not just those frame of 90.  If you do name them in the frame of 75, that the absence of a name is inherited in the frame of 90.

  • Access to the stadium when not at the Doc root

    The following code returns the error message ""Error 1120: access of undefined property scene.".

    select function (event) {}

    If (event.target.name step) {}

    currTool.target = null;

    } else if (event.target is Sprite) {}

    currTool.target = event.target as Sprite;

    toolInit();

    }

    }

    I understand that the reason for the error is because I'm trying to access the 'scene' when I'm not at my root of the Document. The question I have how to make this thing even when I'm not at the root of the Document?

    Thanks in advance,

    Dave

    Add:

    import flash.display.Stage;

Maybe you are looking for