Stage Variable can also be called on click event?

Good Day guys, i just started using edge, and would like to know if the variable i set on the stage creation complete can also be called on a click event?
something like this:
stage creation complete:
var x = function()
console.log("x");
on click event:
var y = function(){
console.log(x+y);

Hi,
You've got:
1) Within the same symbol:
sym.setVariable("the variable name", value); ==> as indicated (set) you set one value. For instance: sym.setVariable("x", 3). It means x=3.
sym.getVariable("the variable name"); ==> as indicated (get) it returns value. In your case: sym.getVariable("x") returns 3.
For instance:
creationComplete: sym.setVariable("x", 3);
click event: var y = sym.getVariable("x"); // now y=3;
2) Between symbols.
You add before: sym.getComposition().getStage().
sym.getComposition().getStage().setVariable("the variable name", value);
sym.getComposition().getStage().getVariable("the variable name");
For instance:
"Stage" symbol/compositionReady: sym.setVariable("x", "Hello World!");
"symbol1"/click event: sym.getComposition().getStage().getVariable("x") will return "Hello World!".
Edge API: http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html#symbolinstance
Are you stuck?

Similar Messages

  • How can i call mouse click event from keypress event???

    How can i call mouse click event from keypress event???
    I want same GUI changes to be occured at key press.....i.e . button going down & comming up.....
    for calculator

    Put all the code that happens on those events into a method. Then call that method from both events.

  • How can I (neatly) control mouse click events in a multi-dimensional array?

    Hello everyone!
         I have a question regarding the use of mouse clicks events in a multi-dimensional array (or a "2D" array as we refer to them in Java and C++).
    Background
         I have an array of objects each with a corresponding mouse click event. Each object is stored at a location ranging from [0][0] to [5][8] (hence a 9 x 6 grid) and has the specific column and row number associated with it as well (i.e. tile [2][4] has a row number of 2 and a column number of 4, even though it is on the third row, fifth column). Upon each mouse click, the tile that is selected is stored in a temporary array. The array is cleared if a tile is clicked that does not share a column or row value equal to, minus or plus 1 with the currently targeted tile (i.e. clicking tile [1][1] will clear the array if there aren't any tiles stored that have the row/column number
    [0][0], [0][1], [0][2],
    [1][0], [1][1], [1][2],
    [2][0], [2][1], [2][2]
    or any contiguous column/row with another tile stored in the array, meaning that the newly clicked tile only needs to be sharing a border with one of the tiles in the temp array but not necessarily with the last tile stored).
    Question
         What is a clean, tidy way of programming this in AS3? Here are a couple portions of my code (although the mouse click event isn't finished/working correctly):
      public function tileClick(e:MouseEvent):void
       var tile:Object = e.currentTarget;
       tileSelect.push(uint(tile.currentFrameLabel));
       selectArr.push(tile);
       if (tile.select.visible == false)
        tile.select.visible = true;
       else
        tile.select.visible = false;
       for (var i:uint = 0; i < selectArr.length; i++)
        if ((tile.rowN == selectArr[i].rowN - 1) ||
         (tile.rowN == selectArr[i].rowN) ||
         (tile.rowN == selectArr[i].rowN + 1))
         if ((tile.colN == selectArr[i].colN - 1) ||
         (tile.colN == selectArr[i].colN) ||
         (tile.colN == selectArr[i].colN + 1))
          trace("jackpot!" + i);
        else
         for (var ii:uint = 0; ii < 1; ii++)
          for (var iii:uint = 0; iii < selectArr.length; iii++)
           selectArr[iii].select.visible = false;
          selectArr = [];
          trace("Err!");

    Andrei1,
         So are you saying that if I, rather than assigning a uint to the column and row number for each tile, just assigned a string to each one in the form "#_#" then I could actually just assign the "adjacent" array directly to it instead of using a generic object to hold those values? In this case, my click event would simply check the indexes, one at a time, of all tiles currently stored in my "selectArr" array against the column/row string in the currently selected tile. Am I correct so far? If I am then let's say that "selectArr" is currently holding five tile coordinates (the user has clicked on five adjacent tiles thus far) and a sixth one is being evaluated now:
    Current "selectArr" values:
           1_0
           1_1, 2_1, 3_1
                  2_2
    New tile clicked:
           1_0
           1_1, 2_1, 3_1
                  2_2
                  2_3
    Coordinate search:
           1_-1
    0_0, 1_0, 2_0, 3_0
    0_1, 1_1, 2_1, 3_1, 4_1
           1_2, 2_2, 3_2
                  2_3
         Essentially what is happening here is that the new tile is checking all four coordinates/indexes belonging to each of the five tiles stored in the "selectArr" array as it tries to find a match for one of its own (which it does for the tile at coordinate 2_2). Thus the new tile at coordinate 2_3 would be marked as valid and added to the "selectArr" array as we wait for the next tile to be clicked and validated. Is this correct?

  • Residential phone: we can call out, and we can also receive calls, but the phones don't ring...

    this just started today, sometime after 9am. working fine before then, and we didn't touch anything re: the system today.
    behavior:
    - we can call out fine
    - people calling in say it just rings & rings
    - we have no idea that someone is calling unless we happen to be looking at the CID of a plugged in phone
    - we can pick up the phone and have a conversation if we happen to catch it at just the right time
    - same behavior at the NIC or whatever it's called (the box in the garage).
    tried: 
    - i've unplugged our main wireless phone and tried it w/a wired phone, no change 
    - i've unplugged our verizon broadband modem, no change
    we have a tivo that uses the phone line; i'm about to give that a shot. 
    this is really bizarre...
    thanks for any ideas,
    scott.

    Sounds very strange! I hope your house isn't haunted. =P
    Message Edited by CharlesH on 12-18-2008 09:52 AM

  • How can i disable mouse right clicking event

    I need in my project to disallow any body to right click the mouse. Can i disable this event to prevent user of the application from right clicking if yes how can i disable it.

    I have code written in Visual Basic doing the same task but i don't know how to transfer those code in java
    The following is a code for that:
    Option Explicit
    'declares
    Public Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As Long) As Long
    Public Declare Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As Long) As Long
    Public Declare Function CallNextHookEx Lib "user32" (ByVal hHook As Long, ByVal nCode As Long, ByVal wParam As Long, lParam As Any) As Long
    'constant
    Private Const WH_MOUSE_LL = 14&
    Public Const HC_ACTION = 0&
    Public Const WM_RBUTTONDOWN = &H204
    Public Const WM_RBUTTONUP = &H205
    Public Const VK_RBUTTON = &H2
    Private lMShook As Long
    Private bHookEnabled As Boolean
    'functions which process mouse events
    Public Function MouseProc(ByVal nCode As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    If nCode = HC_ACTION Then
    If (wParam = WM_RBUTTONUP Or wParam = WM_RBUTTONDOWN) Then
    MouseProc = 1
    Exit Function
    End If
    End If
    MouseProc = CallNextHookEx(lMShook, nCode, wParam, lParam)
    End Function
    Public Function SetHook()
    If lMShook = 0 Then
    lMShook = SetWindowsHookEx(WH_MOUSE_LL, AddressOf MouseProc, App.hInstance, 0&)
    End If
    If lMShook = 0 Then
    MsgBox "failed to install hook :" & lMShook & " : " & WH_MOUSE_LL
    bHookEnabled = False
    Unload Form1
    Exit Function
    Else
    bHookEnabled = True
    End If
    End Function
    Public Function UnSetHook()
    If bHookEnabled Then
    Call UnhookWindowsHookEx(lMShook)
    lMShook = 0
    End If
    bHookEnabled = False
    End Function
    Public Function InstalledHook()
    MsgBox " installed hook is :" & lMShook
    End Function
    code for form is below:
    Option Explicit
    Private Sub Command1_Click()
    InstalledHook
    End Sub
    Private Sub Command2_Click()
    Call SetHook
    End Sub
    Private Sub Command3_Click()
    Call UnSetHook
    End Sub
    Private Sub Form_Unload(Cancel As Integer)
    Call UnSetHook
    End Sub

  • Can a program a double click event for a button in Flash Catalyst?

    I currently have a button programed in FC with a single click. I would like the exact same behavior to happen whether there is a single or double click on the same button.
    Is there a way to do this in FC? If not can I pull it into another program to edit the code?
    Thank you!
    Sarah

    Thanks for letting me know.
    Unfortunatly it looks like I can't upgrade unless I upgrade my whole suite, which is a bummer. We just spent a small fortune on upgrading everyone from CS3 - SC5. I will have to check with our account rep, but I doubt I can get another software update approved this year. Maybe next.
    Thanks again Chirs!

  • Call the button click event programmically

    I have customised the billing.aspx page.  I now need to programmically call the click event of the continue image button to continue to the next page.  I can't fire the click event.  Does any one know the click event name of the continue button?
    I've tried using this line to call the event
    this.btnNext_Click(this, new EventArgs());
    or
    this.btnNext_Clicked(this, new EventArgs());

    Thomas,
    You could also just click the button client-side with javascript:
    function clickTheButton(theButton){
        fireAnEvent(theButton,'click','MouseEvents');
    function fireAnEvent(theControl, evtName, theModule){
        if(document.createEvent){
            var evObj = document.createEvent(theModule);
            evObj.initEvent(evtName,true,true);
            theControl.dispatchEvent(evObj);
        else if(document.createEventObject) {
            theControl.fireEvent('on' + evtName);
    Cheers,
    Corbin

  • How to call click event to HorizontalList item after it's been initialized

    How do I to call the click event of a HorizontalList item
    after the dataprovider property of the HorizontalList object's been
    set and the first item's been created. I need to call it's click
    event.

    http://www-03.ibm.com/support/ezserv/home.jsp

  • Click event on sub page menu makes my master page menu go away..???

    I've populated a menu using xml retrieved from a stored procedure and all is working great, except when I select an item from the sub menu and call a click event and it makes my main menu on my site.master go away and shifts the current aspx page up.
    <asp:Menu ID="mnu_catproj" runat="server" BackColor="#B5C7DE" DynamicEnableDefaultPopOutImage="False" DynamicHorizontalOffset="2"
    DynamicPopOutImageTextFormatString="" Style="position: relative;" Font-Bold="True" Font-Italic="False" Font-Names="Verdana" Font-Size="X-Small"
    ForeColor="White" Orientation="Horizontal" StaticEnableDefaultPopOutImage="False" StaticSubMenuIndent="10px" >
    <DataBindings>
    <asp:MenuItemBinding DataMember="Category" TextField="#InnerText" ValueField="#Value" />
    <asp:MenuItemBinding DataMember="Project" TextField="#InnerText" />
    </DataBindings>
    <DynamicHoverStyle BackColor="#CC9900" ForeColor="#0000CC" />
    <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
    <DynamicMenuStyle BackColor="#B5C7DE" />
    <DynamicSelectedStyle BackColor="#507CD1" />
    <StaticHoverStyle BackColor="#284E98" ForeColor="White" />
    <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
    <StaticSelectedStyle BackColor="#507CD1" />
    </asp:Menu>
    Protected Sub mnu_catproj_MenuItemClick(sender As Object, e As MenuEventArgs) Handles mnu_catproj.MenuItemClick
    lblCategory.Text = mnu_catproj.SelectedItem.Parent.Text.ToString()
    lblProject.Text = mnu_catproj.SelectedItem.Text()
    btnMD_submit.Enabled = True
    End Sub
    I know the click event is calling the subroutine but the Master Page menu goes away
    <asp:Menu ID="MainMenu" runat="server" DataSourceID="XmlDataSource1" Font-Names="Verdana" ForeColor="#333399" ScrollDownImageUrl="/Images/menuSeparator.gif" StaticPopOutImageUrl="/Images/menuSeparator.gif" Orientation="Horizontal" DynamicPopOutImageUrl="~/Images/triangle-16.gif" ItemWrap="True" CssClass="menuStyle" Height="27px">
    <DataBindings>
    <asp:MenuItemBinding DataMember="Menu" Depth="0" TextField="text" Selectable="False" />
    <asp:MenuItemBinding DataMember="SubMenu" Depth="1" NavigateUrlField="url" TextField="text" ValueField="url" />
    <asp:MenuItemBinding DataMember="SubMenu" Depth="2" NavigateUrlField="url" TextField="text" ValueField="url" SelectableField="url" />
    <asp:MenuItemBinding DataMember="SubMenu1" NavigateUrlField="url" TextField="text" ValueField="text" ToolTipField="#Value" TargetField="target" />
    </DataBindings>
    <DynamicHoverStyle BackColor="#003399" Font-Size="X-Small" ForeColor="White" Font-Bold="False" />
    <DynamicMenuItemStyle HorizontalPadding="10px" VerticalPadding="5px" BackColor="#E5E5E5" BorderColor="#999999" BorderStyle="Solid" BorderWidth="0.01em" Font-Size="X-Small" ForeColor="Black" />
    <DynamicMenuStyle BackColor="#E5E5E5" />
    <DynamicSelectedStyle BackColor="#507CD1" Font-Size="X-Small" />
    <StaticHoverStyle BackColor="#FF9900" ForeColor="White" Font-Bold="False" />
    <StaticMenuItemStyle HorizontalPadding="15px" VerticalPadding="4px" />
    <StaticMenuStyle CssClass="menuStyle" />
    <StaticSelectedStyle BackColor="#FFCC66" />
    </asp:Menu>
    finally: this works fine in Firefox browser but not in IE or Chrome

    Hi DeanO78O,
    This forum is to discuss problems of Windows Forms. Your question is not related to the topic of this forum.
    You could  post it in the dedicated ASP.Net Forum
    http://forums.asp.net for more efficient responses, where you can contact ASP.NET experts.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Hide form generated from a click event

    I'm creating an AddOn that is calling the click event of the freight button on the Sales Order screen. I then capture the Freight Charges form that is displayed, populate it with the required information and close the form. The problem that I have is that this causes the Freight Charges screen to flash. I would like to hide this form so that the user doesn't see this flash. I set the form's visible property to false on the after form load event but this doesn't work. Can anyone offer any suggestions?
    Thanks

    hi
    You can from the screen painter set the form property Visible to False.  Then in code once you have are done with loading events do a
            oForm.Visible = True
    Other way is to do a                            
    oForm.Freeze(True)
    and after you are done executing the events do a
                        oForm.Freeze(False)
    But be careful.  If an error occurs you have to trap it and so you can set your form to
                        oForm.Freeze(False)
    Otherwise it can stay on the freeze state and well that's how you'll see it

  • Issues with click events and nested ellipse objects

    I thought by now, I'd have this, but after a number of attempts, nothing is working.
    Got a series of circular objects nested inside drawn using the ellipse tool in An of a sumbol called 'box' Click event in each symbol. When clicked, symbol should either hide or change CSS attributes or anything really. Tried a bunch of examples and there's four variations in my .zip file. None of them work and some are ones I've used previously. So I don't get why this isn't working and what the correct code should be. Tried getSymbol, Stage and Composition. None of them worked. So what does?

    Hi, ladobeugm-
    Try:
    sym.$("c1").hide();
    This is the same as:
    sym.getSymbol("c1").getSymbolElement().hide();
    sym.getStage().getComposition().getSymbol("box").$("c1").hide();
    sym.getStage().getComposition().getSymbol("box").getSymbol("c1").getSymbolElement().hide() ;
    Hope that helps!
    -Elaine

  • So my I phone 4s volume has decided to pack  allowing only my phone to make sounds when I have an incoming call, I can also here fine using facetime and receiving calls. YouTube, soundcloud, any of I players will no longer play sound. I've restored the ph

    So my I phone 4s volume has decided to pack  allowing only my phone to make sounds when I have an incoming call, I can also here fine using facetime and receiving calls. YouTube, soundcloud, any of I players will no longer play sound. I've restored the phone using iTunes on my laptop and checked all the volumes are turned up and the button at the left hand Side of the phone is in the correct position.

    Try inserting and re-inserting your headphones 7 or 8 times. Also try cleaning out the headphone jack in case of debris that might be interfering with the connection/disconnection.

  • I am unable to open adobe bridge on my mac. When I try to open it nothing happens. When I right click it says the application is not responding. I can also not op en through photoshop. Please help

    I am unable to open adobe bridge on my mac. When I try to open it nothing happens. When I right click it says the application is not responding. I can also not op en through photoshop.

    Could you see whether Firefox will start in its Safe Mode? That's a standard diagnostic tool to deactivate extensions and some advanced features of Firefox. More info: [[Troubleshoot Firefox issues using Safe Mode]].
    Here's how:
    With Firefox closed, hold down the Shift key while starting Firefox.
    A small dialog should appear. Click "Start in Safe Mode" (''not'' Reset).
    Does that work?

  • Why can't i access or click on the menu options at the top of ANY web page? Also, Can't close a moddle window using the x in the upper right,?

    Why can't i access or click on the menu options at the top of ANY web page? Also, Can't close a moddle window using the x in the upper right,?

    Problems with buttons and links at the top of the page not working can be caused by an extension like the Yahoo! Toolbar or a Babylon extension that extents too much downwards and covers the top part of the browser window and thus makes links and buttons in that part of the screen not clickable.
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode

  • HT201412 After I dropped my iphone 4s my back glass broke and now my screen won't turn on neither respond to touch but i can hear incoming calls and notifications. I tried pluggin to computer/other source and also tried pushing the home and power button.

    After I dropped my Iphone 4s my back glass broke and now the screen won't turn on neither respond to touch but i can hear incoming calls and notifications. I tried pluggin to computer/other power sources and also tried pushing the home and power button together for about 20 seconds

    It's broken due to neglect, namely being dropped.  Replace it.

Maybe you are looking for

  • Quarter Patch Confusion

    Hi All, Client has requested to apply a second quarter patch. However the quarter patch is yet released now. As per the oracle doc, The quarter patches dates are following. From the below patches which one is the 2nd quarter patches. 17 July 2012 16

  • Report Painter: Column Setting

    Dear Gurus, Can I set a column only display value based on few GL code listed? Is that I can directly set it in GRR2 or have to go GS12? Let say I have actual column and budget column, I only want GL code related to welfare display in budget column,

  • What formula, if any

    I have a column of numbers. They are target numbers for any given month. I would like to have a cell calculate the total of the column but dynamically based on todays date. So each time I open the document the total will be relevant to the day I open

  • Compass app with "distance to Landmark" function f...

    Hi. Well the subject pretty much says it all. I've seen other threads on here (e.g. /t5/Maps-Navigation-and-GPS/GPS-data/td-p/782416 ) but nothing recent - and I've done plenty of searches for 3rd party applications. I find lots of pretty compasses,

  • Repeatedly required to reinstall printer driver

    I have installed canon MP 450 in my ibook G4 and have successfully printed material using bluetooth. However, I often have to reinstall the driver. Does anyone know why this would happen repeatedly?