Getting my movie clip to loop

Hi,
I have created an bar of thumbnails and added as3 code so that the imagebar scrolls to the right or left depending where the mouse pointer is located. However once you reach the end or beginning of the clip it just stops. How can I make it loop to beginning or end (depending on which way you're scrolling?? I'm very new to Flash and as3 as a warning.
Here is my code so far. (I'm just pasting it in, is there a special way to do this?)
Thanks,
Giuseppe
MovieClip(root).addEventListener(Event.ENTER_FRAME, enterFrameHandler);
function enterFrameHandler(event:Event):void
if (MovieClip(root).mouseX > 600 && mouseX < 800 && mouseY > 450)
imgBar.nextFrame();
if (MovieClip(root).mouseX > 800 && mouseY > 450)
imgBar.nextFrame();
imgBar.nextFrame();
if (MovieClip(root).mouseX < 300 && mouseX >100 && mouseY > 450)
imgBar.prevFrame();
if (MovieClip(root).mouseX < 100 && mouseY > 450)
imgBar.prevFrame();
imgBar.prevFrame();

make a container with 2 imgBar movieclip.
So it will be double width of the original.
Let the container scroll left or right.
I did for you a very simple sample:
http://www.flashdersi.com/flash/diger/adobeforum/scroll.fla

Similar Messages

  • How do I get a movie clip to play fully in an iphoto slide show.

    How do I get a movie clip to play fully in an iphoto slideshow.  Right now it only plays for a few seconds, while the complete clip is 22 seconds.

    Bring up the Settings pane for the slideshow and click on the movie clip in the tray at the top.  Then in the Settings pane click on This Slide button and set the play time to the actual length of the movie clip. 
    OT

  • How do I stop a movie clip from looping

    I am using Action Script 3 and the 'stop()' function is not working to stop my movie clips from looping continuously.
    I have added the 'stop()' function to the last frame on the timeline of each movie clip.
    I originally built the .fla file in Flash CS6 using Action Script 2 where it was working with no problems (I have since upgraded and don't have access to CS6 anymore).
    I have all the separate movie clips positioned on Frame 1 of my main stage with the following script to start them playing:
    Cigarette_Reveal.play();
    KickTheHabit.play();
    BallMove.play();
    BallFlip.play();
    Offer.play();
    I want each of these movie clips to stop playing after one animation sequence is complete.
    Please help!

    Turn on strict mode in your publish settings. This will allow you to see the compiler errors that are preventing the actionscript in your fla from compiling correctly.

  • I Can't stop my movie clip from looping

    This is probably an easy fix, but I obviously can't get it. Below is the actionscript to loop my movie clip, but once it's activated, I can't get it to stop. I thought it would stop at 3. What did I miss??
    Any help? Flash 8 (CS2).
    on (rollOver){
        for (i=0; i<=3; ++i){
            audio_mov.duplicateMovieClip("audio_mov" +ii);

    remove the stop() from the first frame of blur and assign your button an instance name (eg, btn).  then see if this does what you want:
    blur.stop();
    var tl:MovieClip=this;
    btn.onRollOver=function(){
    blur.play();
    btn.onRollOut=function(){
    tl.onEnterFrame=function(){
    if(blur._currentframe==1){
    blur.stop();
    delete this.onEnterFrame;

  • Get a movie clip into a presentation

    I am very new to Apple community and just purchased Keynote. I have a Knote presentation and want to use clips from movies i.e. "A Beautiful Mind" to help teach about psychiatric issues. Can this be done? I just read about CINEMATIZE 2, but I am not sure I understand the concept of encrypted and unencrypted DVD's. Thank you.
    G5   Mac OS X (10.4.3)  

    Well, if you can get past the issue that it's technically illegal to break the encryption from a DVD (meaning, though it might be legal to use the clip in class, it's not legal for you to actually get a usuable clip, except to just play the dvd in class and stop it when you need to).
    Anyway, there's a Mac app called handbrake that rips dvds into Mpeg4 and iPod formats, and there's also a mac app that will decrypt a dvd, and copy it to your hard drive, where you can use other apps to rip it into DV or another format. It's called Mac the ripper.
    Hope that helps

  • Having trouble getting my movie clips to my Mac...

    Hello!
    I recently bought my first Macbook (Macbook Pro), my old notebook being a Vaio. My mom is using my old one, so to clear up memory for her, I'm trying to move all of my important files to the Mac. I burnt a bunch of pictures and documents to a disk and transferred them easily enough, but upon burning and attempting to transfer my movie clips, I had no such luck. It doesn't recognize the format of the movies...whatever that format may be. I can't find that either, but I recorded the clips with a Canon camera (it has FS100 written on it) and viewed and edited them with Windows Movie Maker. Now, I can't open any of my clips from the disk that I had burnt. They still play just fine on the old notebook. I have no idea how to move them to my Mac so that I can view and edit them into a polished little movie there. Please help if you can! Thanks in advance!
    ~Christina
    P.S.: The operating system that I put is probably not correct, since I don't remember where to find it, but I remember seeing Mac OS X many times before.

    Hi Christina, belated welcome to Apple Discussions if nobody said it already.
    I've had some experiences with these new flash memory recording camcorders, and I'll give you a quick rundown of what I've learned. Many of them (JVC, Panasonic, etc.) tend to record in a .MOD file format, which is non-standard, proprietary, and unrecognizable by most software. I thought Canon was usually a little more standards-compliant, but it appears they also use this .MOD format in your specific camera model. There are likely a couple ways we can get around this though!
    In order to play the files, you will likely need to change their file format (.MOD) to .AVI manually. You'll have to locate the files on your Mac, and then manually change the file names so that the file extension (after the period) is .AVI
    At that point, a video player application such as http://www.videolan.org/vlc/download-macosx.html>VLC should play the files fine!
    You should be able to transfer new video files from the camera to the Macbook Pro with no problems as well. Just plug in the camera to the computer via USB, and also make sure the camera is plugged in to charge. Once it's plugged in, open iMovie (came with the MBP, in the Applications folder) and the MBP should take care of the rest.
    Let me know if you have any success with any of this!
    FYI, the thread that I got some of the above information from is here:
    http://forums.macrumors.com/showthread.php?t=478326
    --Travis

  • Stop(); not working. Movie clip is looping.(AS2)

    I have made a movie clip that needs to play till the last frame and then stop there, but not dissapear. Right now, as I am putting the command stop(); on the first frame of the movie clip and on the last frame too, nothing is changing, the movie clip is still looping and does not stop at all.
    What could be the problem?
    p.s. I am really a beginner in Adobe Flash.

    Can you show a screenshot of the timeline and where the stop() command are placed?  If stop(); is the only code you are using then it sounds like you are putting the code in the wrong place.

  • Getting a movie clip to play in reverse

    I have this script to play a movie clip.
    What do I write to get it play in reverse?
    function fadeUp(event:MouseEvent):void {
        buttonFadeOver_mc.play()

    You need to use an enterframe event listener to continuously call prevFrame() until you see that you have reached the starting frame (by checking the currentFrame property).  Once you detect you are at the start you remove the event listener.

  • Can't get nested movie clip to play

    Hi everyone,
    I have a movieclip on one of the frames on the maintimeline.
    Within this movieclip is a nested movieclip which itself is
    contained by another clip. The first movie clip plays to a certain
    frame where I've got some code telling the nested movie clip to
    play at that frame but this nested clip doesn't play. I'm not sure
    if I'm targetting the nested clip incorrectly or whether something
    else is wrong with the code.
    The .fla file can be downloaded at:
    http://www.officelinkonline.com.au/Ad/
    if someone would take a look. The movie clip in question is
    on the layer called text5, and within this mc on frame 15 is the
    code I'm trying to use to get the nested movieclip to play at that
    point. The code used on that frame is:
    this.innerText5_mc.free_mc.play();
    stop();
    pauseAnim = setInterval (this, "nextFrame", 4000);
    I wondered if someone could take a look and see what I might
    be doing wrong? Basically the free_mc clip just makes the word
    "FREE" scale up.
    Would really appreciated any advice.
    Thanks

    Thanks again. I'm a bit worried that you weren't able to see
    the font that I used. All of the text used in the animations are
    static text fields. I don't seem to have the option to embed these
    characters since it's static text. It'll only let me embed if the
    text fields are dynamic. Does this mean I have to change them all
    to dynamic text fields, and if so do I need to embed the font in
    every text field in every frame of the animation or can you do this
    in one place?
    Appreciate your continued help.

  • Assigning names to movie clips in loop

    hey, sorry if this is double post...
    im trying to run a loop and assign all my new movie clips
    with different names. i have tried .name and ._name they dont seem
    to be working... any help is appreciated.
    for (var i = 1; i<=5; i++) {
    imageName = new ImageMovie();
    this.addChild(imageName);
    so how do i make imageName something like imageName1,
    imageName2, ...

    Depends on what you mean by "name". If you mean the actual
    Object Name (), I don't think you'd like to rename that anyhow, but
    changing the property "name" of the Object is easy:
    for(var i=1; 1<=5; i++){
    image = new ImageMovie();
    image.name = "imageName" + i;
    this.addChild(image);
    Now you can access your 5 imageMovie instances by referencing
    their name property, as in getChildByName(imageName1);
    Any help?

  • How do I get a movie clip to follow the cursor?

    Hi guys,
    What I want:
    Is a simple action where I have my company logo in the middle of the screen and it follows the cursor (not over the whole screen but within invisible borders).
    What I use:
    I have Flash Pro CS5, code is Actionscript 3.0 and my company logo has been converted to a movie clip.
    What didn't work:
    So I watched 2 different tutorials on how to do this and both didn't work.
    With the first one I used this code:
    function gradientOver(event:MouseEvent):void{
              logomc.visible=true;
              function reportStageMouse(event:MouseEvent):void{
                        var myStageX:Number=Math.round(event.stageX);
                        var myStageY:Number=Math.round(event.stageY);
                        var xTween:Tween=new Tween(logomc,"x", Strong.easeOut, logomc.x, myStageX, 1, true);
                        var yTween:Tween=new Tween(logomc,"y", Strong.easeOut, logomc.y, myStageY, 1, true);
              stage.addEventListener(MouseEvent.MOUSE_MOVE,reportStageMouse);
    function gradientOut(event:MouseEvent):void{
              logomc.visible=false;
    function gradientClick(event:MouseEvent):void{
              logomc.visible=false;
    gradient.addEventListener(MouseEvent.ROLL_OVER,gradientOver);
    gradient.addEventListener(MouseEvent.ROLL_OUT,gradientOut);
    gradient.addEventListener(MouseEvent.CLICK,gradientClick);
    And with the second one I had to make a border by drawing an oval shape, turn it into a movie clip and put my logo inside of it. Then I used this code:
    stage.addEventListener("mouseMove", arjun);
    function arjun(e:MouseEvent):void
              var var1 = mouseY - followins.y;
              var var2 = mouseX - followins.x;
              var radiusR = Math.atan2(var1,var2);
              var degreeR = radiusR / (Math.PI / 180);
              followins.rotation = degreeR;

    Thanks
    stage.addEventListener(MouseEvent.MOUSE_MOVE, hideCursor);
    function hideCursor(e:MouseEvent):void{
    logomc.startDrag(true);
    Mouse.hide(true);
    so I used this code and it didn't work. I first try'd it on the main timeline and then inside the logo's own timeline and even inside the backgrounds own timeline.
    no luck so far..

  • How can I get my movie clip to resize according to screen size?

    I have a movie clip (startMenu); inside it there are buttons, text, and graphics. This is a game I am making, and it will be played on different screen sizes of Android. This is the code I have so far:
    stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.align = StageAlign.TOP_LEFT
    startMenu.addEventListener(Event.RESIZE, resizeLayout);
    function resizeLayout(e:Event):void
        setPosition();
    function setPosition():void
         startMenu.x = (stage.stageWidth - startMenu.width) / 2;
            startMenu.y = (stage.stageHeight - startMenu.height) /2;
    When I run it on different phones using debugging, it locks on the left hand corner, but does stretch out to fit the whole screen. What should I do?

    try changing
    stage.scaleMode = StageScaleMode.NO_SCALE;
    to
    stage.scaleMode = StageScaleMode.EXACT_FIT;
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageScal eMode.html

  • Having some problems getting my movie clip to tween..

    Hey guys im animating this banner right now I'm going to have the van come from the far road and come up the closer hill..
    I took the van made a movie-clip of it clicked into the movie clip added the rest of the layers to the van like the wheels. Then I made  the wheels a movie clip went into those and animated them to rotate but  when i go back to the main van movie clip to tween it to move left to  right it just doesn't work? I can't explain why..
    You can download my .fla file here: http://download156.mediafire.com/6qc84i6u7pag/sebfbqkezzemq82/Final+Banner+Flash.fla
    if you can figure out whats wrong i moved the van animation to the front so u can find it easy.. I don't understand :S

    The new motion model will keyframe for you. You create one tweened instance, and then make changes along the tween span. For example, move your playhead to frame 24 in that Fla and drag the van. The motion is automatically inserted.
    You will be able to delete that second tween span (the one on frame 25), and drag your existing tween span so it's longer (mouse over the end of the span until you see the double-ended arrow, and drag to the right).
    For the differences between old motion and new motion, see: http://www.adobe.com/devnet/flash/articles/motion_migration_guide.html

  • Trying to get a movie clip to go both up and down depending on which button gets clicked

    hello,
    I have a file with 5 movie clips in it. I have a button that when clicks, plays each one. One of the movie clips needs to move both up and down and I am having a lot of trouble with this.
    stop();
    function showVenue(Event:MouseEvent):void
              mc_speaker.play();
    function showSpeaker(Event:MouseEvent):void
              mc_compliance.play();
    function showCompliance(Event:MouseEvent):void
              mc_strategic.play();
              mc_data.play();
    function showStrategic(Event:MouseEvent):void
              mc_data.gotoAndPlay("down");
    function showData(Event:MouseEvent):void
              mc_data.gotoAndPlay("up");
    btn_viewMore_Venue.addEventListener(MouseEvent.CLICK, showVenue);
    btn_viewMore_Speaker.addEventListener(MouseEvent.CLICK, showSpeaker);
    btn_viewMore_Complinace.addEventListener(MouseEvent.CLICK, showCompliance);
    btn_viewMore_Strategic.addEventListener(MouseEvent.CLICK, showStrategic);
    btn_viewMore_Data.addEventListener(MouseEvent.CLICK, showData);
    Is there anyway to attach my file here for someone to look at???
    thanks!
    babs

    Well, on the mc_data movie clip, I had the animation going up and down with stop actions to stop it. so I put labels on those areas and tried to just control it that way. Seemed simple enough, but not working.
    I really don't know how to control the toggle up and down in AS without using the timeline....just trying to help a friend, and ready to scream..I thought this would be so simple...
    would be easier to explain if I could show you a dummy file...but I still don't see an attach button????

  • Getting a movie clip to stop playing, when another one is activated.

    Hello,
    I have a file with 3 movie clips and three buttons that control them to play...with the script below It is working fine.
    stop()
    function startImageOne(Event:MouseEvent):void
        imageOne_mc.play();
    function startImageTwo(Event:MouseEvent):void
        imageTwo_mc.play();
    function startImageThree(Event:MouseEvent):void
        imgThree_mc.play();
    start1_btn.addEventListener(MouseEvent.CLICK, startImageOne);
    start2_btn.addEventListener(MouseEvent.CLICK, startImageTwo);
    start3_btn.addEventListener(MouseEvent.CLICK, startImageThree);
    Then, I wanted to stop a movieClip, if another one was selected to play..so I inserted stop options to the function, which I thought would work, but doesn't. Does any one know why...See this code below..
    thanks
    stop();
    function startImageOne(Event:MouseEvent):void
        imageOne_mc.play();
        imageTwo_mc.stop();
        imgThree_mc.stop();
    function startImageTwo(Event:MouseEvent):void
        imageTwo_mc.play();
        imageOne_mc.stop();
        imgThree_mc.stop();
    function startImageThree(Event:MouseEvent):void
        imgThree_mc.play();
        imageOne_mc.stop();
        imageTwo_mc.stop();
    start1_btn.addEventListener(MouseEvent.CLICK, startImageOne);
    start2_btn.addEventListener(MouseEvent.CLICK, startImageTwo);
    start3_btn.addEventListener(MouseEvent.CLICK, startImageThree);
    thanks
    Babs

    Hi Ned,
    I checked the names and they are all correct...(I named one of the instances img instead of image, but it is all fine.
    The movie clips are simple...They have a stop action in the first frame, and then it is just an image that fads in and fades out..
    Pretty simple?
    The code looks fine, so I can't figure out, why the movie clip that is currently playing doesn't stop, when another button is activated.
    It seems like is should work??
    I'll keep playing .. thanks!!
    babs

Maybe you are looking for

  • Unable to select SATA II Transfer mode

    After much hassle, I was finally able to successfully install the Nvidia Sata controller driver version 5.10.2600.666 dtd 4/24/2006 which is now driving both of my SATA drives. My WD2500KS, a SATA II drive, is listed as the drive on the Primary Chann

  • LR5 corrupt files on import

    When importing some JPG files into Lightroom 5, it is claiming it cannot generate a preview, and then on import claiming they are corrupt. However, these files import with LR3, and open with Photoshop, Picasa, OSX Preview. The images and metadata all

  • BDC not working in NO screen mode

    Hi All, We have a BDC in which we need to enter a multiple selection for a document field. For this we are using the table control concept. However, how do we fill in more than 8  single selections  (the number of input rows available on the screen)?

  • Re install Visio 2003 on a new PC

    Hi all I have a new computer and I am trying to re install visio 2003. I have my product ID but I can't find the setup download link. Please help. Thanks Nir

  • IPod Nano 6th gen won't sync with iTunes 12.1.1.4

    iPod Nano 6th gen won't sync with iTunes 12.1.1.4. This iPod was synced with another iTunes library. I had to transfer iTunes library from another laptop. Launch iTunes (12.1.1.4), plug in Nano, Nano display says connected, Nano appears in iTunes, bu