Click, animate the rotation of the object of + 90 ° using AS3?

I have a button that will rotate an object to its parent of 90 degrees each time its clicked:

b_rotate_CW.addEventListener (MouseEvent.CLICK, rotateCW);

function rotateCW(event:MouseEvent):void

{

Object (this).parent.module.rotation += 90;

}

Which is fine, but I think it would be a nice touch if the rotation of the object have been animated.

I tried this:

Import fl.transitions.Tween;

Fl.transitions.easing import. *;

Import fl.transitions.TweenEvent;

b_rotate_CW.addEventListener (MouseEvent.CLICK, rotateCW);

function rotateCW(event:MouseEvent):void

{

var rCW:Tween = new Tween (object (it).parent.module, "rotation", Strong.easeOut, 0, + 90,.5, true);

}

... but there is no nothing, I'm guessing that "rotation" is an option transaction, I can't find any documentation for it, only x, y, their scale and alpha.

I'm sure this has been done by many, can anyone offer a useful clue as to how this function would be coded correctly?

Thank you!

It's great, I tweaked a bit; replaced the 0 with the current angle of the clip) and now it works perfectly:

var rCW:Tween;

b_rotate_CW.addEventListener (MouseEvent.CLICK, rotateCW);

function rotateCW(event:MouseEvent):void

{

rCW = new Tween (object (it).parent.module, "rotation", Strong.easeOut, objects (EC).parent.module.rotation,.parent.module.rotation of the object (this) + 90,.5, true);

}

Who knew you can use target a path instead of the value?

Where everyone can learn AS3 as you know?

Thanks again for your tremendous help!

Tags: Adobe Animate

