Trying to show() and play() a symbol from inside another symbol

Hi Everyone !
I'm running into a problem which is getting me crazy.
I have the following case :
- 1 symbol (_Page_Background) containing an animation with the following trigger @0s :
// Hiding the symbol
sym.getParentSymbol().$("_Page_Background").hide();
// Stop it
sym.stop();
- 1 element (B_TOYS), inside of a symbol (BUTTONS) with the following "click" trigger :
// Showing the _Page_Background symbol
sym.getComposition().getStage().getSymbol("_Page_Background").show();
// Start playing it
sym.getComposition().getStage().getSymbol("_Page_Background").play("INTRO");
The Symbol _Page_Background starts hidden, like it should. But when I click on the button (B_TOYS), nothing happens. Although, everything was working correctly before I turned my buttons into symbols ..
I guess the problems lies with the "show()" function, because I have other buttons that work properly but they don't show/hide anything, they just play()
Am I missing something ?!
Thanks in advance for your kind help !

Hi Dimitri,
Think of symbols as independent timelines that can contain other elements, or instances of other symbols. The Stage/main timeline is a symbol as well. Scripting calls are scoped to the symbol that the script is in. The keyword sym stands for the symbol that you're in with the script.
So if your script is at the same level as what you are targeting with it:
Use sym.$("elementName") to access an element's properties
Use sym.getSymbol("symbolName") to access a symbol's timeline. If there's another symbol inside that symbol that you want to access, you'd use sym.getSymbol("symbolName").getSymbol("childSymbolName")...that's only two levels deep, but you can go as deep as needs be.
If you're trying to access an element in a symbol, you'd combine these two, such as sym.getSymbol("symbolName").$("elementName")
When your script is within a symbol and you want to access an element or symbol outside of the symbol timeline:
Use sym.getParent() to get to any elements that are in the parent symbol (the symbol which contains the symbol you're calling from), which could be the Stage or could be another parent symbol
Use sym.getComposition().getStage() from any symbol level to access things at the main Stage level.  You can also dive into a symbol on the Stage from any symbol using sym.getComposition().getStage().getSymbol("symbolName").
All is explained in detail here:
http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html
hth,
Joe

Similar Messages

  • How to access a variable from inside another symbol

    So i did this tutorial, Leveraging Independent Symbol Timelines created by Eliane...it's rockin, btw.  ;-)
    All's well but now i have a symbol on the stage called mc-home.  inside of mc-home is a button called btn-go.
    On the stage in composition ready there's a variable sym.setVariable("current", "mc-home");
    This code works for a symbol that's on the stage but, how do i get this code to work on a button that's inside another symbol that's on the stage?
    var current = sym.getVariable("current");
    if (current != "") {
        sym.getSymbol(current).play("OUT");
    sym.getSymbol("mc-something").play("IN");
    sym.setVariable("current", "mc-something");

    sorry, i was kind of confused myself too, don't worry about it but thanks for your patience for reading it anyway

  • Can i show and play music from my external hard drive in iTunes without adding it to my Mac hard drive?

    I have more music than I can keep on my Macbook hard drive by over 200GB. I'm hoping to be able to show and play all music from my external hard drive in iTunes without having to add any of it to my Macbook Hard Drive

    Hello B3NN13,
    If you would like to add the music from your external hard drive to iTunes without copying it to the iTunes Library on your internal hard drive, you may find the following article helpful:
    Add files to your library without adding them to your iTunes folder
    When you add an item already on your computer to your iTunes library, iTunes places a copy of the file in your iTunes folder. The original file remains in its current location.
    You can change this setting so that files are added to your iTunes library without being added to the iTunes folder. You might want to do this, for example, if you prefer to store video files on an external disk but still want to view them in iTunes.
    Choose iTunes > Preferences, and click Advanced.
    Deselect the checkbox next to “Copy files to iTunes Media folder when adding to library.”
    From now on, when you drag a file to your library or choose File > Add to Library, the item appears in iTunes, but the actual file isn’t copied or moved.
    Tip: You can temporarily reverse this setting by holding down the Option key while you drag files to the iTunes window.
    iTunes 12 for Mac: Change where your iTunes files are stored
    Sincerely,
    - Brenden

  • Audibook files can be found and played on the iphone only with spotlight. Help me get them to show and play.

    I download audiobooks to Overdrive console, then all parts are transfered to iphone 4s with IOS 7.1. Files can be found and played on phone only with spotlight. This is a difficult procedure for my wife. Help me to show and play audiobooks downloaded from library using Overdrive. Tried Sync and beboot several timnes.
    Thanks in advance

    I used it once for audiobooks with a phone that had iOS 6, and the audiobook was transferred into the music app.
    I think the audiobook in question was in the WMA format, though, and was converted to MP3 in iTunes and then transferred to my phone, now that I think about it a bit more.
    There is a program/app for the computer that can play liason between phone and computer, rather than just using the app on the iPhone.  That could be contributing to the issue here.
    ~Lyssa

  • A friend of mine sent me a voice memo via text message, it shows and plays in my iPhone as a quicktime voice clip:  So how do i import the clip to my iMac?????? When I sync my iPhone it does not show as a voice memo, I tried emailing it but the email come

    A friend of mine sent me a voice memo via text message, it shows and plays in my iPhone as a quicktime voice clip:  So how do i import the clip to my iMac?????? When I sync my iPhone it does not show as a voice memo, I tried emailing it but the email comes through empty. Please help.

    Copy that voice memo, create a new email and paste it and send it to yourself! You can save it to your computer now and send it to someone else

  • I'm missing a song in my main library that shows and plays from recently ad

    I just imported the Stones 'Shine a Light' CD and one of the songs shows and plays from the "recently added" list but doesn't show or play in the main library.
    Anybody know what's up with that?

    You could also select the song in the Recently Added playlist, control-click it and select "Show in Playlist" and choose Music. It will show you where the song is in your library. Perhaps the track has a guest artist on it and you need to alter the ID tags so that it will sort with the rest of your album.

  • Recording and playing sound input from mic simultaneously in iphone/ipad

    I want to simultaneously record and play the sound from a mic in iphone. As thecricket commentory application.
    Please provide me a solution for this.
    Is this possible in iOs.

    This probably isn't going to sound very helpful, for which I apologise in advance, but I'm afraid it's the truth...
    The only way you stand any way of doing any of this is by using ASIO4ALL, which can aggregate different drivers from multiple devices. But I don't rate your chances too highly, I'm afraid - USB mics have long been the problem child of computer-based audio. On top of that, you are trying to get sounds in and out of a separate device at the same time - not only that, but it's a Creative Labs gamer's device and they are second only to USB mics in terms of the 'difficult' stakes - search this forum!
    A much, much better way to attempt to do this would be to use a sensible ASIO external device with sufficient inputs, and a mic that plugs into it, not a USB one. That way you could route the inputs and outputs appropriately, and use the device's monitoring so that you could monitor what you need to. I wouldn't attempt to do anything like this any other way, I'm afraid. Another approach (which can be made to work well) is to use an external mixer to do most of the work - often it's easier to set up the monitoring on these. You can get mixers with the appropriate interface built-in, and they don't cost a fortune either. Mackie and Behringer make suitable devices.

  • HT1476 My iPhone 4S will charge on a laptop but not from a wall plug. I have tried different boxes and different USB cords from the wall but none work. These boxes and USB cords work for other family members with iPhones. I'm stumped :/

    My iPhone 4S will charge on a laptop but not from a wall plug. I have tried different boxes and different USB cords from the wall but none work. These boxes and USB cords work for other family members with iPhones and a USB cord that works from the laptop won't work from 3 or 4 different wall boxes that work for others. I'm stumped :/

    Update: It seems as though the phone will charge if I plug it in and then turn it off.  It will not charge while the phone is on.  Also iTunes will not recognize it, so I can't sync or anything.  I read somewhere that it could be a fuse somewhere?? Or maybe the dock connector. Where is the best place to get this repaired?

  • I would like to copy all the songs from one Ipod into another. All the songs are into my Itunes account, I tried to drag and drop the songs from the old Ipod to the new one but it doesn't work. Is there a way to do it ?

    Hello everybody,
    I would like to copy all the songs from one Ipod into another. All the songs are into my Itunes account, I tried to drag and drop the songs from the old Ipod to the new one but it doesn't work. Is there a way to do it ?
    I share one Itunes account with other people from my family and one person would like to keep the same songs on the new Ipod as the ones which were on the old one.
    Thanks in advance for your answer.
    Yan

    Hello Chris,
    Thanks for your answer. I was hoping for an easier answer. Too bad there is no drag and drop solution, it would have been much easier.
    Thanks for answering so fast.
    Bye.
    Yan

  • I am trying to copy and paste a story from a blog.  I can only view the first page on the Pages app.  How do I see the rest of the pages?

    I am trying to copy and paste a story from a blog.  I can only view the first page on the Pages app.  How do I see the rest of the pages?

    Thank you.  That helped in the first step.  I was able to copy text onto multiple pages.
    Now I can't get the pictures to copy.  How do I get my pictures to copy?
    Also once the blog page is on pages, how do i make changes to it?
    This my story and the page I am trying to copy.
    http://www.city-data.com/forum/tennessee/359683-going-off-grid-east-tennessee.ht ml
    Thanks so much
    Lisa(writing) and Mike trying to get it right.

  • Does it exist a way to attach sound (and play them) directly from 3d ?

    Hi all,
    I want to know if there is a way to attach sound and play them directly from 3D, like image for background for insteance ?
    see an example >>here<<

    found :
    doc level :
    rm = getAnnotsRichMedia(this.pageNum)[0]; //sound
    JS 3d level :
    host.rm.activated=true;
    host.rm.callAS("multimedia_play");

  • Premiere only showing and playing 1 Audio Track when my file has 2

    I recorded some gameplay while also talking through my mic.
    When I play the .avi file in VLC I'm able to switch between 2 tracks.
    Track 1 has my gameplay sound and track 2 has my voice commentary.
    When I place my file into Premiere it only shows and plays the gameplay sound.
    How do I show both tracks in Premiere so I can edit them separately?

    I got MediaInfo to work, so here's the screenshot (:

  • Macworld: Organize and play your media from a NAS

    Saw this article on Macworld today and thought it might of interest to the community here: Organize and play your media from a NAS

    maxlemke wrote:
    1.  Buy a NAS drive with just ethernet and connect to one of the three port on the Time Capsule?  If so, what is the best drive to buy?
    i recently moved my iTunes library to a NAS. i'm very happy with performance.
    have a look at this discussion.
    as for iPhoto, all i have is a link to a recent discuss over atthe Apple TV forum but don't know how relevant it is: https://discussions.apple.com/message/15366429#15366429
    2.  Use a USB drive and attack to the USP port on the Time Capsule?  If so, will any USB drive work?
    as long as the drive is properly formatted, yes. you may need to use a powered USB hub. the USB connection may or may not be a bottleneck as compared to full gigabit speed of the NAS.

  • Get the ID of a dynamically created symbol from library, INSIDE another symbol.

    Hi everyone,
    I'm trying to get the id from a dynamic created symbol from library.
    When dynamically creating the symbol directly on the stage (or composition level), there's no problem.
    But I just can't get it to work when creating the symbol inside another symbol. 
    Below some examples using both "getChildSymbols()" and "aSymbolInstances" 
    // USING "getChildSymbols()" ///////////////////////////////////////////////////////////////////////// 
    // ON THE STAGE 
    var m_item = sym.createChildSymbol("m_item","Stage");
    var symbolChildren = sym.getChildSymbols(); 
    console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
    // INSIDE ANOTHER SYMBOL
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement()); 
    var symbolChildren = sym.getSymbol("holder").getChildSymbols(); // Am i using this wrong maybe?
    console.log(symbolChildren.length) // returns 0 so can't get no ID either
    // USING "aSymbolInstances"" ////////////////////////////////////////////////////////////////////////// 
    // ON THE STAGE
    var m_item = sym.createChildSymbol("m_item","Stage"); 
    console.log(sym.aSymbolInstances[0]); // ok (i guess) x.fn.x.init[1] 0: div#eid_1391854141436
    // INSIDE ANOTHER SYMBOL
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
    console.log(sym.getSymbol("holder").aSymbolInstances[0]); // Javascript error in event handler! Event Type = element 
    In this post http://forums.adobe.com/message/5691824 is written: "mySym.aSymbolInstances will give you an array with all "names" when you create symbols"
    Could it be this only works on the stage/ composition level only and not inside a symbol? 
    The following methods to achieve the same are indeed possible, but i simply DON'T want to use them in this case:
    1) Storing a reference of the created symbol in an array and call it later by index.
    2) Giving the items an ID manually on creation and use document.getElementById() afterwards.
    I can't believe this isn't possible. I am probably missing something here.
    Forgive me I am a newbie using Adobe Edge!
    I really hope someone can help me out here.
    Anyway, thnx in advance people!
    Kind Regards,
    Lester.

    Hi,
    Thanks for the quick response!
    True this is also a possibility. But this method is almost the same of "Giving the items an ID manually on creation and use document.getElementById() afterwards".
    In this way (correct me if i'm wrong) you have to give it an unique ID yourself. In a (very) big project this isn't the most practical way.
    Although I know it is possible.
    Now when Edge creates a symbol dynamically on the Stage (or composition level) or inside another symbol it always gives the symbol an ID like "eid_1391853893203".
    I want to reuse this (unique) ID given by Edge after creation.
    If created on the stage directly you can get this ID very easy. Like this;
    var m_item = sym.createChildSymbol("m_item","Stage");
    var symbolChildren = sym.getChildSymbols(); 
    console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
    I want to do exactly the same when created INSIDE another symbol.
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
    Now how can I accomplish this? How can I get the Id of a dynamically created symbol INSIDE another symbol instead of created directly on the stage?
    This is what i'm after.
    Thnx in advance!

  • Switch symbols inside another symbol

    hello!
    I have a parent symbol (symbolA) that contain another symbol (symbolB). when I click on the inner symbolB, I want to make it switch with a third symbol (symbolC) always inside the symbolA
    I can't find a solution yet
    many thanks,
    mirko

    Scope in Edge is the hardest. I just posted a sample that should help you.
    http://forums.adobe.com/message/5675763#5675763
    But for your case here it is:
    sym.getSymbol('symbolA').$('symbolB').click(function(){
    sym.getComposition().getStage().getSymbol('symbolA').$('symbolC).play();
    or
    sym.getSymbol('symbolA').$('symbolB').click(function(){
    sym.getSymbol('symbolA').$('symbolC).play();

Maybe you are looking for

  • Maximum size of mouse cursor in Windows 8.1

    What is the maximum size of mouse cursor in Windows 8.1? I load cursor from 1000x1000 .png file using GDI+: Bitmap *image = Bitmap::FromStream(pStream); UINT w = image->GetWidth(), h = image->GetHeight(); HBITMAP bmpMask; HBITMAP bmpColor; image->Get

  • Error while compiling on Solaris 2.5.1

    I am trying to install gzip on a Solaris 2.5.1 Ultrasparc. In that process I get an error when I run make. The error 'Language optional software package not installed'

  • Capture single channel in c++

    Hi, I'm trying to write a simple C++ routing (Visual C++) using the NIDSA functions that generates a sine wave and captures the response data. I can generate a sine wave using NIDSA_configure_source(), but I can't figure out how to get the response d

  • Light room 1 raw files

    I am currently a new lightroom 1 user. It apparently does not support raw camera files. Is there a plug in that I can download so that I can handle these files.

  • Import components to flash cs3

    I would like to know if it is possible to import for example the UIscrollbar, as used in flash8 or flashMX, to Flash CS3. I find the new version of that scrollbar component a bit difficult to work with. I mean, changing the skin colour and all. Besid