Withdrawal of a MovieClip in a statement when the reactivation of an application.

Trying to get the code checks to see if a movieclip is present and if it is then remove it when the user leaves (or back) on the application the device (through a phone call, menu press etc.).

In my application when the user quits the application, they receive the possibility of recovery from the same point or will the first screen.

If a clip is located on the screen then and the user takes over then it is not a problem.

If a clip is on the screen and clicked restart this is where the problem occurs and I get an error (or nothing, depending on the encoding options different I tried).

My goal here is to have the system, find the clip, and remove them when the application is reactivated via the restartF function. Refer to the section of code below.

  • There is no problem when I only have the items blue.
  • There is no problem when I only have items in Blue and green.
  • The problem occurs when the code is in its entirety; Blue, Greenand orange.
  • I get the following error when I click on the restart button:

TypeError: Error #2007: child parameter must be non-null.

at flash.display::DisplayObjectContainer/addChild()

  • Made of the anther: all variables for each color are reported in different time periods:

For example:

Image 1 (this would represent statements in blue)

var mywordGrumpy:vocabulary_Grumpy = new vocabulary_Grumpy();

var mywordIncline:vocabulary_incline = new vocabulary_incline();

I reduced the problem to the restartF function in the code below:

Item code:

Adds screen pop - up and request that they would like to resume or restart.

function onComeBack(event:Event):void

{

NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;

If (! modalW)

{

modalW = new ModalW();

addChild (modalW);

modalW.x = - 97;

modalW.y = - 8;

modalW.resumego.addEventListener (MouseEvent.CLICK, resumeF);

modalW.restartgo.addEventListener (MouseEvent.CLICK, restartF);

}

on the other

{

addChild (modalW);

}

}

Triggered by reconnecting and brings the user to where they left.

function resumeF(e:MouseEvent):void

{

removeChild (e.currentTarget.parent);

gotoAndStop (so.data.currentFrame, so.data.currentSceneName);

}

Triggered by restarting and directs the user to the main screen. If statements remove clips if necessary.

function restartF(e:MouseEvent): void

{

If (addChild (myPlayCredits))

{

removeChild (myPlayCredits);

}

If (addChild (myPlayAbout))

{

removeChild (myPlayAbout);

}

If (addChild (myPlayAuthor))

{

removeChild (myPlayAuthor);

}

If (addChild (mywordGrumpy))

{

removeChild (mywordGrumpy);

}

If (addChild (mywordIncline))

{

removeChild (mywordIncline);

}

If (addChild (mywordOodles))

{

removeChild (mywordOodles);

}

removeChild (e.currentTarget.parent);

gotoAndStop("1","MainScene");

}

What I am doing wrong?

I found the answer:

Variable declarations were not on the same frame as the fi/statements then. I solved the problem by adding (for each variable):

var mywordGrumpy:vocabulary_Grumpy = new vocabulary_Grumpy();

var mywordIncline:vocabulary_incline = new vocabulary_incline();

var mywordOodles:vocabulary_oodles = new vocabulary_oodles();

This solves the problem! At the time where variables were called they had not been declared, so they had no value, so the error message.

Tags: Adobe Animate

