AS3 Newbie: Looping movieclips & overlapping movies.

Hello all this is my first time posting in the forum and your help would be greatly appreciated!
The issue I am having is that the animation will play fine on my mac but when opened on a Windows OS it just loops and all the movieclips overlapp.
I am looking for a quick clean code solutiion I used code snippets to control the movie and do not have a knowledge of hand-coding AS.
Download animation here: http://dl.dropbox.com/u/1491983/frac_animation.swf
Note:
It is all set in one scene and one frame all of the movies are nested.
What I want the animation to do:
Button 1 activates a series of movieclips, stops when another button is selected and resumes at the begining again when clicked.
Button 2 Same action ability as button 1
Button 3 Same action ability as button 1
This is the snippet based code I am using now:
step1.arrows1b.stop();
step1.arrows1a.stop();
step1.arrows1c.stop();
step2.arrows1a2.stop();
step2.arrows1d.stop();
step2.focusWin.stop();
step2.waterjets.stop();
step3.focusWin2.stop();
step3.gasDot.stop();
step3.arrowsOut.stop();
step3.fractures.visible=false
button_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_11);
function fl_ClickToGoToAndPlayFromFrame_11(event:MouseEvent):void
    gotoAndPlay(1);
    step1.arrows1b.play();
    step1.arrows1a.play();
    step1.arrows1c.play();
    step1.arrows1b.visible=true
    step1.arrows1a.visible=true
    step1.arrows1c.visible=true
    step2.arrows1a2.visible=false
    step2.arrows1d.visible=false
    step2.focusWin.visible=false
    step2.waterjets.visible=false
    step3.focusWin2.visible=false
    step3.gasDot.visible=false
    step3.arrowsOut.visible=false
    step3.fractures.visible=false
button_2.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_12);
function fl_ClickToGoToAndPlayFromFrame_12(event:MouseEvent):void
    gotoAndPlay(1);
    step2.arrows1a2.play();
    step2.arrows1d.play();
    step2.focusWin.play();
    step2.waterjets.play();
    step2.arrows1a2.visible=true
    step2.arrows1d.visible=true
    step2.focusWin.visible=true
    step2.waterjets.visible=true
    step1.arrows1b.visible=false
    step1.arrows1a.visible=false
    step1.arrows1c.visible=false
    step3.focusWin2.visible=false
    step3.gasDot.visible=false
    step3.arrowsOut.visible=false
    step3.fractures.visible=false
