What am I doing wrong with this idea of menu?

Hi team,

I am trying to build a menu but have two problems, as you can see on the vid when I press one of my button fly, closing at all (which could be authorized)

Quen worst is that even if I have the names of instance for all the steps and the target tool allows you to find the path to these buttons, I can't access it from the main timeline.

Here's the code...

import flash.events.MouseEvent;

import flash.display.MovieClip;

GSmain.gsshape.gss1.gssr1.addEventListener (MouseEvent.CLICK, page2go);

function page2go(e:MouseEvent) {}

gotoAndStop (2);

}

and the error...

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

to aavar / frame1 () [aavar::frame1:4]

aavar is the document class associated with this file

If

GSmain.gsshape.gss1.gssr1.addEventListener (MouseEvent.CLICK, page2go);

is frame 1/4, GSmain.gsshape.gss1.gssr1 does not exist when this code runs.

you have also nested named functions which is always problematic:

function whatever() {}

function whatevernested() {}

}

}

should be

function whatever() {}

}

function nolongernested() {}

}

Tags: Adobe Animate

Similar Questions

  • What am I doing wrong with this simple table?

    I have a table that I need to add unique characters to slowly.

    If the table is wordToCheck and I have a few "drop places" to check and see if a letter "fell off the coast." An index is assigned to each point of fall and I just want to add the letter to the appropriate index of the table so that I can push in a string.

    This is my code:

    wordToCheck [currentBlank.register] = currentLetter.letter.toLowerCase ();

    So you can see that if 'A' has been abandoned to the empty spot with the 2 register it would return "-a".


    The problem is that it is remove each time that I add a letter. If I put 'A' in the registry and then 2 "M" save 3 it returns '-m '.

    How do it do not replace itself every time?

    1. to the original post: If you use the same instance of table - it shouldn't happen. Looks like whenever you add letter - it's a new instance of the wordToCheck table.

    2. If you want to convert the string table - use Array.join () method.

  • What am I doing wrong with this loop?

    It drives me crazy! I am trying to create 100 triangles, like a little challenge for me, in random positions.

    import flash.display.MovieClip;

    addEventListener (MouseEvent.CLICK, 100Tri)

    function 100Tri() {}

    for (var i: int = 0; i > 100; i ++ ;)) {}

    var positonX:int = Math.random () * 550;

    var positonY:int = Math.random () * 400;

    var triangle: MovieClip = new Triangles();

    triangle.x = positionX;

    triangle.y = PositionY;

    addChild (triangle)

    }

    But he returned as a constantly

    Scene 1, Layer 'AS', frame 1, line 21084: syntax error: expected rightparen before sorting.
    Scene 1, Layer 'AS', frame 1, line 31084: syntax error: expecting identifier before 100.

    There is a class named 'Triangles', which is related to a movieclip of a triangle. It contains nothing, but what is in all classes.

    Help? I'm sure it's just a little thing miss me, but its annoying me. >. <

    Hello

    There are a few stupid errors in your code. Use it below:

    import flash.display.MovieClip;

    stage.addEventListener (MouseEvent.CLICK, triangles)

    function triangles(e:MouseEvent)

    {

    trace ("click handler")

    for (var i: int = 0; i > 100; i ++)

    {

    var positonX:int = Math.random () * 550;

    var positonY:int = Math.random () * 400;

    var triangle: MovieClip = new tri();

    triangle.x = positonX;

    triangle.y = positonY;

    addChild (triangle)

    }

    }

    Kind regards

    Vipul

  • What I am doing wrong in this little pl/sql statement?

    Hi all

    I'm happy to write in this forum for the first time. Can someone help me show what I'm doing wrong in this little summary:

    create or replace procedure augmente_salaire (employees.employee_id%type IN p1, p2 IN number (3))

    is

    Update employees set salary = salary + salary * p2/100 where employee_id = p1;

    end augmente_salaire;

    Start

    augmente_salaire (1001,20);

    end;

    I use pl/sql developer.

    Any help would be appreciated.

    Best regards.

    Hello

    Welcome to the forum.

    You missed a BEGIN block after the IS. Between IS and BEGIN, you declare your variables.

    And the parameter should be the NUMBER instead of number (3).

    Do you get an error message when you tried to run your code?

    Concerning

    Marcus

    Post edited by: Marwim

  • HWAT am I doing wrong with this webcam?

    Hello!

    I found a tutorial in a .pdf file on webcams, usb and how to make them work with labview... so... I managed to make this diagram below!

    But it still does not... What am I doing wrong? Or... you have a better scheme for this application? Or a diagram simple JAWS!

    Help! : s


  • What am I doing wrong with the visibility _ property?

    I have an object that is a clip, and I want this object to disappear when you click on him, but also the button that makes the object appears to be also subject to disappear. Anyway, when you click on the object or on the button for the second time, the same object to disappear.  I managed to do it, but the first time when you click the button to display the object it doesn't work, you have to click twice. What I am doing wrong? The object, it's a clip named frez1, and the button is named fr1. I put this code in the main scenario: for the clip: frez1.onPress = function() {_root.frez1.gotoAndStop (2);}                                      _root.frez1.gotoAndStop (1);                                           } button: frez1._visible = false;                                     FR1.onRelease = function() {frez1._visible =! frez1._visible;}                              } Button and the object are on different layers.  Thank you for your help.

    The first thing you can do is avoid the unnecessary use of _root references.  If the code is in the scenario where the object exists, there is not need to refer to the timeline (i.e. in this case the _root).

    Saying the movieclip to go to box 2 immediately followed up by saying to go to frame 1 will always be in frame 1.

    If you want to be able to click the movieclip to make it visible, then you can make invisible because the invisible objects do not interact with a mouse.  You will have to modify its _alpha rather property.  Try to replace all the code show you by what follows and to eliminate the appearance frames of frez1...

    frez1._alpha = 0;

    function toggleMC() {}

    If (frez1._alpha == 0) {}

    frez1._alpha = 100;

    } else {}

    frez1._alpha = 0;

    }

    }

    frez1.onRelease = fr1.onRelease = toggleMC;

  • Can someone tell me what I'm doing wrong with C5180

    Thank you for reading my post. I have a Photosmart C5180 all-in-one printer. I do calendars for my children. I have a PC with Windows Vista. I've been printing these for two years using the HP Photosmart Essential software. I am trying to print a picture of 'full page' on 8.5 "x 11" photo paper. I get a message saying that the image size is too large for the paper. I'm going goofy trying to get this image full-size to print. I have done many times before and can't happen now. Any suggestions?

    Thank you very much

    Smurfsdad

    Thanks Matmaria for your suggestion. This does not, as did nothing else I could think of. I think that sort of 'Vista' was behind all this. I was pulling my hair out. Finally, I downloaded an updated version of the Photosmart Essentials and it allows me to do what I was trying to do. Thank you again... Smurfsdad

  • What I am doing wrong in this loop?

    How I can change this code
    to get the result like this

    If the user, enter the number of hours travelled = 3
    and please enter the speed of the vehicle in miles per hour = 40
    the method computes 1 * 40
    2 * 40
    3 * 40
    I need to use the loop
    Thank you, I am just learning JAVA

    I need the output to look like this

    /*
    * Description Convert distance settings: Int: speed, number
    * hours traveled (milePerhour, numberOfhoursTraveled, distance)
    * Performance: integer: Distance
    */
    public static double convertDistanceTraveled (int milePerhour, int numberOfhoursTraveled) {}
    return (milePerhour * numberOfhoursTraveled);

    public static double convertDistanceTraveled (int c) {}
    int dist = milePerhour * c;
    return dist;
    }
    }
    Edited by: 893973 on Oct 18, 2012 1:37 PM
    
    Edited by: 893973 on Oct 21, 2012 4:24 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    Hello

    Try changing your loop as follows:

    for (int i = 1; i)<=numberOfhoursTraveled;>
    {
    System.out.format ("%s\t\t%s\n", I, convertDistanceTraveled (milePerHour, i));
    }

    Also change the return type for the function convertDistanceTraveled of the House double int.

    Hope this helps,

    Thomas

  • What is wrong with this sequence, it does not work when, after 3 inserts, I add a new record with the trigger it gives an error.

    Mr President.

    What is wrong with this sequence, it does not work when, after 3 inserts, I add a new record with the trigger it gives an error.

    --SL_CUSTOMERS table data
    
    
    INSERT INTO SL_CUSTOMERS VALUES(1,'Kamrul Hasan',NULL,NULL,'Moghbazar', 'Dhaka','0456789123',NULL,NULL,NULL,'Y',NULL);
    INSERT INTO SL_CUSTOMERS VALUES(2,'Rabiul Alam',NULL,NULL,'Motijheel', 'Dhaka','0567891234',NULL,NULL,NULL,'Y',NULL);
    INSERT INTO SL_CUSTOMERS VALUES(3,'Shahed Hasan',NULL,NULL,'2-G/1,2-2,Mirpur', 'Dhaka','0678912345',NULL,NULL,NULL,'Y',NULL);
    
    
    
    

    CREATE SEQUENCE  "ALIZA"."SL_CUSTOMERS_SEQ"  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER  NOCYCLE ;
    
    
    CREATE OR REPLACE TRIGGER SL_CUSTOMERS_TRG 
    BEFORE INSERT ON "ALIZA"."SL_CUSTOMERS"   
    FOR EACH ROW   
    BEGIN   
    IF :NEW.CUSTOMER_ID IS NULL OR :NEW.CUSTOMER_ID < 0 THEN  
      SELECT SL_CUSTOMERS_SEQ.nextval   
        INTO :NEW.CUSTOMER_ID  
        FROM DUAL;   
      END IF;   
    END;   
    /
    
    
    
    

    When I try to insert several records with the seq.nextval it gives error

    violation of primary key.

    INSERT INTO "ALIZA"."SL_CUSTOMERS" (CUSTOMER_NAME) VALUES ('sdfsd')
    ORA-00001: unique constraint (ALIZA.SL_CUSTOMERS_PK) violated
    ORA-06512: at line 1
    
    
    
    
    One error saving changes to table "ALIZA"."SL_CUSTOMERS":
    Row 4: ORA-00001: unique constraint (ALIZA.SL_CUSTOMERS_PK) violated
    ORA-06512: at line 1
    
    
    
    
    
    
    
    

    Concerning

    Mr President.

    I find the solution by creating a function before the triiger

    as below

    CREATE SEQUENCE  "ALIZA"."SL_CUSTOMERS_SEQ"  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER  NOCYCLE ;
    
    CREATE OR REPLACE FUNCTION get_SL_CUSTOMERS_vId RETURN VARCHAR2 AS
    BEGIN
       RETURN SL_CUSTOMERS_SEQ.NEXTVAL;
    
    END;
    /
    
    CREATE OR REPLACE TRIGGER SL_CUSTOMERS_TRG
    BEFORE INSERT ON "ALIZA"."SL_CUSTOMERS"
    FOR EACH ROW
    DECLARE
    dummy VARCHAR2(200);
    BEGIN
      dummy := get_SL_CUSTOMERS_vId();
      :NEW.CUSTOMER_ID := dummy;
    END;
    /  
    

    It works very well

    Thank you all for the suggestions.

    Concerning

  • The short films that I do in Windows Movie Maker fail to run after about 1 minute, regardless of the format, I save in (WMV or AVI) any ideas why or what I am doing wrong?

    The short films that I do in Windows Movie Maker fail to run after about 1 minute, regardless of the format, I save in (WMV or AVI) any ideas why or what I am doing wrong?

    I'm just looking to add the opening titles to the pieces of film of aprox 3 Germans, but everytime I try and save files for uploading to Youtube, then fail shortly after a minute. The sound and picture freeze while the counter continues until the end of the file.

    am driven crazy by this so any advice would be welcome...

    Hello

    My friend John Papa - MVP - is the expert on Windows Movie Maker.

    PapaJohn.org
    http://Papajohn.org/

    PapaJohn - online tutorials
    http://www.Papajohn.org/mm2-online-tutorials.html

    Windows Movie Maker Tutorials - see the menu on the left and others on the main screen.
    http://www.windowsmoviemakers.NET/tutorials/

    Windows Live Movie Maker Forums are good sources of information:

    Windows Live Movie Maker that works on Vista and Windows 7, see the link under Windows Live Essentials.
    http://windowslivehelp.com/

    Windows Live - Movie Maker Portal - official support Site - see also the Forums of the right part of the page
    http://windowslivehelp.com/product.aspx?ProductID=5

    ====================

    These might help:

    Getting started with Windows Movie Maker

    Import video, photos and audio on Windows Movie Maker

    Import video from a videotape

    Get a movie in Windows Movie Maker

    Make a movie quickly in Windows Movie Maker (AutoMovie)

    Publish a movie in Windows Movie Maker

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • I got a Apple Watch yesterday and since put in place and paired him and everything, but now I can not unlock it or look at anything on the watch because it won't let me.  Any ideas as to what is wrong or what I am doing wrong?

    I got a Apple Watch yesterday and since put in place and paired him and everything, but now I can not unlock it or look at anything on the watch because it won't let me.  Any ideas as to what is wrong or what I am doing wrong?

    Hello

    If you have not already done so, it could be that you want to configure your watch with these settings:

    -On your iPhone, in the application of Eve, go to: My Watch (tab) > General > detection of wrist - it lights up.

    -On your iPhone, in the application of Eve, go to: Watch My > password > code turn on (choose a password Simple or more complex).

    -Also on the password settings screen, select Unlock with iPhone.

    After putting on your wrist, your watch don't unlock then after whatever you do first: unlock your watch manually (by entering the access code) or unlock your iPhone.

    Then, it will remain unlocked (including when the screen is idle) until you remove it from your wrist. When you remove your watch, it locks automatically.

    More information:

    https://help.Apple.com/watch/#/apd748b87e2a

  • My video Html code does not work with chrome or firefox. What I am doing wrong?

    I am fairly new to this and am trying to embed a video from my computer in my site but when I publish it the html code that I use doesn't seem to work with firefox or chrome. What I am doing wrong?

    < object id = "MediaPlayer" width = "692" height = "690" type = "video/x-ms-asf" >

    < param name = "FileName" value = "S:\2015 Properties\2015 Active Properties\2494 Arnold Palmer Drive, Blaine MN 55449\Property Photos\Arnold Palmer - Video.mp4.en9r5uu.partial ' >

    < param name = "autostart" value = "false" >

    < param name = "ShowControls" value = "true" >

    < param name = "ShowStatusBar is preserved" value = "false" >

    < param name = 'ShowDisplay"value ="false">

    "" < embed type = "application/x-mplayer2" src = "S:\2015 Properties\2015 Active Properties\2494 Arnold Palmer Drive, Blaine MN 55449\Property Photos\Arnold Palmer - Video.mp4.en9r5uu.partial '.

    width = "692" height = "690" ShowControls = '1' ShowStatusBar is kept = "0" ShowDisplay = "0" autostart = "0" / >

    < / object >

    Hello

    As I see you are trying to add a MP4 video for Muse I advise you to use steps or widgets available in the link below

    link with the steps to add MP4

    How to integrate a mp4 video in my muse site.

    Free widget

    Musepen::HTML5 video player Widget

    Concerning

    Vivek

  • A few days, I bought a mac mini which I transferred the data and programs with time machine: programs have been updated except for iMovie, and now it seems that I have to pay for the update: possible? What I am doing wrong?

    A few days ago, I bought a mac mini and I transferred all my data and programs with time machine: all programs have been updated but iMovie (7.1.4)... However, it seems that, to update to the latest version, I have to pay to download on Appstore: is it possible? what I am doing wrong?

    If it were a new mac mini, you need already installed 10.1 iMovie.  Otherwise, but you already have iMovie 9 registered version to your Apple ID, you can upgrade to version 10 for free, but if (as it appears) is an earlier version then you have to buy version 10.

    Geoff.

  • My entire song will not play, just section A or B. Any ideas what I am doing wrong?

    MY entire song will not play, just section A or B. No idea what I am doing wrong?

    The first thing to check is if you have "all sections" selected. Push it + top button on the right, which should show you the section menu. Above that, it should say "all sections". Make sure that who is selected. I know not obvious, but sometimes it's the simple answer that works... Don't know what you need to do, if it is not there.

  • Help! I did a movie with pictures on Movie Maker, played very well. Now, it's just to show Xs red in the photos of some, but not all. What I am doing wrong?

    I did a movie with pictures on Movie Maker and played very well.  Now, it's just to show Xs red in the photos of some, but not all.  What I am doing wrong?

    When you save your project, and then rename, move or delete a photo next time you open your project, you will see a red X where the photo was. Just a click with the right button on the X and select Remove then import your photo again under the new name or location and click on save project on the file menu.

    In the menu task under finished film click Save to my computer tracking instructions and your project will be saved as a movie.

Maybe you are looking for

  • How to use subject: config to REMOVE Delta looking for my new tab

    I'm desperate to remove Delta search my the new tab page. What should I do after I opened on: config? I have done it at least a dozen of resets, withdrew DS via Add/Remove, run a virus scan now... it is TERRIBLE and it HAS to be a way to get rid of h

  • Cannot play DIVX

    Why my BDP-BX57 Blu - ray cannot read avi DIVX format, play only avi XVID format but model early as BX 37 can play DIVX?

  • IFR to 3 or more airports

    How to create an airport IFR flight plan has via airpot B C with FSX airport?

  • Windows Live, games for windows live and Xbox 360 Live accounts.

    Hi all I recently bought an Xbox 360. I also had a Windows Live\Games to windows live account for many years and wanted to link this to my account xbox live. At the moment I have set up my live account xbox, that I had questions I now want to close t

  • Disable the stolen laptop OS

    My laptop was stolen.  How can I disable my copy of Windows XP to protect information?  I have the product key and the MAC address of the laptop