Click on the events in Adobe animate CC

Dear friends,

IAM converting an e-learning course of Flash AS3 to animate CC - JS. I have the following code for an activity as each button click and see corresponding popups.

import flash.events.MouseEvent;

for (var i: Number = 1; i < = 5; i ++)

{

This ["btn" + i] .addEventListener (MouseEvent.CLICK, btn_clicked);

}

function btn_clicked(event:MouseEvent)

{

trace (Event.Target.Name.substr (3));

popup.gotoAndPlay ("pg" + event.target.name.substr (3));

}

It should go to the Special pop-up window.

Kindly help me to convert this code to java script in CC animate.

Thanks in advance,

Syed Abdul Rahim

Thks Mr.kgla,

I did the following:

This.Stop ();
var sel_but = "";
_this = this;
to (increase 1 = 1; increase 1<= 7;="" inc1++)="">
This ["btn_" + increase 1] .name = "button" + increase 1.
This ["btn_" + increase 1] .addEventListener ("click", fl_MouseClickHandler);
}

function fl_MouseClickHandler (event) {}
sel_but = event.target.name.substr (6).
_this.Popup.gotoAndPlay ('pg' + sel_but);
}

May be useful to others...

Tags: Adobe Animate

Similar Questions

  • Cannot get active document when the user clicks on the document in Adobe FM 2015.

    I am facing the following problem:

    I have a timer in my application that strikes several times after 2 seconds to get the name of the current document (if there is).

    If the user selects text (the click of the mouse down) of the current document in Adobe FM 2015 then the following API call returns 0 (which is false):

    F_ApiGetId (FV_SessionId, FV_SessionId, FP_ActiveDoc)

    Later, if the user leaves the mouse (click of the mouse to the top) then in the next hit of the timer the document name is extracted.

    It seems that the Adobe FM 2015 cannot manage simultaneously the two entries of the user of the application and the API in my application calls.

    Why is this happening?

    It seems that Adobe FrameMaker 2015 cannot handle at the same time user UI events and FDK API calls from external applications.

    When user interacts with the application FM calls API FDK for my failure in the external application with error codes.

  • Add tags click for DCM in file Adobe animate HTML5

    Hello

    I would use Adobe animate to create advertisements for use in DCM. I need help to get the code published to be valid for use in DCM, click tags, etc., compatible. Anyone have an info or help on how to add click labels and any other code in DCM required to the published files animate html 5? Either in the lead or subsequently in the published html file?


    Thank you!

    He gets asked several times per week; I think this should be stickied:

    Banners of HTML5 (for DoubleClick)?

  • Is it possible to change the dimensions of the stage to the editing in Adobe animate CC?

    Dear community:

    After spendig years to forget my beloved Flash and learn to master the animate dashboard superb I'm back now to formerly Flash, lack of edge animate and experience some old restrictions in CC animate it that drive crazy me. I hope you have a solution for the problem:

    I use external Java - / HTML5-based interactive animations (formerly RIA) Java - / HTML5-based Windows Universal applications (apps-in-a-app) through the MS WebView object. These applications must be able to recognize the changes in orientation of devices and the content in the new landscape to portrait (resp.). Animate of edge did an amazing job to do this:

    Edge animate, the scene was just a symbol that could be changed to the timeline, even in its dimensions. In animations to edge-come to life, he lived above all layers in the timeline. So I opened the way to, say, image 0 to certain dimensions of the landscape and to, say, 100 image to the dimensions of the picture. Using build-in orientationchange action then activated the app is gone to the frame when the user has changed the orientation of the device. I found this easy way to meet policy changes a big improvement.

    However, on a canvas created in Adobe HTML animate CC (formerly Flash) scene seems to be always static, as if it were the case in bad times of Ol' Flash '.

    My question is: there's a possibility to manage the scene as a single clip on top and resize the dimensions to an arbitrary key image as if it was possible in Egde Animate in Adobe animate CC?

    Otherwise, I would like to make a suggestion for this feature of the art Adobe animate CC.

    Thanks in advance - Jochen

    ClayUUID thanks for your reply.

    First of all, I definitely know the difference between Java and JS. It was just a typo which I apologize deeply. Please read JS instead of Java.

    Plus, I could not implement your canvas.height/canvas.width in the Panel shares. However, I tried the following and it works:

    var page_canvas = document.getElementsByTagName ("canvas") [0];

    stageWidth = page_canvas.width;

    stageHeight = page_canvas.height;

    page_canvas. Width = 600;

    page_canvas. Height = 400;

    However, this technique requires a complete programmatic, the new style of all the elements of the scene (layers). An alone cannot do this task visually (as designers would do, or he is so on board animate), and we can't do it on different time periods (as we have beachfront animate). It would be a great improvement, Adobe would incorporate these characteristics of edge animate animate CC - at least for HTML5 canvas projects.

    Finally, yes it is possible with a lot more afford to animate CC.

  • How to follow and find which button clicked in the CC script to animate.

    Dear friends,

    IAM converting an e-learning lessons in CC to animate. I have the following code for an activity as each button click and see corresponding popups.

    import flash.events.MouseEvent;

    for (var i: Number = 1; i < = 5; i ++)

    {

    This ["btn" + i] .addEventListener (MouseEvent.CLICK, btn_clicked);

    }

    function btn_clicked(event:MouseEvent)

    {

    trace (Event.Target.Name.substr (3));

    }

    Kindly help me to convert this code to java script in CC animate.

    Thanks in advance,

    Syed Abdul Rahim

    Hi friends,

    Thks for your help. I did the work, with the following code:

    This.Stop ();
    var sel_but = "";
    _this = this;
    to (increase 1 = 1; increase 1<= 7;="" inc1++)="">
    This ["btn_" + increase 1] .name = "button" + increase 1.
    This ["btn_" + increase 1] .addEventListener ("click", fl_MouseClickHandler);
    }

    function fl_MouseClickHandler (event) {}
    sel_but = event.target.name.substr (6).
    _this.Popup.gotoAndPlay ('pg' + sel_but);
    }

    May be useful to some body...

    Thank you and best regards,

    Syed Abdul Rahim

  • using the event keydown aboard animate (was: keydown event)

    I want to use the keydown event and I used this syntax that works very well:

    $(document) .one ('keydown', {Function

    If (e.which == 32) {}

    Alert ("Something");

    }

    })

    But I wonder why this syntax does not work:

    $("#Stage").on ('keydown', {Function

    If (e.which == 32) {}

    Alert ("Something");

    }

    })

    Thank you.

    KeyDown events are sent only to elements that can receive focus. Default divs do not receive focus. Setting the tabindex on a div property can lead to receive the focus. If you set the same on stage, it should work once the stage has the focus.

    DIA-

  • Create a slideshow with the arrows 'next' and 'prev' in Adobe animate CC?

    I'm a novice at HTML 5 canvas in Adobe animate.

    I'm working on the project with Adobe animate CC. The project includes 5 buttons that link to the quite different picture slideshows.

    I can't find a single reference online on how to create a simple 'next' and 'previous' buttons that will go forward or back a frame.

    The codes I have found online seem to produce inconsistent results (they will advance through the first slide show very well, but then the second will go to random slides).

    I also tried the this.gotoAndPlay (5); for each image, but that starts to have problems in the second show.

    Any help would be appreciated.

    I would be keys movieclip and label the first and the last frame of each slideshow and use these labels for your 5 buttons. If your buttons are on the first image (IE, frame 0) and starting slideshows after frame 1, you can use:

    in the first image (IE, frame 0)

    This.Stop ();

    var label_firstframeA = ['slideshow1frame1', slideshow2frame2', etc...];

    var label_lastframeA = ["slideshow1lastframe", "slideshow2lastframe", etc...];

    var num_firstframeA = [];

    var num_lastframeA = [];

    var first_frame;

    var last_frame;

    for (var i = 1; i)<>

    This ["button_" + i] .ivar = i;

    This ['button_' + i] .addEventListener ('click', slideshowF.bind (this));

    this.gotoAndStop(label_firstframeA[i-1]);

    num_firstframeA.push (this.currentFrame);

    this.gotoAndStop(label_lastframeA[i-1]);

    num_lastframeA.push (this.currentFrame);

    }

    this.gotoAndStop (1);

    This.next_button.addEventListener ('click', nextF.bind (this));

    This.prev_button.addEventListener ('click', prevF.bind (this));

    function slideshowF() {}

    FIRST_FRAME = num_firstframeA [this.currentTarget.ivar - 1];

    last_frame = num_lastframeA [this.currentTarget.ivar - 1];

    this.gotoAndStop (first_frame);

    }

    function nextF() {}

    If (this.currentFrame<>

    this.nextFrame ();

    } else {}

    do something else

    }

    }

    function prevF() {}

    {if(this.currentFrame>FIRST_FRAME)}

    this.prevFrame ();

    } else {}

    do something else

    }

    }

  • What is the difference between animate and Adobe animate?

    What is the difference between "Adobe animate cc (new name for flash)" and "adobe edge animate cc?

    Animate edge creates CSS/JavaScript HTML5 animations. His script works differently for Flash Pro. Animate edge is not due to be developed more. It's a program similar to the Hype.

    Adobe Animate is the new name of Flash Pro, it can do the applications stand-alone offices, iOS & Android and of HTML5 Canvas applications and WebGL 2D give too. Oh, and he's always making SWFs for reading web desktop. Animate Adobe is actively developed, and a new version is expected soon.

  • After download and install the application from adobe creative suite cs2 version 6, adobe photoshop cs2 software screen is not opened by clicking the icon. message gives 'ausba4.dll' was not present. Please guide me. ?

    I downloaded and installed the version of cs2 adobe creative suit 6 but when I click on the icon of adobe photoshop in the office, it is not open and giving the message "this application has failed to start because"ausba4.dll"not found. reinstalling the application may fix the problem "I have reinstall & open several times but even in this case it is not open." Please guide me accordingly.

    He was executed on the same computer before amoothly, but due to the formatting software has been removed & this is the second time, once again, I downloaded & installed. I wasn't looking to run the software on the other computer. It's the first time I came into the problem

  • The event viewer displays continuously errors with ID 7000 and 7009

    I use Acronis Disk Monitor, which shows the disk health 82% due to a bad block on disk. Observer events poster continually errors on ID 7000 and 7009, but I can't find a solution to these errors or what they mean exactly.

    11/14/2010 08:31 am, Catkin333 wrote:

    I use Acronis Disk Monitor, which shows 82% because of the bad health disk
    block on the disk. Event Viewer displays continuously errors on ID 7000 and
    7009, but I can't find a solution to these errors or that they
    mean exactly.

    If Acronis reports bad blocks on the disk, then you should replace the disk as soon as possible.  Blocks of bad sectors/bad is not repairable, and once they begin to appear that they tend to behave like a snowball rolling downhill, you will get several of them with increasing speed.  You may lose your data if you keep using this drive.

    Regarding the events 7009 & 7000, you will need to copy & paste the events here for give us to you more information.  Double-click on the event to see its properties, and then click the icon of the Clipboard (which looks like 2 pages of paper) to copy the event, you can then paste it in your next post.  These Service Controller errors may be caused by a multitude of different things.

    John

  • As the head of the army of adobe, I respectfully request help of my soldiers of fewoll I have a problem that I can't install adobe flash player for some reason any?

    Hello classmates today, when I tried to start shaking it says I need to flash drive, and then I remembered, I was cleaning my PC programs and I must of been deleted and he gave me a direct link to the latest version of adobe flash player I clicked on the link downloaded adobe flash player software and you press run Dungeon in the Middle my surgery [system is windows 7]

    and I use mozila firefox] window says instalation running this software on the computer has been blocked Editor, but I'm afraid that's not correcct because my menu windows is in Bulgarian and I am sure this is the best possible translation because I therefore translate short long sotory, I could of deleted acsideantly software or hurry eaven forbid beeing software ever instaled on this pc I know that's not a problem Adobe but it always is slaughtering me to compleate my instalation so please help !

    Do a clean install

  • Apex - how to set hide and show checkboxes at the event button

    Hello


    How to set up HIDE/SHOW check boxes when click on the events button. (apex)

    If I press the button and then the box will appear.
    If I press it again then check box will be disapper.
    Can u please help me solve this issues in the APEX.


    Thanks in advance.
    concerning
    r

    My steps:

    1 create the point of the box
    LOV:

    select 'orange' d, 'orange' r
    from dual
    union all
    select 'apple' d, 'apple' r
    from dual
    union all
    select 'banana' d, 'banana' r
    from dual
    

    2. create the region button. Specify the redirect URL and URL target as #.

    3. create a dynamic action

    Advanced

    Event: Right click; Selection type: jQuery Selector; Select jQuery: button [value = "Toggle"]<-- where="" toggle="" is="" the="" label="" of="" my="">
    Action: Run the JavaScript Code. Fire when the Page loads: uncheck the box. Code:

    var ele = $('#P34_FRUIT');
    
    if (ele.css('display') == 'none'){
         $x_Show(ele);
    } else {
         $x_Hide(ele);
    }
    

    Leave the rest and click on create

    Click the button to see it disappear and other things (not tested in IE).

    I did sample: http://apex.oracle.com/pls/apex/f?p=23834:34

  • Where is the event double-click in Adobe LiveCycle Designer

    Hi Experts:

    I tried to put the code in a double-click event in Adobe LiveCycle Designer, but could not find the event. There is a 'Click' event, but who doesn't.

    Am I missing something here?

    Thank you

    Jen

    Hi Jen,

    I was surprised, it was missing the double click but I use the following code in the click event, simply replace the "[my double click on the code]" and "[my single click code]" with your code single and double click.  This the single code delay, click event for 400ms see if a second click is coming, you can play with the 400ms because you must balance responsiveness with a single click with double click.

    If (new Date() - this.date)<>

    {

    app.clearTimeOut (this.timeout);

    This.date = undefined;

    [my double click on the code]

    }

    on the other

    {

    If (xfa.event.fullText! == 'singleClick')

    {

    This.Timeout = app.setTimeOut ('xfa.event.fullText = 'singleClick'; xfa.resolveNode('"+this.somExpression+"').execEvent ('click'); ", 500);

    }

    on the other

    {

    [my code click];

    }

    }

    This.date = new Date();

  • Where is the variable function in Adobe animate?

    Hi all

    Return these days we can easily find the variable in the properties of the flash, but with the new adobe animate, I'm unable to find the variable. I am trying to enter the date and time but with no variables, I am unable to find a source of output for my coding. Thanks in advance people.

    you try to find the Panel shares, where you can enter actionscript?

    If Yes, click window > actions, or click F9.

  • How to work around the function on HTML5 Adobe animate external button CC

    I created my HTML5 Canvas with Adobe animate CC.

    It's a few pieces of my code of "page.js" after publishing my project

    this.frame_0 = function() { 
    this.button_1.addEventListener("click", fl_ClickToGoToAndStopAtFrame.bind(this));
         function fl_ClickToGoToAndStopAtFrame()
         {
              this.gotoAndStop(1);
         } this.stop();
    }

    And this is my button "page.html".

    <button type="button" class="btn btn-default">Default</button>

    How to bypass the function/send command "gotoAndStop (1)" my external button above?

    Yet once, your code is not linked to your button.  You must use something like:

    document.getElementsByClassName [0]. [ "btn btn-default"]. addEventListener ('click', fl_ClickToGoToAndStopAtFrame.bind (this));]
    function fl_ClickToGoToAndStopAtFrame()
    {
    this.gotoAndStop (1);
    } this.stop ();

Maybe you are looking for