/* Click to Go to Frame and Play
Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and continues playback from that frame.
Can be used on the main timeline or on movie clip timelines.
Instructions:
1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.
button_3.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_13);
function fl_ClickToGoToAndPlayFromFrame_13(event:MouseEvent):void
    gotoAndPlay(1);
    step3.focusWin2.play();
    step3.gasDot.play();
    step3.arrowsOut.play();
    step2.arrows1a2.stop();
    step2.arrows1d.stop();
    step2.focusWin.stop();
    step2.waterjets.stop();
    step2.arrows1a2.visible=false
    step2.arrows1d.visible=false
    step2.focusWin.visible=false
    step2.waterjets.visible=false
    step1.arrows1b.visible=false
    step1.arrows1a.visible=false
    step1.arrows1c.visible=false
    step3.focusWin2.visible=true
    step3.gasDot.visible=true
    step3.arrowsOut.visible=true
    step3.fractures.visible=true

in your situation, you are going about it the correct way.
There is really nothing you can do, and you won't even see a
performance drop, so keep it up.
"I'm sorry but I'm not very good in speaking and writing
english."
I thought you did very well.

Similar Messages

  • Looping a swf movie

    ive been looking the other posts involving this and they just
    wont work for me,
    all i want to do is loop my little movie for my website but
    it just wont loop ive clicked the loop button and all that but it
    just wont loop, can anyone please help , ive imported my movie to
    the stage and selected progressive download etc and the movie is
    there its just what to do next

    You mean you want to loop an FLV, correct? That is more
    involved then just looping a movieclip. Make sure you put a stop
    action on the frame and follow my directions from the other threads
    about giving the component an instance name of vid and using the
    actionscript...
    var vidList : Object = new Object();
    vidList.complete = function() {
    vid.play();
    vid.addEventListener ("complete",vidList);
    stop();

  • Newbie Q: What do movie clips need to allow Actionscript?

    Hello. Thanks for taking time out for this question.
    Basically, I started an exercise in a book and it asked me to
    add code to a movieclip. I created a basic circle, converted it to
    a movie clip and tried to press F9 for actionscript, but Flash told
    me "Current selection cannot have actions added to it".
    When I looked at the example file that came with the book, I
    couldn't see anything special about the movieclip that was used.
    What am I missing?

    However, the techniques of adding code directly to movie
    clips is an old and outdated way of coding. And I would advise that
    if you are serious about learning Actionscript that you don't go
    down that road.
    AS 2 is perfectly useful and good so learn that or learn AS3
    (or both!), but here is a link to an article about the issue:
    http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent
    David Stiller (that is his blog) posts here often and is a
    great source of information. You might want to check out more of
    his articles.
    It could be that your book is just showing one way before
    moving on to a more sensible approach, but check the examples
    toward the end. If they are full of on() and onClipEvent() I woudl
    recommend getting a different book.

  • Animated GIFs don't loop in exported movies from Keynote 3

    I am just getting started with Keynote 3.0 and really like what I have seen. I created a series of slides and pasted animated GIFs in various places. They are set to loop on each slide as Keynote presents the slides. The slide show has preset transition and build timings and there is music playing continuously, throughout the show. It works quite well. (However, there is very intermittent choppy audio and video playback when there are builds or transitions occurring. Any thoughts on optimizing this?)
    The problems begin when I ask Keynote to export the slideshow to a movie. The main problem that I am struggling with is that the animated GIFs don't loop in the rendered movie, regardless of which compressor I choose. I don't see anything in the documentation. I have also searched several of the discussions on making movies from Keynote 3 but have not specifically seen animated GIFs discussed. What am I missing here?
    Also, I want to be able to play this movie on a DVD player at an upcoming function. Any recommendations for an approach that will be best? I have QT 7 Pro and the iLife '06 suite.
    Thanks, in advance, for any forthcoming suggestions.
    eMac G4   Mac OS X (10.4.6)   1.25 GHz, 1 GB RAM

    My guess is, it's too much of a pain to have to calculate how many times it will actually loop and create the loops and then composite everything. Running it in Keynote just tells the thing to keep playing over and over till you do something that stops it. There's a BIG difference there as one is just being told to play, the other is having to be placed in a movie with an exact number of frames, so there are a bunch of calculations involved.

  • AS3 plays all Movieclips in timeline before a given frame?!?

    Ok, I am going to try to explain this problem as best I can,
    but it is kind of hard to put into words... It seems like a bug to
    me, but I could be wrong, maybe this is the way AS 3 supposed to
    work.
    I have 4 movieClips in my library named
    "MC1","MC2,"MC3","MC4" Each with 2 layers and 2 frames, on Layer 2
    is just a textfield that says what movieclip it is, Like "MC1"
    which spans 2 frames, on layer 1 I have trace commands...
    On frame 1
    trace("MC1 Start") //this obviously changes to MC2
    Start...etc with whatever movieclip i am in
    on Frame 2
    trace("MC1 Stop")
    On the Stage timeline here is what I have
    Frames 1-4 -- Blank
    Frames 5-10 -- MC1
    Frames 10-14 -- MC2
    Frames 15-19 -- MC3
    Frames 20-24 -- MC4
    If in frame one I say--
    gotoAndStop(15)
    which is where MC3 resides, here's what I get in the output
    window:
    MC1 Play Start
    MC2 Play Start
    MC3 Play Start
    MC3 Play Stop
    If I put:
    gotoAndStop(20)
    Which is where MC4 resides, heres what output says:
    MC1 Play Start
    MC2 Play Start
    MC3 Play Start
    MC4 Play Start
    MC4 Play Stop
    So in AS3 if you go to a frame number each and every
    movieclip before that given frame is loaded into memory and the
    first frame plays?!? Is this how it is supposed to work?
    The reason I even started examining this, is because if you
    have an embedded sound in any of those movieclips and you go to
    frame 20, all embeded sounds before that clip will play as well. Am
    I missing something here, or is this a bug? Please let me know. If
    there are any questions about the problem, I will be happy to
    provide an .fla.
    Thanks

    Thanks for the reply, but this makes no difference. The
    results are still the same.

  • Flash Newbie needs help with Movie Clips/Action Scripting

    Hi -
    I'm having a problem with my movie clips playing
    simultaneously and cannot, for the life of me, figure out what I
    have done wrong. I'm new to flash, so I may have set something up
    incorrectly, but here's what I have so far:
    11 layers, total: 1 layer with 10 control buttons, each
    button with the following actionscript:
    on (release) {
    gotoAndPlay(85);
    Where the number changes in relation to which keyframe the
    next movie is on.
    I have 10 movies, total, but they are only movie clips,
    essentially photo slide shows with audio, made all in the library.
    The problem happens when I click on the second or third
    button. Not only does the movie that I have selected begin to play,
    but all of the previous clips do as well, so it all sounds quite
    garbled. I don't know what I am missing in the action script, as my
    Action Layer has a stop command on it at each keyframe where there
    is a new clip to play.
    I have tried to add a stopAllSounds command, but I'm afraid
    that doesn't do anything because it is not a "sound file" per se,
    playing in the timeline.
    I'm at the end of my rope and really need some help in
    figuring this one out. My project is hanging in the balance on
    this, as I have scripted everything else correctly and it runs
    beautifully.
    Please help!
    Thanks,
    Caroline

    Each layer has a blank keyframe before and after each
    movieclip. Each movie clip is at a different frame. Even with the
    blank keyframes added, the second video starts to play and then the
    first video begins to play. Same happens if I click on the third
    button. Third plays, and starts 1st and 2nd shortly thereafter. Is
    there an action script I can put in that will tell the timeline
    that, when a button is clicked, no matter where the movieclip is,
    it will stop and start the newly selected movieclip?

  • Looping a flash movie

    I have been unable to find the correct property to test on a
    flash video to see if it is running or not.
    for an avi, i check the movierate, if it is not equal to 1,
    the video has stopped playing.
    for a wmv, i get its duration and loop for that length of
    time.
    is there a similar property or technique for a flash video?
    here is the code for the behavior on the avi member that i am
    referring to:
    property s
    on beginSprite me
    s = sprite(me.spriteNum)
    end
    on exitFrame me
    if s.movieRate = 1 then go to the frame
    end

    Working with Flash in Director is somewhat undocumented.
    There is a full dictionary and contextual listing of Lingo in both
    the Script window and the Message window. The Message window is
    very handy for testing code before you commit to a behavior. In
    MX2004 when working with Flash 8, you can usually reach any Flash
    function, method or property by using Actionscript after the
    reference to the Flash sprite in Lingo. For instance you can find
    the current frame of a Flash .swf by using:
    sprite(X)._currentFrame
    If you need to reach a movieClip in the .swf then just
    include the clip's instance name in the path:
    sprite(X).clipName._currentFrame
    for example.
    Take a look at the read me that comes with the Director 10.1
    update for some other insights.

  • AS3 newbe target my_mc question

    Good day to all of you. I have a basic question.
    I have movC_mc inside movB_mc inside movA_mc
    AS2 to access movC_mc from the my Actions layer in frame 1 in the root would be
         movA_mc.movB_mc.movC_mc
    My question is how can I target the movA_mc from the root of my .fla
    This is what I got so far
    movA_mc.addEventListener(MouseEvent.ROLL_OVER, a_player);
    function a_player(e:MouseEvent):void{
        Object(this).movA_mc.movB_mc.movC_mc.x = 250
    I am sure this is very simple, but just can't get my head to transition from AS2 to AS3.
    Thanks again 

    if all 3 movieclips were created in the authoring environment use:
    movA_mc.addEventListener(MouseEvent.ROLL_OVER,  a_player);
    function  a_player(e:MouseEvent):void{
        movA_mc.movB_mc.movC_mc.x = 250
    if any were created with code, referencing mov_mc may be different.

  • Make flv within a flash movie loop (or entire movie loop?)

    I am needing to make the flv loop from my .fla file which contains .flv files. I know there is a piece of AS 3.0 I need in order to make them loop/make the entire movie loop but I am not sure what it is.

    Well,
    in AS2 you need to use this code in the flv object:
    on (complete){
    this.autoRewind=true;
    this.play();
    Hope it helps

  • Looping a streaming movie

    Hi,
    I have a streaming flv. I would like to know if it is
    possible to loop it continuously? I can do it if I embed it but
    this increases the size of the movie too much.

    Yes - give the flv playback component the instance name vid
    and use this code on the frame:
    var vidList : Object = new Object();
    vidList.complete = function() {
    vid.play();
    vid.addEventListener ("complete",vidList);
    stop();

  • Movieclip.x movement using keyboard event

    Hi, im working on a game project and i have a question about movie clip movement using keyboard event.
    Basicly i have a character on screen and it can move on the x axis using the left and right buttons.
    Im making my charater move by changing the x value of the character movieclip but i find very it laggy and not smooth and if im going point by point
    then it's too slow.
    Whats the best way to make the character move so that the transition will be smooth.

    Ok obviously you've left out where you add your eventListener, i'll assume that's a KEY_DOWN event. When the user holds down a key, that key event is triggered once immediately and then after a pause it is triggered at regular intervals. Check this out by holding down the up/down arrow and watching this browser window scroll.
    That's not the movement you'd be looking for when moving a character in a game. Instead, you'd be setting a variable on KEY_DOWN to indicate the character direction - it could be an integer for example that you increase by 1 if the user pressed RIGHT or decrease by 1 if the user pressed LEFT.
    In addition to your KEY_DOWN eventListener, you could have an ENTER_FRAME and  KEY_UP eventListeners set up:
    The enterFrame event handler could move the character in the direction specified in your direction variable. This is where you might ensure your character doesn't go beyond its limits in both directions.
    In the keyUp event handler, you could do the converse of what you did in the keyDown handler(increase by 1 if the user released LEFT, decrease by 1 if the user released RIGHT).

  • Anyone been able to create a Keynote presentation to loop as a movie on Apple TV (First Generation)?

    I have prepared a Keynote presentation which I would like to loop on my Apple TV.  I was unable to set this up with the Apple TV 2 since it just streams, but with my original Apple TV, I can save the movie on the built in hard drive and presumably set it up to loop.  I had to export the Keynote presentation to iMovie to rotate the video to match the display I am using, but have tried several options to force a loop as a Quicktime movie and again importing the movie into Keynote after I rotated in iMovie and still will not loop.  I am trying to use this as a digital display in my business.  Any suggestions are welcome as previous posts and discussions have not worked.

    Winston Churchill wrote:
    I'm not really sure whether looping videos still work on the Apple TV, they have done and then they haven't and then they have and I don't really know what the current position is.
    You can add looping to a video in any application that supports it, QT Pro for example.
    How can you add looping to a video in an application that supports it such as QT Pro? The only documentation that I've read states what I previously wrote, and that doesn't seem to work.

  • Timed counter in a while loop without overlapping a second while loop

    Hello,
    Like you can see in attached file (waveform_counter.vi), I have a main while loop which makes a waveform graph and I would like to integer an inversed counter (from x seconds to 0) in some cases. I tried with a overlapped while loop, but obviously, when the counter works, the main loop breaks...
    How can I make a sort of time counter without a loop ? I tried with the while loop iteration, every 100 iterations the counter decreases but I don't success.
    Thanks for help.
    Nathalie.
    Attachments:
    waveform_counter.zip ‏55 KB

    Hello Nathalie:
    Please see what I did in the expiration case.
    Please advice if this is a possible solution.
    Attachments:
    waveform_graph 2.zip ‏41 KB

  • Loop slideshow or movie clips

    does anyone know how to loop the slideshows and movie clips on IMOVIE 6 just like u do on IDVD??

    Ranjandeep,
    You can't in iMovie.
    But if you play your finished movie back with QuickTime you can.
    Just output your movie using Share>QuickTime>Full Quality DV.
    Then play the movie with QuickTime Player and choose View>Loop.
    matt

  • In Loop how to move condition type data

    Hello Experts,
    In loop while i am collecting data in final loop,
    I have different pack sizes in pricing procedures viz. p10kg,
    p20kg., p15kg.....like wise along with  BED, EDU CESS,
    Sec & High & VAT . i have fetch data from KONV.
    for this i have written two select queries for pack size only in it_konv and other for taxes in it_konv1.
    now, for one item no. i have three pack sizes 10, 20 40.
    see the following.
    FORM GET_ITEM.
    DATA: QUANT TYPE KONV-KWERT.
    CLEAR QUANT.
    CLEAR WA_FINAL-BEDTX.
    CLEAR WA_FINAL-EDUTX.
    CLEAR WA_FINAL-SECTX.
    CLEAR WA_FINAL-VATTX.
    LOOP AT IT_VBRK INTO WA_VBRK.
        WA_FINAL-VBELN   =  WA_VBRK-VBELN.
        WA_FINAL-FKDAT   =  WA_VBRK-FKDAT.
        WA_FINAL-KUNAG   =  WA_VBRK-KUNAG.
            READ TABLE IT_KNA1 INTO WA_KNA1 WITH KEY KUNNR = WA_VBRK-KUNAG.
              WA_FINAL-ADRNR = WA_KNA1-ADRNR.
            READ TABLE IT_ADRC INTO WA_ADRC WITH KEY ADDRNUMBER = WA_KNA1-ADRNR.
              WA_FINAL-NAME1   = WA_ADRC-NAME1.
              WA_FINAL-STREET  = WA_ADRC-STREET.
              WA_FINAL-STRET1  = wa_adrc-STR_SUPPL1.
              WA_FINAL-STRET2  = WA_ADRC-STR_SUPPL2.
              WA_FINAL-CITY1   = WA_ADRC-MC_CITY1.
              WA_FINAL-POSTAL  = WA_ADRC-POST_CODE1.
              WA_FINAL-TIMEZ   = WA_ADRC-TIME_ZONE.
            LOOP AT IT_VBRP INTO WA_VBRP WHERE VBELN = WA_VBRK-VBELN.
              WA_FINAL-ITEM    = WA_VBRP-POSNR.
              WA_FINAL-SALQT   = WA_VBRP-FKIMG.
              WA_FINAL-SALUN   = WA_VBRP-VRKME.
              WA_FINAL-MATNR   = WA_VBRP-MATNR.
              WA_FINAL-DESCP   = WA_VBRP-ARKTX.
              WA_FINAL-ORDNO   = WA_VBRP-AUBEL.
            LOOP AT IT_KONV INTO WA_KONV WHERE KNUMV = WA_VBRK-KNUMV.
               WA_FINAL-PACKSZ   = WA_KONV-KSCHL.
               WA_FINAL-EXVALUE = WA_KONV-KWERT.
            WRITE : / WA_FINAL-PACKSZ,
                      WA_FINAL-EXVALUE.
            LOOP AT IT_KONV1 INTO WA_KONV1 WHERE KNUMV = WA_VBRK-KNUMV.
               IF SY-SUBRC = 0.
                   IF     WA_KONV1-KSCHL = 'JEXP' .
                          WA_FINAL-BEDTX = WA_KONV1-KWERT.
                   ELSEIF WA_KONV1-KSCHL =  'JECS'.
                          WA_FINAL-EDUTX = WA_KONV1-KWERT.
                   ELSEIF WA_KONV1-KSCHL =  'JA1X'.
                          WA_FINAL-SECTX = WA_KONV1-KWERT.
                   ELSEIF WA_KONV1-KSCHL =  'JIVP'.
                          WA_FINAL-VATTX = WA_KONV1-KWERT.
                   ENDIF.
               ENDIF.
            ENDLOOP.
         ENDLOOP.
        ENDLOOP.
            APPEND WA_FINAL TO IT_FINAL.
    ENDLOOP.
    ENDFORM.
    plz experts giv me solution.
    Thaanks In Advance,
    Ashish.

    >
    sunny vaswani wrote:
    > yeh kya code kyu paste kiya hai
    >
    > there is no solution for this question kindly close this thread.
    use common language, which is english.

Maybe you are looking for