Similar Questions

  • How can I make orders save their State when the project is closed?

    I am currently working on the program for a compact RIO which will be used with a variety of instruments. Some data on each of these instruments calibration must be entered into the program via the controls on the front panel, so they can produce the correct value (for example, the input range and a pressure transducer units are required for the program to a scale of 4-20 my reading in a pressure reading).

    The problem that I am running is that, every time I close the project and open it again, all calibration checks back to their default value. What I want to do is to save their State whenever the program is closed so that if you reopen the project without changing the material you don't have to re-enter the calibration values. Can someone tell me how this can be done automatically?

    I know that this can be done manually by saying to each control to set the current value to its default value, but I'd rather not have to do whenever we change the calibration constants. Ideally, the user does not have to use the context menus like this.


  • How to know the State when the user try to truningon wifi.

    According to the requirement of our society that we prevent user BB uses WiFi in the Office that I must turn on and off the WiFi blackberry incoming SMS. I am able to turn off if the wifi is enabled by this code.

    if ((wafs & RadioInfo.WAF_WLAN) != 0)
            {
                Radio.deactivateWAFs(RadioInfo.WAF_WLAN);
            }
    

    But my question is how do I know when the user attempts to activate the WiFi. while I can put restriction.

    I had tried

    RadioInfo.STATE_TURNING_ON
    

    But I'm not able to achieve that the RadioInfo.STATE_TURNING_ON field is obsolete. so give me something to do.

    http://www.BlackBerry.com/developers/docs/7.1.0api/NET/rim/device/API/system/WLANConnectionListener...

  • Starkey Halo 2 passes to 'Flow Boost' memory state when the iPhone received incoming calls.   Is it possible to change the setting.

    I just got my Halo 2 a few days ago Starkey.  I noticed that when I get incoming calls on my iPhone 6, Halo 2 switches in position of memory 'Stream Boost' that increases the volume and picks up a lot of background noise.  Is it possible to change the default iPhone meets the memory of another parameter memory.

    No, you should contact the developer of the application to this topic.

  • Introductory statement; When the hit play button, I want the presenter display appears?

    I have Keynote 6.6.  I created my view presenter on how I want to get my presentation on a projector (not yet hooked).  I guess that when I'm ready to present, I hit the play button in the toolbar.  When I do, he'll just in playback mode.  I want to see the "presenter" display that shows my notes, etc., but I have not, it will just in this game mode.  When I, for example, press on repeat slide show, it works fine.  What I am doing wrong?  Would it because I have to be plugged into the projector or I'm doing something else wrong?  Thank you.

    (I'm on Mac 10.11 upgraded to Yosemite)

    with the projector connected;

    1. Disable mirroring in: System Preferences > displays
    2. Keynote preferences > slide show: Select to: enable presenter view

    Repeat slideshow displays the screen of the presenter to allow the in place the presenter tools

    When in the game, view a second (the projector) must be connected to enable the display of the screen of the presenter.

  • Reset the accordion State when the Page refreshes

    I read a few posts online of people who have encountered the same problem, however I have not yet met any soloution to it.

    If you have an accordion menu and the page is refreshed that the accordion retains its last State rather than reloading to its first State. Is there anyway to stop it from doing this?

    Thank you
    Katy

    "katychapman85" wrote in message
    News:g77ca5$9C$1@forums. Macromedia.com...
    > I read a few posts online of people who met the same
    > problem.
    > However, I have not met any soloution to it.
    >
    > If you have an accordion menu and the page is refreshed on the accordion
    > canned
    > It is the last State rather than reloading to its first State. Is there anyway
    > to
    > don't let him do that?

    Disable history management.

  • Error when the migrating Tier Platform applications with Oracle E-Business Suite Release 12 (Doc ID 438086.1)

    Hi Experts and


    relating to the SR 3-9035673951 (GCS does not help me) and DOC-ID 438086.1

    currently, I got an error now on environmental target in Chapter 2, step 9, while implementing one of the Report_Inventory.html (which resulted in section 1, step 12) patches that currently patch 6857221 .

    Already created gravity SR 1 but still no update.

    There is an error:
    ----------------------------------

    [prodmgr@PROHCMS1 6857221] $ pwd

    / p01/patch/Manifest_Patch_Exalogic/6857221

    [prodmgr@PROHCMS1 6857221] $ echo $ORACLE_HOME

    /P01/Oracle/PRODHR/apps/tech_st/10.1.2

    [prodmgr@PROHCMS1 6857221] $ opatch apply

    Setup Oracle interim Patch version 1.0.0.0.57

    Copyright (c) 2007 Oracle Corporation. All rights reserved...

    We recommend that you check the OPatch documentation under

    OPatch/docs for reference to use. We also recommend that you use

    the latest version of OPatch. To get the latest version of OPatch

    and other support related issues, please refer to the document

    293369.1, which is visible from the metalink.oracle.com address

    Oracle home: /p01/oracle/PRODHR/apps/tech_st/10.1.2

    The Oracle Home Inventory: /p01/oracle/PRODHR/apps/tech_st/10.1.2/inventory

    Inventory Center: / home/prodmgr/oraInventory

    from: /etc/oraInst.loc

    YES location: /p01/oracle/PRODHR/apps/tech_st/10.1.2/oui

    YES shared library: /p01/oracle/PRODHR/apps/tech_st/10.1.2/oui/lib/linux/liboraInstaller.so

    Location of Java: /p01/oracle/PRODHR/apps/tech_st/10.1.2/jre/1.4.2/bin/java

    Location of the log file: /p01/oracle/PRODHR/apps/tech_st/10.1.2/.patch_storage/ < patch ID > / *.log

    Creation of log file "/ p01/oracle/PRODHR/apps/tech_st/10.1.2/.patch_storage/6857221/Apply_6857221_05-26-2014_17-50-17.log".

    Appeal of fuser to check active processes.

    MISSING_COMPONENT: oracle.developer.forms, 10.1.2.3.0

    This House of Oracle has no components/versions required by the patch.

    ERROR: OPatch failed during pre-reqs check.


    Here I installed this form of Oracle 10.1.2.3.0 once again on the target environment?

    Note:
    -------------
    source env:
    bash - $4.2 $ORACLE_HOME/bin/frmcmp_batch | grep forms | grep Version
    10.1 forms (form of the compiler) Version 10.1.2.3.0 (Production)


    Need suggestion on this subject and any help much appreciated.


    Thank you and best regards,

    Françoise Hany


    Here I installed this form of Oracle 10.1.2.3.0 once again on the target environment?

    If this is the level of the Group of hotfixes in 10.1.2 $ORACLE_HOME on the source node then Yes you have to have the same level of patches on the target node group.

    Thank you

    Hussein

  • WHEN THE Digital Publishing Solution APPLICATION BE AVAILABLE?

    Move on indesign 2015, we must have a Solution of digital publication. What is the date of commissioning?

    Already launched. Details at publish.adobe.com

  • ActionScript to load captions in the table to the dynamic text when the user clicks the thumb

    I have this code under that I made using a tutorial... it loads txt file vars it splits then place in a table... once in a table he brings the photos from the table to create thumbnails and a larger image. My problem is that I have captions to go with it, and when I try to load captions nothing happens or can be seen to happen.

    I don't know where I'm wrong because I have no output or compiled errors

    
    var locVar = new Array();
    locVar = imgLoc.split(",");
    trace ( locVar );
    
    var tmbVar = new Array();
    tmbVar = tmbLoc.split(",");
    trace ( tmbVar );
    
    var capVar = new Array();
    capVar = imgCap.split(",");
    trace ( capVar );
    
    var NPICS:Number = locVar.length;     // number of pictures to load
    var PICX:Number = 32.8;               // x loc of big picture
    var PICY:Number = 24.9;               // y loc
    var THUMBHOLDERX:Number = 50;        // x location of thumbnail holder movieclip
    var THUMBHOLDERY:Number = 457;      // y location
    var THUMBW:Number = 100;             // width of each thumbnail
    var THUMBH:Number = 75;             // height
    var MARGIN:Number = 10;             // margin between thumbnails
    var TOTALBYTES:Number = 212000;     // approx sum of bytes in all jpgs (x 2)
    var MAXPIXELS:Number = 12;          // max number of pixels to move slider per frame
    
    // mask definition; mask is assumed to cover some part of the thumbnail slider (here the numbers
    // were chosen so that there are margins between the mask and the right and left edges of the movie
    // (which is 420 x 290), and enough space above and below the thumbs to show them when they 'grow'
    // on mouseover
    var MASKX:Number = 0;                    // start x location of mask
    var MASKW:Number = 600;                    // mask width
    var MASKY:Number = 447.9;                    // start y location of mask
    var MASKH:Number = 92;                    // mask height
    
    var totalloaded:Number = 0;         // running tally of bytes loaded from all pics
    
    // index into pictures array, used for loading
    var ipic:Number;
    
    // set up loader, an instance of MovieClipLoader
    var loader:MovieClipLoader = new MovieClipLoader();
    
    // use the main timeline to listen to and respond to loader's broadcast events
    loader.addListener(this);
    
    // function to move thumbnail slider ("this" = thumbs_mc)
    
    function sliderControl() {
       var w:Number = this._width/2;
       var hw:Number = mask_mc._width/2;
       var npixels:Number;
       // only do when mouse over slider mask
       if (_ymouse > mask_mc._y && _ymouse < mask_mc._y + mask_mc._height) {
          // mouse over left half of slider:
          if (_xmouse > mask_mc._x && _xmouse < mask_mc._x + hw) {
             npixels = (hw - _xmouse) / hw * MAXPIXELS;
             this._x += npixels;
             if (this._x >= 0) this._x = this._x - w;
          // mouse over right half of slider:
          } else if (_xmouse > mask_mc._x + hw && _xmouse < mask_mc._x + mask_mc._width) {
             npixels = (_xmouse - hw) / hw * MAXPIXELS;
             this._x -= npixels;
             if (this._x <= -w) this._x = this._x + w;
          }
       }
    }
    
    // thumbnail click (onrelease) handler
    
    function openPic() {
       pic_mc.loadMovie(locVar[this.i]);
    }
    
    function brightON(){
         this._alpha = 300;
    }
    function brightOFF(){
         this._alpha = 30;
    }
    function captionTXT(){
         _root.cap_txt = capVar;
    }
    
    // assign event handlers (called when all jpgs are loaded)
    
    function setupHandlers() {
       pct_txt.removeTextField();          // don't need loading indicator any more
       thumbs_mc.onEnterFrame = sliderControl;
       for (var i:Number = 0; i < NPICS*2; i++) {
          thumbs_mc["mc"+i].onRollOver = brightON;
          thumbs_mc["mc"+i].onRollOut = brightOFF;
          thumbs_mc["mc"+i].onMouseDown = captionTXT;
          thumbs_mc["mc"+i].onRelease = openPic;
       }
    }
    
    // listener function for broadcast 'done' message (for each pic)
    // onLoadInit gets executed when the movieclip has been loaded into _mc AND 
    //   its width and height data are available.
    //   (_mc = the movieclip being loaded into)
    // this routine sets the size and position of each thumbnail clip as its jpg
    //   is loaded and starts the next one loading.  When all have been loaded, 
    //   a random picture is loaded into pic_mc and setupHandlers is called to 
    //   assign handlers to each thumbnail movieclip
    
    function onLoadInit(_mc:MovieClip) {
       // this gets done when the jpg is completely loaded:
       _mc._width = THUMBW;
       _mc._height = THUMBH;
       _mc._alpha = 30;          // for image clarity
       // give the movieclip a property to remind it who it is
       // (used by openPic to know which big picture to open)
       _mc.i = (ipic >= NPICS ? ipic-NPICS : ipic);
         
       // add picture size to totalloaded variable
       totalloaded += loader.getProgress(_mc).bytesTotal;
    
       // now load the next one (if there are more) or set up handlers if done
       ipic++;
       if (ipic == NPICS * 2) {
          // start with a random photo displayed when all thumbs loaded
          pic_mc.loadMovie(locVar[Math.floor(Math.random()*NPICS)]);
          setupHandlers();
       } else if (ipic >= NPICS) {
          // load jpg into duplicate thumbnail (will already be cached)
          loader.loadClip(tmbVar[ipic-NPICS],  thumbs_mc["mc"+ipic]);
       } else {
          // load jpg into thumbnail
          loader.loadClip(tmbVar[ipic],  thumbs_mc["mc"+ipic]);
       }
    }
    
    // listener function to handle broadcast progress messages
    // make pct_txt show cumulative loading progress
    
    function onLoadProgress(_mc:MovieClip, loaded:Number) {
       var loadedsofar:Number = totalloaded + loaded;     
       pct_txt.text = Math.floor(loadedsofar / TOTALBYTES * 100) + "%";
    }
    
    function init() {
       // create holder for pictures
       createEmptyMovieClip("pic_mc", 1);
       pic_mc._x = PICX;
       pic_mc._y = PICY;
    
       // create (and draw) holder for thumbnails 
       createEmptyMovieClip("thumbs_mc", 2);
       thumbs_mc.beginFill(0, 100);     // black
       thumbs_mc.moveTo(0, 0);
          thumbs_mc.lineTo(2 * (MARGIN + THUMBW) * NPICS, 0);
       thumbs_mc.lineTo(2 * (MARGIN + THUMBW) * NPICS, THUMBH);
       thumbs_mc.lineTo(0, THUMBH);
       thumbs_mc.endFill();
       // drawing the thumb holder at 0, 0 and then moving it makes its reg point = upper left
       thumbs_mc._x = THUMBHOLDERX;
       thumbs_mc._y = THUMBHOLDERY;
    
       // create, draw and enable mask over thumbs (could use different variables to define mask
       // if desired)
       createEmptyMovieClip("mask_mc", 3);
       mask_mc.beginFill(0x0000cc, 100);
       mask_mc.moveTo(0, 0);
       mask_mc.lineTo(MASKW, 0);
       mask_mc.lineTo(MASKW, MASKH);
       mask_mc.lineTo(0, MASKH);
       mask_mc.endFill();
       mask_mc._x = MASKX;
       mask_mc._y = MASKY;
       thumbs_mc.setMask(mask_mc);
    
       // create loading textfield indicator
       createTextField("pct_txt", 4, 200, 100, 40, 100);
       var tf:TextFormat = new TextFormat();
       tf.align = "center";
       tf.size = 12;
       tf.font = "Verdana";
       tf.color = 0xFFFF00;
       pct_txt.setNewTextFormat(tf);
       
       // create loading textfield indicator
       createTextField("cap_txt", 0, 400, 200, 40, 100);
       var cf:TextFormat = new TextFormat();
       cf.align = "center";
       cf.size = 12;
       cf.font = "Verdana";
       cf.color = 0xFFFF00;
       cap_txt.setNewTextFormat(cf);
    
       // make empty movieclips in thumbs_mc for each pic to go into
       // make double the number so the slider can move continuously and show content
       for (var i:Number = 0; i < NPICS * 2; i++) {
          var mc:MovieClip = thumbs_mc.createEmptyMovieClip("mc"+i, i+1);
          mc._x = i*(MARGIN + THUMBW);
          mc._y = 0;
       }
         
       // set the pointer to the first jpg in the array picnames
       ipic = 0;
       // start loading jpgs (ipic is initialized to 0)
       loader.loadClip(locVar[ipic], thumbs_mc["mc"+ipic]);
    }
    
    init();
    stop();
    

    If you search the MovieClip.createTextField method in the Flash help documents, it will show you how to assign a textfield to a movieclip.

  • Listen to when the user opens Options.

    Hello

    I want to listen to my application when the user opens the application Options . I would also like to know what kind of user currently editing options. using

    ApplicationManager.getApplicationManager () .getVisibleApplications () I can learn when the user open Options applications. But I want to know what type of currently open user options.

    We have 200 mobile clients, I want to restrict the user to change some Options.Is is possible?

    Thanks & best regards,

    River.

    probably because the Indian Government had some struggles with RIM because of the encryption.

    See http://www.pcmag.com/article2/0, 2817,2375442,00.asp or other similar objects.

    but as far as I know THAT BES is available in India, otherwise the Government would not these struggles with the rim.

    our company sells a bes servers in Germany, but I have no idea where to get them in India, perhaps you can find a local partner or the RIM alliance member and ask them?

  • My family will travel to the United States to the Mexico.  I have to update my position when I reached my destination, so my map app will work here?

    My family will travel to the United States to the Mexico.  Do I need to change anything on my phone about my temporary location when I reached my destination so my map app will work properly in MX or the GPS automatically adjusts?  I ask because I don't want to go & have my battery to grind to stop as he tries to understand my new location.  I have an IPhone5, iOS 9.2.  How to make the change if the change is necessary?

    Your phone gets your location by connecting to the GPS satellites. Using location services works with battery. However, it will not use more independently connect to the Mexico it makes when it finds your place here.

    When you do need to make sure to do is to contact your cellular carrier and make sure that your account is enabled for international roaming and you understand what can be the cost.

  • Why my windows displays in the United States, when im in Great Britain

    When I go to windows update shows im in the United States when I stay in the United Kingdom, Ive changed to uk .when I just off site and back, on his return to the United States. Help

    Hello

    • How have you changed the settings?
    I suggest to change the locale associated with place and time then check. :
    Regional and Language Options overview
  • I have problem with value NULL when the use CASE statement please help this question

    I have problem with value NULL when the use CASE statement please help this question


    Table: digital_val

    SNO cl C2

    1 San1 11

    2 22 San2

    Actual result: expected to A         B

    A            B                                                                           11        22

    11 NULL

    22 NULL



    query:

    Select case when c1 = "san1" then c2,.

    case If c1 = "san2" then c2 B

    of digital_val

    I'm more curious why, when you select 2 rows, you expect a result of row?

    WITH digital_val

    AS (SELECT 1 AS 'Sno', 'San1"C1, c2 FROM DUAL 11)

    UNION ALL

    2 SELECT AS 'Sno', 'San2"C1, c2 FROM DUAL 22)

    SELECT CASE WHEN c1 is "San1" THEN END AS A c2.

    CASE WHEN c1 = "San2" THEN END AS B c2

    OF digital_val;

    With no other input, if you select 2 rows, you get 2 rows.  One of the other solutions use a max function, but is this really what you want, does not specify?

  • Position/size of the buttons changes when the state changes

    I have a lot of problems with forms configured as buttons ("use like button" checkbox checked) changing position on the stage, or changing size, when their States change. In other words, the size or position of a shape is different when the condition is 'Flipping' or 'Down' as opposed to the "Normal" position Are you looking for assistance to understand and control the behavior of the button shape.

    Thank you.

    What version do you have? It was a bug in the first release of 9. The current version is 9.0.1.320.

    Take a look at: release notes for Adobe Captivate 9.0.1

  • Unable to get the correct rules table result when the State is unknown

    Hi all

    I use OPA version 10.4. I'm writing a rule by using a table of rules. Requirement is such that when the State is unknown then conclusion should evaluate to 'Others' (for example). Now, I have a condition (text) attribute and attribute of conclusion (text). Now when the condition attribute value is "abc" then attribute of the conclusion must be "xyz" but when the condition attribute is 'unknown' or anything else then attribute conclusion must be 'other '. I tried to implement this in the two table rules in word doc and also in excel table of rule but failed to get the desired result. It assesses the 'unknown' conclusion when the condition attribute is 'unknown '. Please suggest.

    Thank you

    Mounia

    ruleTable3.JPG

    ruleTable2.JPG

    Hi Pascal,.

    As the table of treaty rules the rules in the top-down approach, so the 'unknown' State should be written before the value condition.

    If she meets the condition of value firstly she neglects the unknown state and gives the value of the conclusion as 'unknown '.

    Hi Sean,.

    Want your comments on that.

    See you soon,.

    Arup

Maybe you are looking for

  • sound themes iDVD in sierra

    Hello in iDVD 9.1.2, after upgrade to 10.12, sounds imported into iTunes in the iDVD themes part is silent. I tried different formats (AIFF, AAC) does not. The sounds file in the media, but when setting browser in the well, it won't play the preview.

  • Menu 'Options' does not work in 38 FF

    By clicking on the 'Options' menu produces a page that is frozen: by clicking on the left menu options (content, privacy, security, synchronization, etc) produces nothing. By clicking on the options on the page parent (General) still produces nothing

  • Atrix music HD intelligent Action

    The intelligent Action said to set a reading list in the Application 'music', but the problem is that the Atrix HD uses Google playing music as the music app. Anyone could create a work around to play a playlist of music Google when you connect headp

  • cRIO: build the path to write tdms file on a USB flash drive

    I wrote the code in figure 1 below, for open & create a file tdms on my USB flash drive that is plugged into the USB cRIO. The added path tdms is shown in figure 2 below. But I get the error in figure 3 below. I wonder how I can solve this problem.

  • Helps the bad Image DLL C: Windows

    Help can some please tell Me what I have to challenge these error messages whenever I connect to my pc I get them 1 Logi_MwX, Exe - bad Image The application or DLL C:\WINDOWS\system32\tuvtttTN.dll is not a valid WINDOWS image Check against your flop