Actionscript Inside Movie Symbol

I'm making a flash menu that is a movie symbol. There are sub
menus in this movie that are involved in motion tweening so I made
them movies as well. The animation all works greats but the sub
menus actionscript don't. Does anybody have any information that
will help me? I'm pretty new at this....

Ok...is there anyway you can post the code you wrote?
Otherwise I'm guessing but I'm assuming you have the main menu clip
called something like mcMainMenu (make sure your instance is named
on your stage)
Inside of it you have the sub menus which "each?" is a
movieclip as well? i.e. submenu1, submenu2, submenu3? So that when
you click on either of them it will call the url event....right?
Make sure each of those instances have a name as well (on the
property inspector make sure it doesn't say <InstanceName> if
it does...then that's probably the issue.
If you go to the main timeline of your movie you probably
want to eventually take the code you have assigned to each of the
individual clips and just create a new layer called "actions" and
put something like the following:
mcMainMenu.onRollover = function() {
mcMainMenu.gotoAndPlay("...");
mcMainMenu.subMenu1.onRelease = function() {
getURL("...");
mcMainMenu.subMenu2.onRelease = function() {
getURL("...");
mcMainMenu.subMenu3.onRelease = function() {
getURL("...");
...obviously substituting the correct URL and goto
frame/scene accordingly. But you see there's a hierarchy that is
being followed so that flash knows exactly what item you want to
assign an event to. Hope this helps a bit. If not...zip up your
code and put it somewhere so we can take a look.

Similar Messages

  • How to add actionscript to a movie symbol

    I am a complete newbie to actionscript and flash. I am using
    Flash CS3 with Mac OSX.
    I need to know how to add actionscript to a movie symbol?
    I made a circle and coverted it into movie symbol. After
    selecting it and opening Windows > Actions, it says that the
    currect selection can not have actions applied to it.
    I have also tried ticking the Export for actionscript option
    and leaving the default options on, but still no use.
    can someone please help me?

    ticking Export for actionscript isnt doing anything for you,
    thats to attach a movie from the library... click your movie clip
    symbol, in the properties panel, click where it says 'Instance
    Name', and give it a unique name, lets say, my_mc. then in an
    actions layer, ON A KEYFRAME, add this
    my_mc.onRelease
    or
    my_mc.onRollOver
    or
    my_mc.onRollOut
    and so on, but that's how you reference the movie clip... by
    its instance name

  • How to duplicate a movie symbol

    (sorry, this was in the wrong forum I think) but anyway....
    I have a stage that has some movie symbols, and they are
    controlled by actionscript 2.
    so when you click on the small movie it will load text
    content in an area lower on the stage.
    works fine....
    so how do I duplicate this movie so it will do the same thing
    and be clickable.
    I select duplicate symbol and give it a different name, and I
    drag it onto the stage, but the move does not allow me to click on
    it. It seems it has the same settings as the original and also in
    the script (i created the same code that worked for the source
    movie, that should work with the new one, ie changing variable
    names)
    is there something I am missing?
    using cs3 flash
    thanks

    (sorry, this was in the wrong forum I think) but anyway....
    I have a stage that has some movie symbols, and they are
    controlled by actionscript 2.
    so when you click on the small movie it will load text
    content in an area lower on the stage.
    works fine....
    so how do I duplicate this movie so it will do the same thing
    and be clickable.
    I select duplicate symbol and give it a different name, and I
    drag it onto the stage, but the move does not allow me to click on
    it. It seems it has the same settings as the original and also in
    the script (i created the same code that worked for the source
    movie, that should work with the new one, ie changing variable
    names)
    is there something I am missing?
    using cs3 flash
    thanks

  • Target a textfield inside a symbol?

    I have a symbol called Rectangle and a text field called Counter on the stage. Inside the symbol I have another textfield called Counter2. For the .click event of the symbol I have:
    sym.setVariable("checker", "1");
    sym.$("Counter").html(sym.getVariable("checker"));
    sym.setVariable("checker", "0");
    sym.$("Counter2").html(sym.getVariable("checker")); //error here?
    But I noticed that only Counter is being changed and that Counter2 was not targeted. How do I target Counter2 without having to move it to the main timeline?

    Hi there,
    Try this for the second textfield (assuming "Counter2" is nested in "Counter"):
    sym.setVariable("checker", "0");
    sym.getSymbol("Counter").$("Counter2").html(sym.getVariable("checker"));

  • How to import a flash swf file in premier. Without loosing the animation of the movie symbols.

    HEEELLPPP!!
    I am doing animations in flash... and then putting them in premier as a SWF file..
    but when I do that, the animation does not work properly..
    example : If its a star that spins, and goes from left to right.
    When I put the swf file in premier.. the star only goes from left to right.. without the spin...
    (the  spin was an animation made inside the movie symbol of the star)
    from the forum of flash they send me here.

    from the Premiere Pro Help section about importing SWF files:
    " Interactive content and scripted animation are not retained. Animation defined by keyframes in the main, top-level movie is retained."

  • Layers inside of Symbols

    I'm watching a flash tutorial from cartoon solutions on lip
    synching. In the timeline there are three layers- the head, body
    and sound- and when the presenter clicks on the head graphic symbol
    it opens a different contingent of layers with the component of the
    head(nose, mouth, etc.). This is something that I'm trying to
    duplicate but can't figure out how. I'm using FlashMX and don't
    know if that was a feature added later. There don't appear to be
    any folder icons in the timeline, either.

    and to add to jesse's (thanks), instance names only if
    using/nesting movie clips - i work with
    Graphic symbols as much, if not more than MCs. Just in case
    bippity is not using MCs - since he is
    following along with a cartoonsmart tutorial, most likely
    they are graphics symbols.
    Chris Georgenes
    Animator
    http://www.mudbubble.com
    http://www.keyframer.com
    Adobe Community Expert
    *\^^/*
    (OO)
    <---->
    jesse harding wrote:
    > Chris is exactly right. Just to add to what he said;
    Make sure to give
    > instance names to all your nested symbols (at least any
    you might want
    > to control like the eyes and mouth). That way you can
    control them from
    > the root timeline or even from inside other symbols.
    >
    > Jesse H.
    > Adobe Community Expert
    > My site:
    http://www.jharding.com
    > Free Blog Radio:
    http://www.tornadostream.com
    >
    >> it's a feature in all versions and it is called
    "nesting" - you can
    >> simply place symbols inside symbols. each symbol can
    have any number
    >> of layers and frames.
    >>
    >> Chris Georgenes
    >> Animator
    >>
    http://www.mudbubble.com
    >>
    http://www.keyframer.com
    >> Adobe Community Expert
    >> *\^^/*
    >> (OO)
    >> <---->
    >> bippity wrote:
    >>
    >>> I'm watching a flash tutorial from cartoon
    solutions on lip
    >>> synching. In the timeline there are three
    layers- the head, body and
    >>> sound- and when the presenter clicks on the head
    graphic symbol it
    >>> opens a different contingent of layers with the
    component of the
    >>> head(nose, mouth, etc.). This is something that
    I'm trying to
    >>> duplicate but can't figure out how. I'm using
    FlashMX and don't know
    >>> if that was a feature added later.
    >>>
    >
    >

  • Revert 'invalid' not working for draggable inside a symbol

    I have a system set up where several items can be dragged but only certain ones ("hairy") can drop into a location.
    like this:
    sym.$('creatureD').draggable({opacity:.5, revert:'invalid', scope:"hairy"}); 
    sym.$('creatureA').draggable({opacity:.5, revert:'invalid'});
    It works great on the main stage but for organizational regions I wanted to move this section of the activity into its own symbol. Now that this is inside a symbol, when the items are dragged they don't bounce back to their original locations - they are off a little bit with each mouse drag and drop. I'm not sure how to set or get the "revert" function to recognize the coordinate system inside the symbol.
    Any help would be appreciated. Thanks.

    So I resolved this problem and want to post about it in case other people encounter this issue. I discovered the actual issue by moving all the symbols back onto the main stage and setting up the drags there as before. There I discovered the same behavior was occuring even without being in a nested symbol.
    It actually had nothing to do with having the draggables inside a symbol. For this version of the project I had scaled the symbols being dragged to 80% using Transform in the Edge program itself, thinking nothing of it. (I had wanted to scale them back to 100% when the activity continued so set it up this way on purpose) Anyway, having the elements scaled caused problems with revert in the draggable function. Once I exported new elements with the scaling applied before using in Edge, the problem was resolved.
    TL;DR: Revert for a draggable won't work properly with an element that has been transformed (scaled) within Edge. Scale it prior to using in Edge.

  • ActionScript inside Movieclip is SOMETIMES ignored

    Hi,
    I am working on something similar to a slideshow where
    buttons are used to move forward and backward in the time line.
    On one of these "slides" there is another button, a MovieClip
    with a few frames inside (i.e. the rollover and mousedown states
    etc.) and ActionScript in Frame 1 that make the button work
    (rollovers and the like).
    If I play forward in this slideshow, everything works.
    If I play backwards to the frame that has this button, then
    all ActionScript inside this button is completely ignored
    (including trace), and the button will endlessly cycle through the
    frames inside (even though I tried various STOP commands from
    inside and outside the movieclip).
    The interesting thing is that I have a very similar slideshow
    with a similar button that does NOT have this issue. If I
    copy/paste the working button to replace the bad one, the same
    thing happens to this button, so it somehow is local to this one
    file.
    There are no error messages coming up, and I don't even know
    if there IS any code that would disable script inside a movieclip.
    I checked the code inside the MovieClip and found nothing
    wrong - it only has the stop command, a few addevenlisteners and
    their corresponding functions in frame 1.
    I just don't get why it works in one file but not in this one
    - the best part is that whenever I create a new slideshow, I simply
    create a copy of the last slideshow file, so the basics of all
    these files should be identical...
    Another thing that completely throws me for a loop is that
    when I add any random shape (e.g. a square) into the frame that has
    the BACK button that brings me to the broken button, then it works!
    So I have a workaround, but I would really like to know what
    causes this - I'd prefer a fix to a workaround that might break
    some day, too.
    Any idea what could possibly cause something like this and
    what I can do about this?
    Thanks!

    you probably have a corrupt swf.
    to test, copy all the assets to new swf and see if the problem persists.

  • 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

  • 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

  • How can I change the color of a object inside a symbol?

    Hello!
    I'm working on this study and I need to change the color of an object inside a symbol when I click another object.
    The object is called "bola", wich is inside the symbol "ponto" and the clicking object are the colored pencils (each pencil should change the color of the symbol's object, giving the impression you'd selecting a different pencil to draw).
    I think it's simple to understand what I mean when you see the files.
    I already tried this line on click event of the pencils, but it didn't work:
    sym.getSymbol("ponto").$("bola").css("color","#123456");
    Anyone knows how to make that work?
    I would like to improve the experience of drawing as well. I made it with the "mousedown" event. Is that a better way to get a similar effect?
    My files
    Thanks a lot,
    Clayton F.

    Ok here is another sample:
    http://www.meschrene.puremadnessproductions.net/Samples/HELP/LapisB/Lapis.html
    http://www.meschrene.puremadnessproductions.net/Samples/HELP/LapisB/Lapis.zip
    You need to create a var that changes the css background color..
    Hopefully you can understand what I did...
    The text I left showing so that you could see it change...
    I updated the files and all colors should work now.
    Message was edited by: ♥Schrene

  • Insert JQuery .html into text field nested inside of symbol

    This is one of those, 'it should be so simple....so of course, it's not' question.
    Got a nested symbol. Rather simple one. Inside the symbol is a background rectangle and a text field. When I click a button, it should insert the HTML I give it from the click event.
    Now initially I did this by just using the text field by itself. No nesting. This is the code:
    sym.$("copy").html("Edge Rocks!");
    OK, success! The text loaded just fine.
    Now let's insert that text field inside of a symbol. And let's call that symbol 'content'.
    Now I try....
    sym.$("content").$("copy").html("Some new text");
    Result? Nothing.
    Tried using stage instead of sym and even added a var stage = sym.getComposition().getStage() statement before that. Nope.
    Yea, they don't make it easy. So what's the solution?
    Here's my example file.
    https://www.dropbox.com/s/5n1ehhsp7r3rbt6/text.zip?m
    BTW, ran this in Firebug's console. No errors.

    Yes and no, Elaine. Kind of confusing but if the button is directly on the stage, that code works. However, if that button gets nested inside of its own symbol, the code no longer works and a JS error appears in console.
    So in other words, the button and the text field are nested inside of symbols, but not the same symbol. So it's a question of the path being used.
    I tried switching sym to Stage to no effect.
    Redid the test file and uploaded it to Dropbox:
    https://www.dropbox.com/s/ha24ki0wp0fb2nw/text2.zip?m

  • Calling a function inside a symbol?

    Hi there,
    I'm one of those flash-devs that are trying to get Edge Animate to do what I usually do in Flash, so I might be doing this the wrong way, but I've got a symbol with a function "inside" on my stage, and I wanna call that function from the stage.
    I've been trying to use sym.getComposition().getStage().getSymbol("symbolName").functionName(); but it doesn't work.
    I don't have any problems manipulating the symbol itself by calling .play() or .hide() so I know the path works....can anyone show me the right syntax to call a function inside a symbol?
    Thx in advance

    Hi Abnesher,
    An important principle to grasp is that symbols (and the stage is one of them) lies in parallel, despite the fact of instances of different symbols being nested one in another (and all in fine nested in the stage).
    The consequence is that from inside your nested symbol you have no direct visibility of the function defined inside the stage symbol !
    Inside the Stage symbol, in the document.compositionReady event handler :
    sym.yourGlobalFunction = function( firstParameter)
      // your stuff
    Inside another symbol, in one of its events handlers :
    sym.getComposition().getStage().yourGlobalFunction( 5);
    Gil

  • 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!

  • My movie symbol not working in main timeline

    The symbol works in its own movie timeline, the keyframe length is the same length on both the movie symbol timeline and the main timeline.
    But movie symbol refuses to play on the main timeline.
    Any ideas?

    If it is a movieclip symbol, it doesn't need to have any more than one frame in whatever timeline you place it in to be able to play in its entirety.  What controls are you using to make it play?  Does the movieclip have any stop() command in its first frame(s)?

Maybe you are looking for

  • Help installing itunes on laptop with Windows Vista.

    I have a laptop with Windows Vista.  I've tried to download iTunes but I keep getting a message that says "There is a problem with this Windows Installer package.  A program required for his install to complete could not be run.  Contact your support

  • Recommended transition solution for ISP:s with enterprise customers?

    What would be the recommended solution(s) for ISP:s with enterprises only as customers? It both needs to support IPv6 and at the same time save IPv4 resources. Thanks in advance!

  • "The system cannot find the path specified" error

    Hi, Thanks for taking the time and reading. I had to update an old report that was made in CrystalReports. I copied the rpt files and pasted them into a csharp solution in VS 2010. The report structure is of a Main report and 6 subreports. I have to

  • Java.lang.NullPointerException in apple.awt.CTextField

    Hi, an applet running for many years fine on a number of Java VMs, suffers a strange problem with the Apple VM. All single-line text fields appear disabled (greyed out). On the Java console, the following exception is recorded: Exception in thread "A

  • What is the best file format for importing photos into Imovie?

    What is the best format to save photos in before bringing into Imovie? What is the best resolution for them and what is the best size? These will eventually be ported over to IDVD. It seems that as jpgs Imovie didn't recognize them, but as psds it di