Embedding Button symbol from swf

Hi,
I am embedding a Button Symbol into Flex from from a swf. The Button inside the swf has an up and over state. Now I embed the symbol into an image in Flex. The image is in one of my states.
All works fine initially  in Flex as far as the up over state. Now the  The problem is when I go back to the base state and then back to the state with the embedded swf symbol.....it initializes still in the over state, until I mouse over then mouse out and now its in the Up state.   What could be the probelm here??
thanks for taking time to look at this!
-Mike
// -- SWF EMBED ---
            [Embed(source="skins/ICD9_ReferenceCodes_v2_3_blue.swf", symbol="back_btn_button")]
            [Bindable]
            public var BadApple:Class;
// -- SWF EMBED END --
<mx:State name="search_code">
            <mx:RemoveChild target="{vbox1}"/>
            <mx:SetProperty target="{text1}" name="text" value="Code Search:"/>
            <mx:SetProperty target="{text1}" name="x" value="130"/>
            <mx:SetProperty target="{text1}" name="y" value="136"/>
            <mx:RemoveChild target="{image1}"/>
            <mx:AddChild position="lastChild">
                <mx:Image  id="image_BackBtn1" x="11" y="74.95" source="{BadApple}"
                          click="OnClickNewSearch(event)"
                          />
            </mx:AddChild>
            <mx:SetProperty target="{image_BackBtn1}" name="y" value="74.95"/>
        </mx:State>

Alex,
I'm not  following  you, why do I need a button?.....can create Mouse over and out events like this?:
var event:MouseEvent = new MouseEvent(MouseEventMouseEvent.MOUSE_OVER.);
myImage.dispatchEvent(event);
var even2t:MouseEvent = new MouseEvent(MouseEventMouseEvent.MOUSE_OUT.);
myImage.dispatchEvent(event2);
would this work?
BTW any idea if this is a Bug or known issue that I'm experiencing?
-Mike