Similar Questions

  • Click on the objects again

    Hello

    How can I provide that learners can go back to a slide they have visited and click there the same objects as if they were there the first time?

    My scenario is this: learners come to slide (A) with a question and a 'YES' or 'NO' choice. If they choose "" another slide (B) opens and learners must follow a path of clickable objects. The last click brings them to the slide with the 'YES' or 'NO' choice. Now my problem: If learners choose 'NO' yet silde (B) opens again, but just at the end of the clickable path. They get just the last button to return to the slide (A).

    What I can do, to start to slide (B) even for a second, third, fourth time from the beginning?

    Thanks for any help!

    Ellen

    Now this morning (MET) I found the solution to my problem. I have just added another show and hide the action in the tip action, which control the button exit slide (B). So I changed the setting to 'go to the slide (A)' in 'go to the slide (A)' and "hide legend x" and "Show legend there. That's all.

  • What is the name of the object that I use to put in properties when setting up my acer built in webcam

    name of the object to set properties for built in webcam

    Hello

    Check with the Acer Support, their documentation and online drivers.

    Acer - USA - Service and support
    http://us.Acer.com/AC/en/us/content/support

    Acer - drivers and downloads
    http://us.Acer.com/AC/en/us/content/drivers

    Acer - worldwide
    http://www.Acer.com/worldwide/selection.html

    ============================

    Troubleshoot camera connection
    http://Windows.Microsoft.com/en-us/Windows7/Troubleshoot-camera-connection-problems

    The methods below are for Windows 7 - Vista and XP are similar.

    Vista references apply to Windows 7.

    You probably need to recharge the device drivers and any software control of the 'IF' camera, there is
    everything for Windows 7.

    Login as an administrator.

    Double-click Control Panel / Device Manager - Imaging - writing down of the brand and model of camera.
    on this subject and on the tab of the driver is version. Now, click on update drivers (who are unable to do anything as MS
    is far behind the pilots of certification). RIGHT click on the camera - UNINSTALL - REBOOT - it
    will update the driver stack.

    Now, go to the system manufacturer's website and download the latest driver for the camera and the other related camera
    software (if not more recent get the same).

    Download - SAVE - go to them and RIGHT CLICK - RUN AS ADMIN - reboot after each driver.

    Look at the sites of the manufacturer for drivers - and the manufacturer of the device manually.
    http://pcsupport.about.com/od/driverssupport/HT/driverdlmfgr.htm

    Installation and update of drivers to 7 (update drivers manually using the methods above is preferred
    to make sure that the latest drivers from the manufacturer of system and device manufacturers are located)
    http://www.SevenForums.com/tutorials/43216-installing-updating-drivers-7-a.html

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • When I click on the program icon, it used open

    Okay, so, I have the Sims 3 on my computer and when I click it, it does not open! I tried everything to remove the drive to scan my computer for viruses! I don't really know WHAT to do, so please help!

    Hello

    1. which version of the Windows operating system is installed on your computer?

    2. what happens when you click on the program?

    3. do you get any error code or error message?

    4. were you able to install the program successfully?

    I would suggest trying the following methods and check if it helps.

    Method 1:

    Run the fixit from Microsoft Fixit article and if that helps.

    Diagnose and repair Windows files and folders problems automatically:

    http://support.Microsoft.com/mats/windows_file_and_folder_diag/

    Method 2:

    Open Task Manager and check if the process of sims 3 is running or not. If the programme is to end the process and check if it helps.

    Hope the information is useful.

  • Must click on the object to move twice

    Hello. I use Adobe Illustrator CS3 on Mac. I don't know what I changed, but now I have to select two times objects to move them.

    I used to be able to select and drag any object with the same click. But now I have to click to select and then I have to click again to move them. It takes a lot of time for me.

    Y at - it a setting I can go to change this back? Resetting the prefs did nothing.

    I had the same bug, he also appeared in InDesign and Photoshop.

    Well, I Cinch of irradiated software installed, disable solves the problem.

  • Impression of the objects when you use Adobe Acrobat Reader DC?

    Using Adobe Acrobat Reader DC and objects (like an arrow and a cloud) that I added in his comments do not print. Is there a setting somewhere that I have to change?  I tried to change my printer settings to include "print image", but it does not work.

    Hi rick5317,

    Please provide the exact point of the software & OS installed on your system. Also check if it is there any update available for the software after crossing "" help > check updates "»

    Follow this thread to reset the Acrobat preferences:- How to reset preference settings in format Acrobat.

    Please choose the option for "Documents & annotations" under comments & forms in the print menu.

    Also refer to this article:- https://helpx.adobe.com/acrobat/kb/troubleshoot-pdf-printing-acrobat-reader.html

    Kind regards

    Christian

  • Is it possible to download more than one of the objects to AOL using FNDLOAD.

    Hello

    I need to download responsibilities, then his willingness to migration in the PRD using fndload.

    in my case, I have 50 more responsibility. I want to download all the responsibilities of a sudden using FNDLOAD commnad. even how to download to a different instance of a sudden.

    Is it possible to download/send several AOL objects as menu, service, research, Repsonsibilities, flexfield etc using FNDLOAD in Oracle Apps R12.

    configuration:

    EBS: r12.1.2
    DB: 11gR 3.


    Thank you
    Nitin

    Hi Srini

    Easy way to download responsibilities using FNDLOAD this command make FNNDLOAD using sql query below. last exit in shell scripts resp.sh under linux. then run the shell script.

    Select ' $FND_TOP/bin/FNDLOAD apps / 0 $FND_TOP/patch/115/import/afscursp.lct Y UPLOAD ' | Fr. RESPONSIBILITY_KEY |'. LDT"
    of fnd_responsibility en, ftl fnd_responsibility_tl where ftl.responsibility_name in ('Resp_name1',
    ("Resp_name2", no)
    and ftl.responsibility_id = fr.responsibility_id
    order by 1;

    This will save our time.

    Thank you
    Nitin

  • Assign colors to Flash object from XML using AS3

    Here I create a dynamic square and trying to assing a color of XML data

    I have the XML file with color code

    < data >

    < color >

    0x0000FF

    < / color >

    < / data >

    I need to add this flash object color using action script

    var xmlLoader:URLLoader = new URLLoader();

    var: col: uint;

    xmlLoader.load (new URLRequest ("linkNewD.xml"));

    xmlLoader.addEventListener (Event.COMPLETE, displayHTML);

    displayHTML function (e: Event): void

    {

    var xmlData:XML = new XML (e.target.data);

    var cData:String = xmlData.colour.toString ();

    trace (cData); 0x0000FF

    col = uint (cData); 255

    //col = uint (xmlData.colour.toString ());

                    trace (col);

    }

    var square: Sprite = new Sprite();
    addChild (square);
    square.graphics.lineStyle(3,0x00ff00);
    square.graphics.beginFill (0x0000ff); square.graphics.beginFill (col);
    square.graphics.drawRect (0,0,100,100);
    square.graphics.endFill ();

    Square.x = stage.stageWidth/2-square.width/2;
    Square.y = stage.stageHeight/2-square.height/2;

    Please help me!

    Thank you

    jafy

    then use:

    var xmlLoader:URLLoader = new URLLoader();

    var: col: uint;

    xmlLoader.load (new URLRequest ("linkNewD.xml"));

    xmlLoader.addEventListener (Event.COMPLETE, displayHTML);

    displayHTML function (e: Event): void

    {

    var xmlData:XML = new XML (e.target.data);

    var cData:String = xmlData.colour.toString ();

    squareF (cData);

    }

    function squareF(colS:String):void {}

    var square: Sprite = new Sprite();
    addChild (square);
    square.graphics.lineStyle(3,0x00ff00);
    square.graphics.beginFill (uint (passes));
    square.graphics.drawRect (0,0,100,100);
    square.graphics.endFill ();

    Square.x = stage.stageWidth/2-square.width/2;
    Square.y = stage.stageHeight/2-square.height/2;

    }

  • How can I make a button (click) animate an object

    Basically, I want to make a button (nextscreen) that animates a rectangle (Film1) once top.

    So far, it does not work, what I'm trying to gives me errors

    for example, I typed

    ---------------

    nextscreen.onPress ();

    function fl_AnimateHorizontally_6(event:Event)

    {

    Movie1.x += 10;

    }

    -------------------

    But it gives me the error

    Scene 1, Layer 'Actions', frame 1, line 121061: call to a delivery method may be undefined, through a reference with static type flash.display:SimpleButton.

    -------------------------------------------

    Apparently once I select my button and Press f9, I'm supposed to see the symbol of the button at the bottom, but I can't do so all my script is on a separate layer named Actions and is in every way

    So I try to use code snippets and when I run my program with this code;

    -----------------------

    nextscreen.addEventListener (Event.ENTER_FRAME, fl_AnimateHorizontally_7);

    function fl_AnimateHorizontally_7(event:Event)

    {

    Movie1.x += 10;

    }

    --------------------

    My object anime but without me clicking the button

    then, that I should therefore add only when I click on the object animates

    Concerning

    If this is the case, then you can do so by clicking the button launch a repeat function, which you can get by using an ENTER_FRAME event listener.

    nextscreen.addEventListener (MouseEvent.CLICK, fl_AnimateHorizontally_7);

    function fl_AnimateHorizontally_7(event:MouseEvent)

    {

    nextscreen.removeEventListener (MouseEvent.CLICK, fl_AnimateHorizontally_7);

    this.addEventListener (Event.ENTER_FRAME, moveHalfway);

    }

    function fl_AnimateHorizontally_7(event:Event)

    {

    If (Movie1.x

    Movie1.x += 10;

    } else {}

    this.removeEventListener (Event.ENTER_FRAME, moveHalfway);

    }

    }

  • How to stop Office selection icon IE become highlighted when the mouse moves on the object

    When I move my mouse on the screen and it passes over a desktop icon; and I accidentally press right or left button over an icon, this icon is moved from the current position to a different position is determined by when I am is now the button.

    What I would really like is that the selection and highlighting of an icon only would be finished when I specifically on the right or left when right-click on the object. Then to move the icon I would have left, or right click the highlighted

    Hello

    According to the description of the problem, it seems that you are facing problems with the highlight and select the icons on the desktop.

    As the operating system is designed and it is obvious that just by moving the mouse and selecting a folder or icon for awhile Office holding down the button left or right moves the icon or folder somewhere else.

    It will be useful.

  • Resize the artboard to contain the object in Illustrator CC 2015

    In the past I could easily resize my work plan to fit the dimensions of my art simply by double-clicking the object desired by using the tool of work plan. After the upgrade to 2015 CC, I was sad to find that this feature has been removed. Anyone know if there is a workaround or how I could easily do this without manually adjust the work plan? Like so many things, I notice in CC 2015, this change of bugs completely.

    Thank you!

    Jessica, other,

    Just to make sure, what happens if you disable the GPU performance by clicking on the icon of the rocket in the App bar and deselect the box Performance GPU?

  • Helps to remove the object


    I have a shape object on a slide of questionnaire I have to remove.

    • I can't click or right click on the object to remove.
    • I can't see the object in the Slide Master.
    • I don't have any special assigned circles that I can see.

    Any thoughts on how to access the object to remove it?

    Thanks in advance,

    A

    You can view previous slides, maybe it is programmed for the rest of the project?

  • Click on the boxes with different audio

    Hello!

    I use 5 Cp and I have problems with the audio. Button or box where to click must play an audio short or long after that is clicked on.  In the text, I want to cover some words with boxes click with different sounds, students can click to hear the sounds. in the text, there may be a lot of words I want to cover with boxes to click.  Is it possible to do? If Yes please let me know how.

    Thank you

    Ok.  Who can be a little trickier.  Normally a button or click box has a break point on the timeline and once you click on the object continues to play beyond its break point.  This means that you get only a click... UNLESS... you change the Action when a click to be an advance Action that does two things.  First of all, it does everything you want to take place (for example to read the audio file) and THEN he moves the read head to a point BEFORE the break point so that you get another possibility to click New.

    Blog of Lilybiri has some good examples of this sort of thing: http://lilybiri.posterous.com/

    You may encounter a problem where even after you have everything installed correctly the buttons stop working after a while.  In this case your best recourse would be to use the Widgets event handler instead, these can transform any object into a clickable button screen.  But even better, is that they give you preferences to disable continue and the pass/fail criteria reset after Action so that your users can click on your buttons as often they like to repeat actions, these useful widgets trial versions can be downloaded here.

  • Drag &amp; Drop - increasing the action in the action of the object area begin to run the slide

    In the slide drag and drog I use the Action object to a target object. I would like to increase the value of a user variable when the learner move the source properly object to the target object. Without this object Action, the blade was arrested after 1.5 s how you described. This is the correct way. But if the Action of the object has been used, the slide stop. So what do you think, is it a problem of understanding or is this an error in the program? Could you send me your appreciate the opinion? Cordially to Leobersdorf in Austria by Gerhard.

    Object Action in drag and drop slide let the slide running.gif

    Hello

    You will find the solution in my blog: advice & glide - Captivate blog

    The problem is that a simple gesture, like you use it for the action of the object, always free the read head. You will need to replace it with a tip or shared action standard. Same situation happens everywhere when you raise a simple action: Why choose Standard Simple action?-Captivate blog

  • How to check what are the objects using this public synonym?

    Hi Experts

    Currently, I have a public synonym, WORK that is created for WORK table in the schema of the BRAND: "synonym PUBLIC EMPLOYMENT BRAND. JOB. "
    SELECT THIS OPTION. WORK is granted to the TOM_UPDATE (a role): GRANT SELECT ON MARK. JOBS AT TOM_UPDATE;

    I am using TOAD 9.6.1.1 and I wanted to drop the public synonym but I am not able to see that another object in the database uses this public synonym, JOB.

    Help, please.

    moslee wrote:
    Hi Experts

    Currently, I have a public synonym, WORK that is created for WORK table in the schema of the BRAND: "synonym PUBLIC EMPLOYMENT BRAND. JOB. "
    SELECT THIS OPTION. WORK is granted to the TOM_UPDATE (a role): GRANT SELECT ON MARK. JOBS AT TOM_UPDATE;

    I am using TOAD 9.6.1.1 and I wanted to drop the public synonym but
    I am not able to see that another object in the database uses this public synonym, JOB.

    The objects are not "use the synonym".
    The code use synonym to access object.

    use grep allows you to browse the source code that resides in your repository

Maybe you are looking for