How can I access a variable on the main timeline of a movie nested in HTML5 Canvas

Hello

This should be pretty simple, but for some reason, it does not work if I have the wrong syntax.

But I have a movie clip with a bit of code in it.

It is a timer.

I want to be able to program the wait time: since the main scenario and that the timer read this variable on the main timeline.

I implemented the delay var = 1000 on the main timeline, but then I do not seem able or knows how to get this variable in my code in the nested MC. It is quite difficult to find the reference of the paradigm flash timelines on H5 support pages, so I really appreciate the help.

tl2 var = this;

TL2. Stop();

var delay = delayMain;

var startTime is createjs. Ticker.getTime ();

createjs. Ticker.addEventListener ("tick", f);

{function equation

If (createjs. Ticker.getTime () - startTime > delay) {}

TL2. Play();

createjs. Ticker.removeEventListener ("tick", f);

}

}

If you want to get to a variable defined by a feature any at any depth, you can use the window. As:

Window.Delay = value;

in a deeply buried movieclip, can be read in any other level of the project.

Tags: Adobe Animate

Similar Questions

  • How to set a variable in the main timeline of in a symbol?

    Just get started with Animate and coming from Flash, it may be apparent to my question. How do you define a variable for the main timeline of in a symbol?

    I have 24 pairs of clickable elements, each in their own symbols, and 24 of these symbols to sit inside another symbol. I want every 24 to set the global variable even when you click on it. I do not find that this question is anywhere, which makes me think that I can be stuck in a mentality from Flash and approaching the task in a bad way. (However, there are MANY discussions address showing how objects to different levels in the hierarchy.) Which is well covered).

    By the way, how to access a function on the main timeline of in a symbol?

    Adobe should consider putting on foot (or pages) support just for people migration form Flash. In the documents that I've met so far there seems to be a studied effort to refrain from mentioning Flash somehow. I imagine that there are many people out there like me who have a deep background in coding Flash, but start with Animate. We don't need help with most of the basic concepts, but we still have some pretty basic questions on how to achieve certain things in Animate because our knowledge of Flash gets in the way.

    Hi Bill,

    There are a lot of discussions here on the scope, but here's a way to create a global variable:

    code on Stage.compositionReady

    sym.myGlobalVar = 1;

    Then, anywhere in your project, you can check/set this var as follows:

    sym.getComposition () .getStage () .myGlobalVar = 2;

    And here is a way to create a global function:

    code on Stage.compositionReady

    sym.myGlobalFunction = function() {}

    Console.log ('myGlobalFunction');

    }

    Then, anywhere in your project, you can call this function as follows:

    sym.getComposition () .getStage () .myGlobalFunction ();

  • How can I access my emails after the death of my PC. I had a pc using Windows Vista and I served my Windows Mail e-mail program.

    Disaster of Windows Mail.  Where are my emails please?

    How can I access my emails after the death of my PC. I had a pc using Windows Vista and I served my Windows Mail e-mail program.  The computer has stopped working so I removed the hard drive, put it in a case and now use it as an external drive.  My new computer, I took possession of the Documents and Settings folder, and I'm looking for emails.  I followed the path, Documents and Settings / / AppData / Local / Microsoft / Windows Mail but there are 2 folders, backup & stationery as well as a few small files.  Where I could hide my email? Please, I beg you.

    There should be a directory called local folders under the message store and eml files organized into folders named after the directories under this directory are.  They may be hidden files, so make sure that you have enabled the display of hidden files and folders under control panel | Folder options | View.  You can also try to search *.eml, because messages are stored as eml files.  See www.oehelp.com/backup.aspx#wm for background.

    Steve

  • How can I add session variables for the subject field and the body of the e-mail Message?

    How can I add session variables for the subject field and the body of the e-mail Message? Tried several combinations, but do not seem to correct the syntax.

    This is the code I have. I need to change all the form variables in $msg in session variables. The $to part is supported. What remains are the $subject and $msg fields.

    $à = « à : ». $_SESSION ["toemail"];
    $subject = '$firstname $lastname, your registration details ';
    $from = "from: [email protected]"; "
    $msg = "Dear $title $firstname $lastname\r\n\nThank for the registration for the design of your dream Home.\r\nWe have received this following details details of you-\r\n\nClient-\r\n\nOccupation: $occupation \r\nPhone No.: $phone \r\nE-mail: $email\r\n\nPresent $ location: \r\n location\r\n\nPresent address: \r\n$ address\r\n\n\nFollowing are specified by you - design requirements \r\n\nBasic Features\r\n\nNo." floors: $floors\r\nNo. of bedrooms: bedrooms\r\nNo of $. of bathrooms: $bathrooms\r\nFloor region: $sqft\r\n\nFurther Suggestions: $ Plan\r\n\nSplit one further\r\n\n\nType floor: $splitfloor\r\n-remarks: $splitfloorremarks\r\nOpen floor: $openfloor\r\n-remarks: $openfloorremarks\r\n\n\nList of the rooms to be Included\r\n\nFoyer: $foyer\r\n-remarks: $foyerremarks\r\nDrawing: $drawing\r\n-remarks: $ alive drawingremarks\r\nFormal: $formalliving\r\n-comments : $ alive formallivingremarks\r\nFamily: $familyliving\r\n-remarks: $familylivingremarks\r\nHome Office: $homeoffice\r\n-remarks: $homeofficeremarks\r\nDining: $dining\r\n-remarks: $diningremarks\r\nMaster room: $master\r\n-remarks: $masterremarks\r\nMaster bathroom: $masterbath\r\n-remarks: $masterbathremarks\r\nMaster Dressing: $masterdress\r\n-remarks: $masterdressremarks\r\nBedroom: $bed\r\n-remarks: $bedremarks\r\nBathroom: $bath\r\n-remarks: $bathremarks\r\nDress: $dress\r\n-comments : $dressremarks\r\nStudy: $study\r\n-remarks: $studyremarks\r\nLibrary: $library\r\n-remarks: $libraryremarks\r\nPowder room: $powder\r\n-remarks: $powderremarks\r\nPrayer room: $prayer\r\n-remarks: $prayerremarks\r\nKitchen: $kitchen\r\n-remarks: $kitchenremarks\r\nPantry: $pantry\r\n-remarks: $pantryremarks\r\nUtility/area of work: $utility\r\n-remarks: $utilityremarks\r\nBalcony: $balcony\r\n-remarks: $balconyremarks\r\nStore: $store\r\n-remarks: $storeremarks\r\nLaundry : $laundry\r\n-remarks: $laundryremarks\r\nVeranda: $veranda\r\n-remarks: $verandaremarks\r\nCar porch: $carporch\r\n-remarks: $carporchremarks\r\nGarage: $garage\r\n-remarks: Theater garageremarks\r\nHome $: $theater\r\n-remarks: room of $theaterremarks\r\nMaid: $maid\r\n-remarks: $maidremarks\r\n\nOther general remarks: $general\r\n\nPlease note that the fields have been left blank in your form will be considered undecided details and used in discretion.\r\nIf of the architect , it better to add more later, design requirements please feel free to reply to this email with the details. « ;
    $fla = mail ($to, $subject, $msg, $from);

    Thanks in advance!

    askintrades wrote:

    How can I add session variables for the subject field and the body of the e-mail Message?

    What you want to do? Given the nature of your question, it seems that you probably don't know what a session variable is used. The PHP manual describes the purpose of sessions here: http://docs.php.net/manual/en/intro.session.php.

    I need to change all the form variables in $msg in session variables. The $to part is supported. What remains are the $subject and $msg fields.

    $à = « à : ». $_SESSION ["toemail"];

    Why do you need to change the form variables in session variables? They are already stored in session variables, or they come directly from the form?

    The $to part is not supported. When you pass $to to the mail() function, it should contain only an e-mail address, not a string that begins with "to:

  • How can I access all instances of the itemRenderer in a specific DataGridColumn?

    How can I access all instances of the itemRenderer in a specific DataGridColumn? Or, if I have a rowIndex and columnIndex, how do I get the itemRenderer to these clues?

    I use States to change the display of my itemRenderer of a TextField of a PopUpMenuButton. What I was trying to do was change back the display of all the other itemRenderers visible in the column of the textfield, when one of the itemRenderers displays the PopUpMenuButton.

    I tried to loop through all of the itemRenderers in the column and casting them as the class I was using and then by setting the currentState, but, it wasn't good performance wise and required too code. I simplified it listen to a change on the listData owner event (in my case a DataGrid, but any component ListBase) and by setting the currentState to null when it is triggered. Works like a charm.

  • Using CS4 Flach and action script 2.0 how to move a specific frame in the main timeline when a movie clip instance come at the end of his chronology?

    Using CS4 Flach and action script 2.0 how to move a specific frame in the main timeline when a movie clip instance come at the end of his chronology?

    code on the last frame of your movieclip instance:

    _root.gotoAndStop ('whatever_frame');  will work unless this swf is loaded into another swf.  in this case, you must use a relative path to the main timeline (for example, _parent or _parent._parent etc.).

  • How can I access Photoshop elements 9 organizer of iMac Apple Dock & move all photos from iPhoto

    I have been using Photoshop Elements 9 to change my digital photos from iPhoto.  I found using both these confusing applications and decided to only use Photoshop Elements 9 to edit and organize my photos.  Right now I can only access the editor of Photoshop Elements 9 of my iMac Apple Dock.  How can I access all the features of Photoshop Elements 9 of my iMac Apple Dock?  Should what steps I follow to move all of them now organized in iPhoto in the Photoshop elements 9 multimedia?

    The next time that you start the Organizer, go in the Dock, click on more and hold its icon there and go to options more > keep in dock.

    To copy your photos from iphoto, go to file > import from iphoto. This will duplicate your photos, however.

  • HP Designjet T2500: How can I scan documents without using the main table with the HP Designjet T2500 printer?

    Hello, in my office we recently bought printer HP Designjet T2500 and, so far, works great but I have a doubt with the procedure of the Analyzer in the case where the main panel is malfunctioning. How can I scan a document without the help of the main panel or a plan?

    I know the printing can be done with the supplied software, but he made no reference to the case where we need to scan a document.

    Any help will be great, thank you.

    Hello

    Analysis cannot be done froom the front panel of the printer.

    If you have a problem with the Panel, you will need to repair the device because you won't be only able to scan, as you will not be able to load paper or calibrations.

  • How to target button in movieclip on the main timeline

    Hello!

    I have a few buttons of submenu in a movieclip in the mainline. My first level of navigation in the main timeline. The submenus are grouped into movieclips on the main timeline. I basically used the same code on the main navigation for the navigation sub except the code for the submenus is located in this movie clip. My instruction trace bed button is clicked (which was a quantum leap for me) but I know that I need some kind of code _parent in there so that he knows to go to the label back on the main timeline. Can anyone help? I feel like I'm so close.

    Also is this a correct way to set-up? I couldn't figure out how do it in an image. Any help would be so appreciated. I didn't know that this basic framework would be so difficult.

    Here is the link:

    http://www.sandraschmitt.com/Coclico/index2.html

    Thank you!!
    Sandra

    Here is my code which is on the movieclip submenu:

    Code:
    stop();

    fall.addEventListener(MouseEvent.CLICK, clickSection);
    spring.addEventListener(MouseEvent.CLICK, clickSection);

    function clickSection(evtObj:MouseEvent){
         //trace shows what's happening... in the output window
         trace ("The "+evtObj.target.name+" button was clicked!")
         //go to the section clicked on...
         gotoAndStop(evtObj.target.name);
    }

    One of the reasons that I never won any price for my vision of the design are because I am often... If it works, use it.  There are many ways to approach a design and yours is very good if you understand.  If she was going to smash something, it would have happened now.  Some people don't go to the extreme of having absolutely no code in a file, some even no content library, he wrote everything in files and class not by necessity, but to simply believe that it is the best way, or a challenge to prove their skills...  They have the it.  He participates a practicality with design that allows to make Judgment calls and if you feel that your approach to design is convenient for what you understand or which meets the needs of the project, then you have the right to follow your own path.

    That said... in the case where a person must inherit from your work somewhere down the road, that's when your approach can be victim of judgment... If someone can not follow, either found it difficult to put all the pieces together, or find them, then you become the contact person for the moans fall that follows.  But you're not likely to have to hear about it.  Yet, one day, if you are in a position where you inherit a person guestroom... and start whining about how they did it, you will come to appreciate the reasons to consider how approach you your designs.

  • Access a MovieClip in the main timeline of an external class

    Hello


    I've been struggling with the same question for a few days now, and I don't know it can be easily solved - I have just found a way that works for my case


    Basically I have a series of clips on the main timeline, the name "S1B1' to 'S5B8' as a result. I would like to add to a table in a separate category called "BeatArray".


    For the moment, I found no referencing the MovieClips from the separate class file that works, and I tried many different methods (including adding MovieClip (root). before each one and various other things).

    It's probably worth noting that the external class has already extends MovieClip.


    Any help is greatly appreciated!


    See you soon

    When you instantiate the outer class passes a reference to the main timeline and assign it within the class and use it in your targeting.

  • Control the main timeline of a movie via a button in a movie on another level.

    Hello!
    I have two film is at two different levels.
    Level 5 is my base film and I load another movie on top of that in level 10.
    Once the user clicks on a button in the movie to level 10, I would like to animation to level 5 to stop (the animation runs on the chronology of the main root of level 5).

    Once the user clicks a different button in the movie to level 10, I would like the animation in the main timeline of the movie in level 5 again from the moment it was already stopped.
    Is this possible?

    It would be great if someone could help me with this.
    Thank you, midi_ie

    You can't delete this loop of onClipEvent (enterFrame) unless you remove the movieclip to which it is attached. However, you can add an else if statement in your code (in addition to checking the variable Boolean "drag") to check if your _level10 button has been activated.

    and you can delete a slider.onEnterFrame loop, but you probably don't want to do.

    p.s. make the loop enterFrame?

  • How can I add a footer to the main section that will not get push off-page?

    Generator 10.1.2.2.0
    ORACLE Server Release 10.1.0.5.0
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64 bit Production

    Hi all

    I want to add a footer frame in the main section of a report that will not get pushed off the page by an extensible framework above it, which can develop vertically, but will still allow the extensible framework continue on the next page (and print another foot on this page as well. I paint a blank on how to do it with anchor or frameworks encompassing etc points.

    Extend the extensible framework until the footer frame. Change the elasticity vertical expandable framework to contract or fixed. In this case, pull-out frame will be printed until the foot of the page and will then continue on the next page.

    I hope this helps.

  • referring to the variable on the main timeline to child?

    so in as2 we achieve using _root, but now in as3, I do not know how to return it now, I tried, root, parent.parent.children, stadium and also MovieClip (root), but it is simply not followed the variable, I also tried the root management, mc.parent he says parent does not belong to the variable number, I tried the same method for MC It gives me the MainTimeLine, so I also tried MainTimeLine.MC, it still does not. Anyone know how? Thank you.

    mount the parent or root like a movieclip:

    MovieClip (parent) .yourvar

    or

    MovieClip (root) .yourvar

  • How can I access my favorites in the normal way by clicking on it.

    I can access is more to my bookmarks by clicking on it. Also, I can't record things in my bookmarks and sections of unsorted bookmarks. My mouse works fine and I can go to any Web site I want but accessing and save things to my favorites seems impossible. However, I found that I can access my favorites by right-clicking on them and open them in a new tab, but left click does nothing.

    Maintenance of the premises {web link}
    Allows to run Maintenance tasks on the database that drives
    Bookmarks and history module places behind Firefox.

    Open the Add-ons Manager. Locate the add-on, then press the Options button.
    Select all tests. On the bottom, then press Execute .

  • How can I access my messages on the internet without the program T/bird?

    Some e-mail programs allow you to access the live server on the Internet (Using passwords) without going through the program to download messages. So if I am away from my computer I can still read messages on another computer.

    Most e-mail servers have called web mail, where you can access their site with a browser to read your mail and even send messages. For example, Google has mail.google.com

Maybe you are looking for

  • Computer training available to Dallas Texas Mac

    I am looking for the it training for Apple Mac computers. I would like to learn from A to Z. I'm looking to learn the home and business. If possible, I prefer some college classes. Any suggestions?

  • Canon Pixma iP1500 printer and it connect not gives an error code 20

    I have a canon Pixma iP1500 printer and it does not connect gives an error code 20?

  • synchronization of WMP for Sansa e200

    This is the message I get trying to sync my i-tunes purchased "Windows Media Player cannot convert the file to the format required by the device. One or more codecs required to convert the file is not found. "Help!

  • HP dv6 7210us ENVY: ENVY Hp dv6 7210us motherboard

    My computer beeps at me almost whenever I'm working on it.  It's a beep distinctive high pitch and then a serious tone.  I also sometimes hear a click, but I don't remember if it's before, during or after the beeps (I think it was after the second be

  • Driver problem Dell R520

    I hope this is the right place. We have a server Dell R520 which was recently installed, win server 2008 r2. When I click on Device Manager, we perhaps 10-30 items in other devices. More listed as Base system device. There are also 8 other devices li