Similar Messages

  • GS-12: Creating button symbols | Learn Flash Professional CS5 & CS5.5 | Adobe TV

    Create a button symbol from text, a bitmap image, or a vector shape. Define keyframes for the up, over, down, and hit states of the button, and swap out the artwork for the different states.
    http://adobe.ly/AsOppx

    I am watching the tutorial over "creating button symbols." When it gets to the part where while in the over keyframe you are supposed to click on swap, my properties panel looks different and does not have a swap button. Any suggestions?

  • Importing flash symbols from an external SWF using URLrequest

    Hello.
    I'm trying for several days now to properly import flash symbols into a flex application.
    i can't only @Embed because the swf file that contains the skins will not be available locally so i need to use URLRequest.
    This is what I've got so far.
    1. I created a flash file, lets call it foo.swf that contains several elements in the library and each element has both `Export for ActionScript` and `Export for runtime sharing` on. one of the elements is called 'test' which is a movieclip of an image.
    2. i created a flex project that creates the swf flashSkins.swf that contains the following Wrapper class:
            package
                import flash.display.Sprite;
                    public class Wrapper extends Sprite
                     [Embed(source="foo.swf",symbol="test")]
                        [Bindable]public static var test: Class;
    I tested to make sure that this class properly fetchs symbols from the flash file properly
    using the following code:
        <fx:Script>
            <![CDATA[
                public var wrapper:Wrapper;
            ]]>
        </fx:Script>
            <mx:Image source="{Wrapper.test}"/>
    it loads the image and shows it properly.
    3. I created another swf file that will fetch the flashSkins swf and import the Wrapper class from it. this is where i fail.
            public function loadSkins():void
                    bgLoader = new Loader();
                    var bgURL:URLRequest = new URLRequest('http://files.xpogames.com/flashSkins/flashSkins.swf');
                    bgLoader.contentLoaderInfo.addEventListener(Event.INIT,onLoaded);
                    bgLoader.load(bgURL);
                public function onLoaded(e:Event):void {
                    var clazz:Class = bgLoader.contentLoaderInfo.applicationDomain.getDefinition('Wrapper') as Class;
                    var a:Object = new clazz();
                    theimage.source=a.test;
            ]]>
          </fx:Script>
            <mx:Image id="theimage" />
    I tried using getDefinition with 'wrapper' or 'Wrapper' but on both cases i get an error that the variable is not defined.
    any ideas?

    Did you try using the Event.COMPLETE instead of Event.INIT?

  • How do I Re enabled the Buttons in MainMovie.swf from a Button within SecondMovie.swf???

    I have the following situation
    MainMove.swf is doing a loadmovie of SecondMovie.swf
    The Button that loads SecondMovie.swf also disables other buttons in MainMovie.swf
    on (release) {
        _root.intro_btn.enabled = false;
        loadMovieNum("SecondMovie.swf", 2);
    How do I Re enabled the Buttons in MainMovie.swf from a Button within SecondMovie.swf???
    Using AS2 is this current project
    Thanks

    lol Sorry bout that I'm brand new here and was looking for the option to remove the post from the other location.

  • Is it possible to stop the same swf button file from having to reload on different html pages

    Please view my website below. Any help would be appreciated. Each time you go to another page the buttons flash white while having to reload. Is there any way around this?
    http://www.kineticcreativeco.com/

    you could also try using the proper bgcolor parameters in your embed code and setting the color to black. this will most likely get rid of the white flash.
    here is some old sample code:
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
         codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
         WIDTH="320"
         HEIGHT="240"
         id="slideshow">
    <PARAM NAME="movie" VALUE="slideshow.swf" />
    <PARAM NAME="quality" VALUE="high" />
    <PARAM NAME="bgcolor" VALUE="#000000" />
    <param name="allowScriptAccess" value="sameDomain" />
    <EMBED src="slideshow.swf"
         quality="high"
         bgcolor="#000000"
         WIDTH="320"
         HEIGHT="240"
         NAME="slideshow"
         allowScriptAccess="sameDomain"
         swLiveConnect="true"
         TYPE="application/x-shockwave-flash"
         PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
    </EMBED>
    </OBJECT>
    i would recommend: using swfObject instead and also putting all your buttons in one swf.

  • Buttons in External SWF's

    Using Flash CS3 AS2.0
    I need to know if it is possible to make a button in an external
    swf. file loaded in a Main .fla to link to another frame or label
    in another external swf. movie. If so, how do I do it?
    I have a main flash file for my website with a portfolio
    gallery with 9 buttons.
    I have 8 external .swf files for all my galleries. (eg.
    branding.swf, packaging.swf, displays.swf, etc....)
    Within those galleries I have 9 buttons that make up each
    individual gallery.
    The buttons reveal a large thumbnail with some text that
    explain what the image is.
    In some of the galleries I have some text that want the
    viewer to be directed to another gallery to view another piece of
    artwork that relates to this one.
    These .swf files are loaded in my main flash file using the
    loader components.
    I thought I read somewhere that when you use the loader
    components, action code will not work.
    Do I need to change all my loader symbols to symbols that use
    the _movieloader actioncode?
    Here is a look at my test site to see what I am talking
    about:
    http://manganinc.pieper.com/piepert/index.htm
    In the
    Portfolio section you will find the gallery buttons and if
    you click on
    Product Packaging
    (this is the first button), a .swf movie will load and 9
    buttons slide down and when you click on the 3rd button over at the
    top Nutro MAX Cat Bags will show up,
    the text under the thumbnail will have text that reads "Also
    see the
    case study for this project."
    This case study has a invisible button on top of it and I
    want to direct that to the case studies page in my Main Flash file.
    Another link is in the 2nd button down from the top in the
    same gallery which is Autopage packaging. There is text under the
    thumbnail that reads:
    "Also see the
    brochures and the
    in-store display "
    Here I need the button to link to the at least just the
    brochures gallery and the displays gallery.
    In my MAIN .fla I have all these galleries lableled. Meaning
    in my action layer these sections are labeled to their according
    gallery name.
    Hope this makes sense. Please help me if you can!

    if you're publishing for fp 10, use unloadAndStop() after the first load.

  • ComboBox and button symbol interaction

    (Sorry-- I had this posted in ActionScript as well -- not
    really an AS issue...)
    I thought it would be easier for folks if they didn't have to
    create this from scratch:
    Here is the
    Sample
    SWF
    and the
    Souce
    FLA
    Greetings --
    I traced back a bug that I was having to its most basic level
    and was surprised that it happens with only a ComboBox component
    and a button symbol... I traced it back so far that it got rid of
    all of my ActionScript and was left with only these two interface
    elements:
    Set-up: Create a new Flash document, ActionScript 2 / Flash
    8. Drag in a combobox component and add a label. Create a new
    button symbol and define up, over, down and hit states and drag
    this in as well...
    When you try test this movie, you get strange behavior...
    Give the button a few clicks to see that it is working properly.
    Then, click on the combobox to open it and then go back to the
    button. The button will work the first time tried, but will not
    work properly with subsequent attempts. It seems that the states of
    the button are getting confused after the combobox is used?
    (help!?)
    Could there be a work-around to this? Thank you in advance
    for you assistance with this issue...!

    I have Flash Player 9 (9,0,115,0) on my Mac, and am getting
    the same behavior on Windows XP...
    Perhaps try not moving the mouse between subsequent clicks
    will make it more apparent... I select something from the combobox.
    Then, the first click on the button works properly... but when you
    release the button (and don't move the mouse) it returns to the "up
    state" (not "over state"). Additional clicks don't respond with a
    "down state"... it just flashes the "over state" momentarily.
    It's causing me troubles because my interface asks users to
    first select from a combobox to navigate and then they can click to
    subsequent items with a button: next, next, next... to page through
    the selection. But this strange interaction is hanging up the next
    button on the second click (it never gets the down state).
    Thanks for checking it out... I sure would appreciate any
    thoughts on the matter...

  • How do I control Edge symbols from external javascript?

    I have come across about a dozen similar discussions, but most have presented solutions that worked in earlier versions of Edge and no longer work.
    I am trying to use Edge to build animations that can then be integrated into larger non-Edge projects. I would like to then be able to control the Edge timeline or Edge symbols from elements OUTSIDE of Edge, such as another link or button in the page.
    I cannot seem to figure out how to properly reference the Edge stage or symbols.
    I have come across several proposed solutions for referencing Edge stage, such as:    
         var comp = AdobeEdge.getComposition("EDGE-966604542");
         var stage = comp.getStage();
         var comp = $.Edge.getComposition("EDGE-966604542");
         var stage = comp.getStage();    
         var comp = Edge.getComposition("EDGE-966604542");
         var stage = comp.getStage();
         and these either DO NOTHING or throw errors about either AdobeEdge or Edge or comp being undefined.
         Does anyone have a solution that really works with the current version of Edge Animate?
    Thanks
    Scott

    i created a Trigger @ 0ms and moved the function there...
    function hello(){
         alert("hello");
    still not getting the alert to fire with this in the external js:
    var comp = AdobeEdge.getComposition(compId).getStage();
    comp.hello();
    any thoughts?

  • How do you remove a symbol from the stage in Edge animate?

    Hello-
    I'm wondering how to remove a symbol from the stage in Edge Animate so you can jump to another place in the timeline.  In Flash, the symbol was only on the stage for the amount of frames you indicated.  Not sure how it works here.
    For example, I have 2 buttons on my first screen with some text that animates in.  I want the button click to take the user to another section in the timeline or (basically another scene, like in Flash)  that contains different content.  If I change the visibility the buttons are still there and will ( I assume) create problems when other elements are placed on top. 
    Or is the only way with code.  If that is the case what would that code be?
    I would appreciate any help.
    Thank you!

    What I usually do, is, once you have everything set up in the scene you are done with. highlight it all
    right click
    group elements in DIV
    Now all those items act as 1 group and then you give it a properties name, much like a symbol.
    THEN you can refer to that scene name and move it anywhere or hide it and slide in another scene that has the content for that next scene.
    basically you take all the elements that make up 1 scene, gruop it up, name it, and then in the code for the button say something like:
    on click:
    scenename.play(framenumber);
    that will then animate that scene according to any animation you gave it, such as moving to the left, off stage. while moving scene 2 that you create into the stage.
    or just have something like this hide it
    sym.$("scenename").hide();
    sym.$("scene2name").show();
    but if you do that, make sure in your CompositionReady code you hide all scenes EXCEPT the 1st one, so the user doesnt see them all instanatly anyway.

  • Illustrator script to create symbols from images in folder

    Time to give back to the community...
    Here is a script I recently devised to bulk create symbols from images in a folder. Tested with Illustrator CC 2014.
    // Import Folder's Files as Symbols - Illustrator CC script
    // Description: Creates symbols from images in the designated folder into current document
    // Author     : Oscar Rines (oscarrines (at) gmail.com)
    // Version    : 1.0.0 on 2014-09-21
    // Reused code from "Import Folder's Files as Layers - Illustrator CS3 script"
    // by Nathaniel V. KELSO ([email protected])
    #target illustrator
    function getFolder() {
      return Folder.selectDialog('Please select the folder to be imported:', Folder('~'));
    function symbolExists(seekInDoc, seekSymbol) {
        for (var j=0; j < seekInDoc.symbols.length; j++) {
            if (seekInDoc.symbols[j].name == seekSymbol) {
                return true;
        return false;
    function importFolderContents(selectedFolder) {
        var activeDoc = app.activeDocument;     //Active object reference
      // if a folder was selected continue with action, otherwise quit
      if (selectedFolder) {
            var newsymbol;              //Symbol object reference
            var placedart;              //PlacedItem object reference
            var fname;                  //File name
            var sname;                  //Symbol name
            var symbolcount = 0;        //Number of symbols added
            var templayer = activeDoc.layers.add(); //Create a new temporary layer
            templayer.name = "Temporary layer"
            var imageList = selectedFolder.getFiles(); //retrieve files in the folder
            // Create a palette-type window (a modeless or floating dialog),
            var win = new Window("palette", "SnpCreateProgressBar", {x:100, y:100, width:750, height:310});
            win.pnl = win.add("panel", [10, 10, 740, 255], "Progress"); //add a panel to contain the components
            win.pnl.currentTaskLabel = win.pnl.add("statictext", [10, 18, 620, 33], "Examining: -"); //label indicating current file being examined
            win.pnl.progBarLabel = win.pnl.add("statictext", [620, 18, 720, 33], "0/0"); //progress bar label
            win.pnl.progBarLabel.justify = 'right';
            win.pnl.progBar = win.pnl.add("progressbar", [10, 35, 720, 60], 0, imageList.length-1); //progress bar
            win.pnl.symbolCount = win.pnl.add("statictext", [10, 70, 710, 85], "Symbols added: 0"); //label indicating number of symbols created
            win.pnl.symbolLabel = win.pnl.add("statictext", [10, 85, 710, 100], "Last added symbol: -"); //label indicating name of the symbol created
            win.pnl.errorListLabel = win.pnl.add("statictext", [10, 110, 720, 125], "Error log:"); //progress bar label
            win.pnl.errorList = win.pnl.add ("edittext", [10, 125, 720, 225], "", {multiline: true, scrolling: true}); //errorlist
            //win.pnl.errorList.graphics.font = ScriptUI.newFont ("Arial", "REGULAR", 7);
            //win.pnl.errorList.graphics.foregroundColor = win.pnl.errorList.graphics.newPen(ScriptUIGraphics.PenType.SOLID_COLOR, [1, 0, 0, 1], 1);
            win.doneButton = win.add("button", [640, 265, 740, 295], "OK"); //button to dispose the panel
            win.doneButton.onClick = function () //define behavior for the "Done" button
                win.close();
            win.center();
            win.show();
            //Iterate images
            for (var i = 0; i < imageList.length; i++) {
                win.pnl.currentTaskLabel.text = 'Examining: ' + imageList[i].name; //update current file indicator
                win.pnl.progBarLabel.text = i+1 + '/' + imageList.length; //update file count
                win.pnl.progBar.value = i+1; //update progress bar
                if (imageList[i] instanceof File) {         
                    fname = imageList[i].name.toLowerCase(); //convert file name to lowercase to check for supported formats
                    if( (fname.indexOf('.eps') == -1) &&
                        (fname.indexOf('.png') == -1)) {
                        win.pnl.errorList.text += 'Skipping ' + imageList[i].name + '. Not a supported type.\r'; //log error
                        continue; // skip unsupported formats
                    else {
                        sname = imageList[i].name.substring(0, imageList[i].name.lastIndexOf(".") ); //discard file extension
                        // Check for duplicate symbol name;
                        if (symbolExists(activeDoc, sname)) {
                            win.pnl.errorList.text += 'Skipping ' + imageList[i].name + '. Duplicate symbol for name: ' + sname + '\r'; //log error
                        else {
                            placedart = activeDoc.placedItems.add(); //get a reference to a new placedItem object
                            placedart.file = imageList[i]; //link the object to the image on disk
                            placedart.name =  sname; //give the placed item a name
                            placedart.embed();   //make this a RasterItem
                            placedart = activeDoc.rasterItems.getByName(sname); //get a reference to the newly created raster item
                            newsymbol = activeDoc.symbols.add(placedart); //add the raster item to the symbols                 
                            newsymbol.name = sname; //name the symbol
                            symbolcount++; //update the count of symbols created
                            placedart.remove(); //remove the raster item from the canvas
                            win.pnl.symbolCount.text = 'Symbols added: ' + symbolcount; //update created number of symbols indicator
                            win.pnl.symbolLabel.text = 'Last added symbol: ' + sname; //update created symbol indicator
                else {
                    win.pnl.errorList.text += 'Skipping ' + imageList[i].name + '. Not a regular file.\r'; //log error
                win.update(); //required so pop-up window content updates are shown
            win.pnl.currentTaskLabel.text = ''; //clear current file indicator
            // Final verdict
            if (symbolcount >0) {
                win.pnl.symbolLabel.text = 'Symbol library changed. Do not forget to save your work';
            else {
                win.pnl.symbolLabel.text = 'No new symbols added to the library';
            win.update(); //update window contents
            templayer.remove(); //remove the temporary layer
        else {
            alert("Action cancelled by user");
    if ( app.documents.length > 0 ) {
        importFolderContents( getFolder() );
    else{
        Window.alert("You must open at least one document.");

    Thank you, nice job & I am looking forward to trying it out!

  • What is the best way to delete dynamically-generated symbols from another symbol?

    in the onClick handler for 1 symbol, I have:
    var sandwhichQty1 = sym.createChildSymbol("sandQty1", "Stage");
    another symbol inside sandQty1 has the onClick method:
    this.deleteSymbol();
    which works fine, deleting sandQty1. I'd like to delete it, and others, from another button, in the circumstance where users don't close them this way.
    I notice that id and class are dynamically assigned to the child symbol, which makes it hard for me.
    any ideas?

    Hi, I did it in this way, and functions well; maybe this is not the best way, but worked for me. Obviously this code is based on the elainafineell's correct solution.
    This is my scenario:
    In a Trigger @ xxxxms there is that:
    var i = 1;
    $.each(results, function(index, element)
         var s = sym.createChildSymbol("mySymbol", "someContainer");
         // some code here
         // Creating the variable that save my new instance of mySymbol
         sym.setVariable("var_id"+i, s);
         i++;
    // a global var, take care with the name
    numOfInstances = i;
    Then, in a click action of some button, symbol, anything that support an action, I code this:
    sym.eraseSymInstance();
    And, in the creationComplete, I code the function like this:
    sym.eraseSymInstance = function()
              for(var i = 1; i <= numOfInstances; i++)
                             var s = sym.getVariable("var_id"+i);
                             s.deleteSymbol();
    For me function well.
    I hope this can be usefull for somebody else.

  • JSAPI: How can I edit a button symbol?

    Hi,
    I have written an export script for Flash CS3 using the
    Javascript API, and now I want to port it to Fireworks CS3. The
    first problem I ran into was that I could not access a button
    symbol's state frames via script - the closest I get is up to the
    Instance object, but I could not access the frames or layers
    inside. I used a for-each-loop to trace all of the Instance
    object's properties but did not find anything that could have
    helped me.
    Then I had another idea: I noticed that unlike Flash,
    Fireworks opens button symbols as a new document when I edit them.
    And the Fireworks Document object does indeed have a property
    called "isSymbolDocument" that returns true if a document "is a
    symbol-editing window."
    But once again I stumbled upon a problem, namely that I did
    not manage to find a "symbol editing command" (the equivalent to
    double-clicking it) in the Javascript API. :(
    I'd be grateful for any hints, maybe there is even a much
    easier way to access button symbol states?
    Greetings,
    Jochen

    I'm not sure if I fully understand your question, but I'll give a shot at what I think it is. If you want a button that can be pressed so that its states go from
    "on, off, red., on, off, red." etc. you will have to use a bit of trickery. In this case it is best to use a picture ring to give the controls the image you want and place a boolean button OVER the ring control. Make the boolean control completly transparent, resize it to cover the entire picture ring, and make sure the boolean is ABOVE the ring by using "move to front". You will then have to have a loop checking the boolean button for a press, and then modify the pic ring accordingly and take your "control value" off of the pic ring. I'd suggest finding a work-around if you can, as this is a lot of work to go
    through.

  • IB Error: Unable to read symbols from "UIKit" (not yet mapped into memory)

    I created a simple view program for iPhone, using IB to add a button and a label, once the button is clicked, the label text is changed.
    I am able to compile it fine, and ran it. The program/view showed up. But when I clicked on the button, the console showed this message:
    This GDB was configured as "i386-apple-darwin".warning: Unable to read symbols for "/System/Library/Frameworks/UIKit.framework/UIKit" (file not found).
    warning: Unable to read symbols from "UIKit" (not yet mapped into memory).
    I checked UIKit info, it's physically (full path) at:
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/System/Lib rary/Frameworks/UIKit.framework
    The relative path to SKD is:
    System/Library/Frameworks/UIKit.framework
    I'm running the latest SDK beta 8, OS X 10.5.4 latest update.
    Anyone had this bizarre problem? I was able to run all Apple samples fine.
    Please help!
    THanks!

    The answer is mentioned in a few other posts, but I thought I'd repeat it here, so that it's easier to find this solution in the future.
    I got the same problem trying to build an iPhone-Simulator application using another build process -- in this case, Boost Build. When I tried to run the program, it gave me the same nonsensical dynamic-library error.
    The problem is that the application you built for the iPhone Simulator is NOT a real application, even though it looks like one. You need to run it from within Xcode.
    In my case, I got around the problem by building the GLPaint sample using Xcode, copying over the executable it generated with the one I generated via Boost Build, then running GLPaint (actually my program now) from within Xcode. Then it worked.
    So far, it seems that Macintosh and iPhone are very unfriendly platforms to someone that's trying to port an existing project. Any attempt to do something, without completely buying into the Apple way of doing everything, leads to a torrent of cryptic undocumented errors. Even an old Unix guru like me can't keep up.

  • Web link from SWF

    Hi I am trying to create a small animation half the size of a
    banner and add it to a webpage, at the end of the animation I want
    a button to link and open a website.
    I have done the animation and at the end i have added some
    text and turned into a button symbol added the web on (release) {
    //Goto Webpage Behavior
    getURL("
    http://www.???","_blank");
    //End Behavior
    Doesnt seem to work

    Sharky91 wrote:
    > Hi I am trying to create a small animation half the size
    of a banner and add it
    > to a webpage, at the end of the animation I want a
    button to link and open a
    > website.
    >
    > I have done the animation and at the end i have added
    some text and turned
    > into a button symbol added the web on (release) {
    >
    > //Goto Webpage Behavior
    > getURL("
    http://www.???","_blank");
    > //End Behavior
    >
    > }
    >
    > Doesnt seem to work
    the action is correct, will need to see the source file,
    perhaps you apply
    it incorrectly.
    You will need to upload the source and let us check,
    otherwise we can't just guess
    from here, way too many places it could go wrong.
    Regards
    Urami
    Happy New Year guys - all the best there is in the 2006 :)
    <urami>
    http://www.Flashfugitive.com
    </urami>
    <web junk free>
    http://www.firefox.com
    </web junk free>

  • Delete child symbol from stage

    Hi All,
    I need help deleting a symbol from the stage.  I have a list of symbols that are called to the stage at some point in a simulation. When the user leaves one symbol, it is supposed to delete itself and call up another (specific) symol.  For example.  I called the symbol “AR-HistAims” to the stage using
    var mySymbolObject = sym.createChildSymbol("AR-HistAims", "Stage");
                mySymbolObject.getSymbolElement().css({'position':'absolute','left': (mouseX - offset.left)/sx , 'top': (mouseY - offset.top)/sy});
                mySymbolObject.play();
    This works fine.  I place an invisible button in the symbols timeline and when it is clicked I want it to do two things. 
    call up “AR-percPass” (using the same code as above with a percPass in place of HistAims)
    remove “AR-HistAims” from the stage. 
    I can’t seem to get #2 to work.  I’ve tried codes below and above the code for #1.  When placed above, it deletes the current symbol, but doesn’t call up the new one.  When placed below, the new symbol appears on top of the old one.  The codes I've used are:
                var childSymbols=sym.getComposition().getSymbols("AR-HistAims");
                for(var i=0; i<childSymbols.length; i++)
                childSymbols[i].deleteSymbol();
    //and
                var mySymbolObject = sym.getParentSymbol().getSymbol("mySymbol").getVariable("AR-HistAims");
                stage.deleteSymbol();
    //and
    sym.getParentSymbol().deleteSymbol();
    Any advice would be appreciated.
    Thanks
    Randy

    Hi Randy,
    There are a few corrections you need to make in index_edgeAction.js file like as follows:
    1. In click handler, you don't have access to  mouseX, offset, sx, sy etc.
         mySymbolObject.getSymbolElement().css({'position':'absolute','left': (mouseX - offset.left)/sx , 'top': (mouseY - offset.top)/sy});
         So, make it like this:
         mySymbolObject.getSymbolElement().css({'position':'absolute','left': 0 , 'top': 0});
         Make these kind of changes for every click handler where you have used mouseX, offset, sx, sy etc, with appropriate left and top values.
    2. Just search for sym.getSymbolElement().deleteSymbol(); and replace it with sym.deleteSymbol();
    3. Comment out line#1366  having statement sym.deleteSymbol ();
    4. Search for sym.getSymbol(home).deleteSymbol(); and replace all such occurences with sym.getSymbol("home").deleteSymbol();
    With the above changes, things will work.
    hth,
    Vivekuma

Maybe you are looking for