"Floating" a movieclip

Real quick,
Does anyone have any ideas as to how to make a movieclip
appear to float in the air? I want it to stay within... say 40
pixels of its original x and y coordinates. I'm just not that good
at making visual effects, I'm more into data integration. Thanks!
Sam

hey, i just signed up and posted my own question, so i
thought that in the spirit of reciprocity, i'd try and answer a
few....
place this code on the first frame of the movie that you want
to float:
var xMin:Number = this._x - 10
var xMax:Number = this._x + 10
var yMin:Number = this._y - 10
var yMax:Number = this._y + 10
var tSec:Number = 1 //number of seconds for the tween to
take, and how often to start a new tween
var me:MovieClip = this
function newTween(){
//adjust the easing class as needed
//see the different easing classes at:
http://www.actionscript.org/tutorials/advanced/Tween-Easing_Classes_Documented/index.shtml
var xNew:Number = (Math.random()*(xMax-xMin)) + xMin
var yNew:Number = (Math.random()*(yMax-yMin)) + yMin
xTween = new mx.transitions.Tween(me, "_x",
mx.transitions.easing.Regular.easeInOut, me._x, xNew, tSec, true)
yTween = new mx.transitions.Tween(me, "_y",
mx.transitions.easing.Regular.easeInOut, me._y, yNew, tSec, true)
var IntID:Number = setInterval(newTween,tSec*1000) //use
IntID to clear the interval later if needed
hope that helped

Similar Messages

  • Float roll over image on top help

    Its looking quite messy.I have an image that is circular, 6
    points and each point has a rollover effect where a paragraph of
    text is to be displayed in middle of circle. I created the points
    to buttons, F6 on each button state, created a new layer and on
    rollover here I added my paragraph text with gray background so the
    text stands out.
    Problem Im having is the points of circle are 6 images along
    outside of circle. Some paragraphs of text are over some images,
    and some images are hiding parts of paragraph and gray backing. ???
    I think I need a float on top command for each paragraph
    symbol.
    My main timeline has only one line and one frame. I thought
    there may be an issue with the way the images are ordered in
    library, but tried moving some up and down and it didnt seem to
    help.
    Any suggestions on this? Im about brain dead over trying to
    get this to work.

    put all the paragraphs on the topmost layers. or convert them
    to movieclips and use the swapDepths() method.

  • Creating Text Field into a MovieClip

    I create a TextField into a MovieClip but it doesn't appear
    to be inside. When I move the MovieClip , the textField should move
    wherever the "father" MovieClip goes. But it doesn't happend. It
    stays outside the movieclip in the _root.
    NOTE: "Ventana" is a Class that creates a floating window.
    Parameters into the class are: width, height,movieClip
    container,Title,parent of the movieClip container, and a number of
    the window.
    Thank you

    It didn't work.
    But my question could be:
    Can I do this:
    function Ventana(w,h,my_mc,title,parent,i) {
    this.miVentana.cuerpo.fondo.attachMovie(my_mc,"Componente",n+1000);
    what does it mean ? I am sending my_mc as a parameter to the
    Class Ventana, and my_mc is a movieclip that will have the content
    (whatever, a square, a circle, text ,etc) of each window. It is
    correct to use the method "attachMovie" and my_mc as a parameter or
    my_mc must be in the library ???
    thank you

  • Flash CS4 floating panes redraw

    Hi,
    I recently upgraded to CS4 and this issue appeared, so far only in Flash: a few times every minute, the screen blinks and floating panes that are not attached to the window will do a redraw of some portion of the pane (usually the top) as seen in the images below. It seems to have a preference of redrawing portions of the timeline in the actions pane, however this is not always the case. The only solution is to close the pane and open it again. It's difficult to pinpoint what triggers this; sometimes doublelcicking into a movieclip will make it happen, sometimes advancing the timeline will. I am on a Windows XP Pro SP3, Intel 2.4 Quad Core, 3.5 GB RAM, NVIDIA Quadro FX 3450/4000 SDI video card with all drivers updated as of yesterday. I am clueless.
    http://labs.csinj.com/flash_cs4-1.jpg
    http://labs.csinj.com/flash_cs4-2.jpg
    http://labs.csinj.com/flash_cs4-3.jpg
    http://labs.csinj.com/flash_cs4-4.jpg

    Though I'd bump this seing how there is no reply in almost a month. Any one have a clue?

  • Using code, I'd like to animate a movieclip so that it sways back and forth

    I'd like a piece of text to basically move around
    slightly....like it's floating. Just a slight back and forth, maybe
    a little up and down. Real subtle though.
    how would i do this with code. Can you please help me.
    Thanks

    make a movieclip then give it a instance name then create a
    minFloat (x,y) and maxFloat (x,y) variables to hold the minumum and
    maximun float from origional position then create a looping
    function that will contain a randomFloat variable to generate a
    random number and check to make sure it will not move past the max
    float (x,y) or regenerate another random number then once it finds
    a number tell it to move. I would create a move function to ease in
    and out the movement to add your subtleness and have the looping
    function fire the move function once it gets a correct
    randomFloat.

  • Nested MovieClips

    I have a problem that I think is a simple one but I cannot seem to figure it out, and it has been 2 days of fighting wiht it so I am here to plea for help from the collective experts. Here is the issue.
    I have created a movieClip which is just a rectangle shape that has an interior timeline which object tweens from a 2x200 pixel to a 200x200 pixel shape.
    This movieClip has an instance name of menu_2.
    After the tween happens inside menu_2, on the stop(); frame I have placed another movieClip with an instance name of mi_1. This clip is 100 x 35 pixels and site floating inside the menu_2 MovieClip. Inside this movieClip there is a timeline where there are a "the_start" and a "the_end" label on either end of the timeline each with stop(); comands and some graphics which change opacity.
    What I cannot seem to get to happen is to activate the timeline inside the mi_1 MovieClip. What I would like to happen is that when the user mouses over the mi_1 movieClip, it triggers a number of events, along with triggering playing the timeline inside of mi_2.
    Here is the code I have tried on the main (scene 1) timeline. None of which have worked.
    menu_2.mi_1.onRollOver = function() {
         menu_2.mi_1.gotoAndStop("the_end");
    mi_1.onRollOver = function() {
         mi_1.gotoAndStop("the_end");
    menu_2.onRollOver = function() {
         mi_1.gotoAndStop("the_end");
    menu_2.onRollOver = function() {
    this. mi_1.play();
    Here is the code I have tried inside the menu_2 MovieClip on the same frame as the mi_1 has been placed;
    this.onRollOver = function() {
         mi_1.gotoAndStop("the_end");
    mi_1.onRollOver = function() {
         gotoAndStop("the_end");
    this.onRollOver = function() {
         this.gotoAndStop("the_end");
    Nothing seems to be working.
    I'll send anyone the FLA willing to help...
    Help!
    Forrest

    That's what I thought too Ned. All the reseach I did, tells me that is how you access a nested movieClip in another MovieClip.
    Your visible code works as it should, but I still cannot get the nested MovieClip to be affected by a call to action on the main timeline.
    menu_2.mi_1.onRollOver = function() {
         menu_2.mi_1.gotoAndStop("the_end");
    Did not do anything. I would have just used a button with roll over effects, but a button also seems to be masked inside the menu_2 mc.
    aarrrg.

  • Float overlow Exception!

    Hi all,
    To quote JLS in verbatim ..."Java floating-point
    operators produce no exceptions (�11). An operation
    that overflows produces a signed infinity, an
    operation that underflows produces a signed zero, and
    an operation that has no mathematically definite
    result produces NaN."
    But I am facing a problem here. The highest value
    that can be held by a Double variable is
    1.79769313486231570e+308. Any operation resulting in
    an overflow of this variable should produce 'infinity'
    accodring to the JLS but I am getting a
    "EXCEPTION_FLT_OVERFLOW". Does this have something to
    do with the OS or the processor?
    Here's a simple test program:
    public class FloatingPointInexactRulesTest {
    public static void main(String[] args) {
    // An example of overflow:
    double d = 1.79769313486231570e+308;
    System.out.print("overflow produces infinity: ");
    System.out.println(d + "*1.1==" + d*1.1);
    The program's output should have been:
    overflow produces infinity: 1.0e+308*1.1==Infinity
    but I get a EXCEPTION_FLT_OVERFLOW! Since the JVM cant
    violate the semantics of the JLS I think the problem
    lies somewhere else(either the OS or the processor). I
    am using WIndows2000 as the OS and Intel PIV as the
    processor.
    Please help me...
    --------------EXCEPTION!---------------------
    Unexpected Signal : EXCEPTION_FLT_OVERFLOW
    (0xc0000091) occurred at PC=0xEFA6C3
    Function=[Unknown.]
    Library=(N/A)
    NOTE: We are unable to locate the function name symbol
    for the error
    just occurred. Please refer to release
    documentation for possible
    reason and solutions.
    Current Java thread:
    Dynamic libraries:
    0x00400000 - 0x00407000
    C:\j2sdk1.4.2_04\bin\java.exe
    0x77F80000 - 0x77FFD000
    C:\WINNT\system32\ntdll.dll
    0x7C2D0000 - 0x7C332000
    C:\WINNT\system32\ADVAPI32.dll
    0x7C570000 - 0x7C628000
    C:\WINNT\system32\KERNEL32.DLL
    0x77D30000 - 0x77D9E000
    C:\WINNT\system32\RPCRT4.DLL
    0x78000000 - 0x78045000
    C:\WINNT\system32\MSVCRT.dll
    0x00250000 - 0x002C3000
    C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\uga1.tmp
    0x71710000 - 0x71794000
    C:\WINNT\system32\COMCTL32.DLL
    0x77F40000 - 0x77F7E000
    C:\WINNT\system32\GDI32.dll
    0x77E10000 - 0x77E75000
    C:\WINNT\system32\USER32.DLL
    0x76620000 - 0x76630000
    C:\WINNT\system32\MPR.DLL
    0x77A50000 - 0x77B3C000
    C:\WINNT\system32\OLE32.DLL
    0x779B0000 - 0x77A4B000
    C:\WINNT\system32\OLEAUT32.DLL
    0x75050000 - 0x75058000
    C:\WINNT\system32\WSOCK32.DLL
    0x75030000 - 0x75044000
    C:\WINNT\system32\WS2_32.DLL
    0x75020000 - 0x75028000
    C:\WINNT\system32\WS2HELP.DLL
    0x08000000 - 0x08138000
    C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll
    0x77570000 - 0x775A0000
    C:\WINNT\system32\WINMM.dll
    0x10000000 - 0x10007000
    C:\j2sdk1.4.2_04\jre\bin\hpi.dll
    0x00CE0000 - 0x00CEE000
    C:\j2sdk1.4.2_04\jre\bin\verify.dll
    0x00CF0000 - 0x00D09000
    C:\j2sdk1.4.2_04\jre\bin\java.dll
    0x00D10000 - 0x00D1D000
    C:\j2sdk1.4.2_04\jre\bin\zip.dll
    0x77920000 - 0x77943000
    C:\WINNT\system32\imagehlp.dll
    0x72A00000 - 0x72A2D000
    C:\WINNT\system32\DBGHELP.dll
    0x690A0000 - 0x690AB000
    C:\WINNT\system32\PSAPI.DLL
    Heap at VM Abort:
    Heap
    def new generation total 576K, used 197K
    [0x10010000, 0x100b0000, 0x104f0000)
    eden
    Another exception has been detected while we were
    handling last error.
    Dumping information about last error:
    ERROR REPORT FILE = (N/A)
    PC = 0x00efa6c3
    SIGNAL = -1073741679
    FUNCTION NAME = (N/A)
    OFFSET = 0xFFFFFFFF
    LIBRARY NAME = (N/A)
    Please check ERROR REPORT FILE for further
    information, if there is any.
    Good bye.
    --------------EXCEPTION!---------------------
    Thanks a lot.

    Yeah switching to Linux is a good idea. The firsttime I tried that,
    GRUB crashed and I screwed everything else tryingto copy the
    bootloader. Before this I had problems accessingthe file system on
    Windows via LAN, Samba server is not really theeasiest to use.
    Before that I had display problems with wierdmessages like sync out
    of range, Init respawning too fast so disabling.......I guess this is just
    the tip of an iceberg when it comes to problemswith Linux. It is
    sometimes really frustrating.Really? The only problems I recognise are the
    automatic chip set
    detection for the graphics card. I always let it boot
    in 'mode 3', figure
    out the exact chip set present in the computer and
    only then switch
    to 'mode 5' ...Yeah I had all these problems with RH Linux within a span of 2 months.
    I solved most of them though(Google is my best friend ;). The problem with the display was coz of horizontal and vertical sync values.
    btw, Samba has a nice webbrowser interface; I simply
    follow the docs
    step by step (I know next to nothing about Samba) and
    I'm in business
    after typing in all the required stuff ...I had problems with Samba bcoz of the firewall settings and the firewall interface was not comin on properly on the display.
    And now there are viruses for Linux too!Never do anything online when logged in as root and
    keep your FS
    permissions sensible.Yeah. I dont log in to root untill it is really really needed.
    An offtopic question (hope no one minds) Is there any book for Linux which is on the same lines of "The Design of the Unix Operating System" by Maurice.J.Bach?. If yes, then pls pls lemme know. I am a big Fan of "The Design of the Unix Operating System".
    kind regards,
    JosThanks and regards.

  • Convert Char to float

    Hi all,
    Am wanting to convert a char value (the infoobject is defined as NUMC) into float in order to perform a calculation in the FOX formula. It would not allow the char value to be stored into a float variable...comes back wz an error message - Types of operands F and <infoobject_numc> do not agree.
    Any ways of doing this? I thought about using a function to perform the conversion from char to float format but dont knw if such a function exists on the BI system?
    Thanks!

    Hi,
    I sometimes use a local variable of type STRING to pass on values to other data types:
    DATA local type STRING.
    local = A.
    B = local.
    But I'm not sure it will work for you. If not, you can do it with an exit function.
    D

  • Floating fields and fragment subforms in Outlook 2007 do not display correctly

    I'm using LCES Forms 8.0 Update 1 to render a non-interactive HTML forms using dynamic content (customer info). The email appears ok in clients except in Outlook 2007.
    The Floating text and Text Fields appear multiple times on the form (scattered around their placement point on the form) and the subform fragments are appearing with borders surrounding them.
    I have heard that there are issues with Outlook 2007 not displaying HTML correctly. Is there a way to setup the Text Fields/Subforms in Designer so they display correctly in Outlook 2007?
    Thanks!

    Create a new profile as a test to check if your current profile is causing the problems.
    See "Basic Troubleshooting: Make a new profile":
    *https://support.mozilla.org/kb/Basic+Troubleshooting#w_8-make-a-new-profile
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins" in case there are still problems.
    If the new profile works then you can transfer some files from the old profile to that new profile, but be careful not to copy corrupted files.
    See:
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • Problem of defining value to a textfield in MovieClip

    hello,dear everyone
    there is problem that realy confused me.that is the
    textfield(or other display objects) in MovieClip can't be defined
    when i jumpto that frame.check these simple code:
    mc.stop()
    function goNext(evt:Event){
    mc.nextFrame()
    dosth()
    function dosth()
    if(mc.currentFrame==2)
    mc.mytext.text="hello"
    nextBT.addEventListener("click",goNext)
    the mc is a simple MC that have 2 frames,and the textfield
    object is in the second frame.
    and what i try to do is when i clicked the button,the mc
    jumpto the second frame.and i define a value to that textfield.but
    it's failed when i try to do like that.
    as i debug the program.i found that when i define the value
    to the textfield,that textfield is a Null Object(should be the
    TextField object).not only the textfield not work,but also other
    elements such as Button objects.
    so,i am thinking that must because the objects are too late
    to initialized before they be used.maybe there are some event can
    tell me that all elements has been initialized,as i can use them
    then.what do you think,my friend?

    If all of the code you have is in the first frame, then it
    has processed long before anything ever moved to the second frame.
    What you could try is to have a variables layer that extends
    both frames, and assign the value of the textfield text to that
    variable. Make the textfield associate with that variable (in the
    properties section for it), So when the movieclip moves to the
    second frame the text field should automatically acquire the
    variable value.
    I may not have interpretted your problem correctly, so you
    might have to clarify things if I missed the target.

  • Multiple Animations for a single MovieClip sprite

    Ok, after hours of exhausting searching, and having to learn how to animate a simple sprite for the 100th time, I hope I might found I more specific, and better explained answer to my problem.
    I'm trying to make a flash game, of course, and I want my main Player sprite to be able to play multiple animations based on specific input. So, a running right animation, a running left animation, a jump animation, and an attack animation.
    At the moment, the most I can seem to achieve is to create a single timeline, with a default frame in the exact middle. Then when player holds left, it plays the previous frame, or scrolls backwards through the timeline. When the Right key is held, it plays forward from the default middle.
    It's ugly and extremely limited. I've tried using the gotoAndStop() and gotoAndPlay() methods, but because the statement checking for the key being pressed is constantly being checked, it will stay on the frame chosen for those methods, rather than move forward along the time line.
    I would greatly appreciate a better method for this, or a more specific tutorial to achieve the goal i'm looking for.
    I've seen mention of the attachMovie() method, but I can not find an understandable explanation of how to properly use it in the way I desire.
    essentially, the sprite will have the default standing frame while no keys are pressed. Then, if the right key is down, it plays the running right animation. When the left key is down, it plays the running left animation. When the jump key is pressed, it plays the jump animation. And when the attack key is pressed, it plays the attack animation.
    I hope that's enough information and that it's understandable, if not, let me know what more you need to know and I'll do my best to explain it more.

    You can do this a number of ways but I will try to explain the what I think is the easiest.
    Step 1
    Draw a box on the stage
    Step 2
    convert this into a movieclip (F8), name this myCharacter (or anything you want really), then press ok. Now select this movieClip and in the properties dialogue box, type "box", again, without the quotes. Then press enter.
    Step 3
    Double click this new movieClip (this should take you into this movieClip timeline)
    Step 4
    Now press F6, 3 times. This wil give you 3 additional key frames on this timeline. You should now have 4 key frames.
    |Step 5
    Select key frame 1 on this timeline and press F8. Type into the diag box "standing", without the quotes. Then select the Movie Clip radio button, if it is not already selected.
    Step 6
    Step 12
    Make sure  your library is in view, if not Ctrl+L. You should see the movement clips you created, running_right, running_left, etc. Double Click any one of these and add the animation your want in these movs.
    There we go, simples.....Test you animation and see how you are doing.
    Select key frame 2 on this timeline and press F8. Type into the diag box "running_right", without the quotes. Then select the Movie Clip radio button, if it is not already selected.
    Step 7
    Select key frame 3 on this timeline and press F8. Type into the diag box "running_left", without the quotes. Then select the Movie Clip radio button, if it is not already selected.
    Step 8
    Select key frame 4 on this timeline and press F8. Type into the diag box "jumping", without the quotes. Then select the Movie Clip radio button, if it is not already selected.
    Great, once you have done this, these new movieClips should now have appeared in your library (press Ctrl+L if you cannot see your library)
    Ok then you have just created your movement MovieClip. You now need to get back to the main timeline. You can just keep on clicking the stage to get back to this location. Once there you need to select the box you have just created and name this "box" for the time being.
    Ok then a little bit of programming now.
    Step 9Create a new layer in the timeline and name it scripts.
    Step 10Then select this layer and press F9 on your keyboard. THis should bring up the scripting pane for this frame.
    Step 11Type in the following code
    box.stop();// when you run this animation, this command will stop your box from doing anything
    var keyBoardListener:Object = new Object();// Creates a new Object for the keyboard presses
    keyBoardListener.onKeyDown = function() {
    if (Key.isDown(Key.LEFT)) {// runnning LEFT action
      _root.box.gotoAndStop(3);// Frame where the running right animation is
    } else if (Key.isDown(Key.RIGHT)) {// running RIGHT action
      _root.box.gotoAndStop(2);// Frame where the running right animation is
    } else if (Key.isDown(Key.UP)) {// JUMPING action
      _root.box.gotoAndStop(4);// Frame where the JUMPING animation is
    keyBoardListener.onKeyUp = function() {
    _root.box.gotoAndStop(1);// When the keys are released, this action takes your animation back to frame 1, where your character is just standing still.
    Key.addListener(keyBoardListener);// this assigns the listener to your key press detection Object.
    Step 12
    Edit the action movs within your library by double clicking each one and adding movement to each. Then test your animation.

  • MovieClip Hit problem.

    MovieClip Hit area doesn't work properly. I have two
    movieclip's next to each other, one is button mode true, but the
    hit area isn't correct.
    Here is my .fla file (just an example, very simple) -
    http://www.speedyshare.com/831305914.html
    , just open and test the movie, you see it (then you roll over it
    should fade in into blue and at mouse roll out it should fade out
    back to white, but on "o" and a lit of bit on "m" hit area is
    wrong).
    How to fix this?

    I really don't know guys.

  • Please Help!  I don't want images to "stick" to the outside of CS3!  I want them to float!

    I have CS3 and I like having my images float without "sticking" to anything over the whole screen.  As it is now, they like to grab onto the edge of the application when I move them outside its boundaries.  I did this all the time in CS2 and I like it a lot.  This new thing is very annoying and I want desperately to TURN IT OFF.  Please!  I am asking could someone please tell me how to turn the image stickiness to the edge of the app OFF?  Thanks so much in advance!
    Nothing I've tried thus far has worked and I've lost three days trying to figure it out.  Why is this not a clickable option to turn off in preferences???

    You can't.
    The Mail.app displays all image/photo and single page PDF attachments inline or viewed in place within the body of the message by default - sending and receiving.
    You can control-click on a viewed in place attachment and select View as Icon but the icon for the attached file will remain in the body of the message. Regardless, depending on the recipient's email client and available preference settings, such attachments may appear inline or viewed in place when the message is opened by the recipient (as with the Mail.app when receiving such attachments) or as attached files only which must be opened separately to be viewed for which the sender has no control over.
    This was a minor adjustment for me at first but I now prefer such attachments being displayed inline since I have confirmation that I selected the correct file or file names as attachments before the message is sent.

  • XLS upload via HSODBC. Unable to upload numeric (float) fields

    hi,
    I wrote a program unit with Oracle Forms Builder 10g to upload and read an Excel sheet.
    I created a HSODBC Data link to my DB, and used Excel 2003 to edit the XLS file to upload, and WEBUTIL_FILE_TRANSFER.CLIENT_TO_AS(client_dir_file,'\\server\dir\myfile.xls') to upload.
    My DBLink works and Im able to upload the file. But it seems oracle is unable to upload some fields containing numeric (float) values.
    running DESCRIBE Sheet1$@hsodbc; I got this table structure
    UPLOAD_DATE          DATE
    NUMBER VARCHAR2(32512 CHAR)
    CODE VARCHAR2(32512 CHAR)
    DESCR          VARCHAR2(32512 CHAR)
    SIMILARS FLOAT(49)
    WIDTH VARCHAR2(32512 CHAR)
    HEIGHT VARCHAR2(32512 CHAR)
    HIGH      VARCHAR2(32512 CHAR)
    ITEMS      FLOAT(49)
    fields SIMILARS, WIDTH, HEIGHT, HIGH, ITEMS contain numeric values in float format (ex: 1,00000). When I run
    SELECT * FROM SHEET1$@HSODBC
    I get that WIDTH, HEIGHT, HIGH columns are EMPTY (contain NULL values), while SIMILARS and ITEMS contains not null values.
    I am sure that the \\server\dir\myfile.xls contains not null values for WIDTH, HEIGHT, HIGH fields! I tried to change cells format before upload, setting them to FLOAT, but I got no results!
    Please help me, how can I do to change cell format in order to obtain a correct upload?

    E.C.
    there is a mistake in the subject. As I said in my thread, the upload works and the uploaded file contains all values. My problem is that I am "unable to READ" the numeric values stored in VARCHAR2 fields.

  • Export animation to SWF and plays as MovieClip

    Hi to EveryBody.
    We are evaluating the Rome AIR  applicaction in order to create presetations and swf animations.
    We  have made an animation, the Anim Clips Animation,  without anything  more.
    We have exported to SWF (Flash Player Compatible)  and everything went ok.
    We have a special player made  in flex that plays de SWFs Casting it as a MovieClip and when the object  is Casted the result is a null object.
    We have had  this problems  with SWFs compiled with flash player in AS2 but if it was  compiled in AS3 it works.
    Any idea or solutions.
    Thanks
    The player Code for Flash Builder 4: When you  click the button de conversión is realized and the movie variable is  null.
    <?xml version="1.0"?>
    <!-- controls\swfloader\SWFLoaderSimple.mxml-->
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx">
         <fx:Script>
             <![CDATA[
                 function convert():void{
                     var movie:MovieClip = player.content as MovieClip;               
                     movie.gotoAndPlay(1);
             ]]>
         </fx:Script>
         <s:VGroup>
             <mx:SWFLoader source="Rome.swf" id="player"/>
             <s:Button label="Convert" click="convert()"/>
         </s:VGroup>
    </s:Application>

    Fixed Layout EPUB files support most of the animation you can do in InDesign.
    https://indesignsecrets.com/lynda-com-course-creating-fixed-layout-epubs-indesign-cc.php

Maybe you are looking for