A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Smooth Movie Clip Playing

  1. #1
    Junior Member
    Join Date
    Dec 2002
    Posts
    8

    Smooth Movie Clip Playing

    I did a couple of searches and I couldn't quite find what I was looking for....

    It's probably pretty simple.. I just what to a have a movie clip (for a button) play forward on a mouseover and play backward on a mouseout.. I don't want there to be any jump in frames. Basically the movieclip will play smoothly even if the mouseout occurs in the middleframes of the movie clip..

    Sorry for the longwinded explanation.

    Thanks.

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    This is probably what you're looking for...

    http://odin.prohosting.com/~oldnew/buttontest.swf

    Was written in Flash 4 syntax...

    Start with this, and if I can find it, will post a newer MX version tomorrow...
    Attached Files Attached Files

  3. #3
    Junior Member
    Join Date
    Dec 2002
    Posts
    8
    Beautiful! Thanks for the help.
    Last edited by Loomer1000; 02-15-2003 at 02:29 PM.

  4. #4
    Junior Member
    Join Date
    Dec 2002
    Posts
    8
    If you could post an updated version for MX that would be great too.. I'm just trying to figure out the older actionscript.

    Thanks.

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Here it is...
    Attached Files Attached Files

  6. #6
    Junior Member
    Join Date
    Dec 2002
    Posts
    8
    Terrific! I really appreicate the help. I think I can do what I want now.

  7. #7
    Hey folks, I'm pretty horrible with actionscript,

    I'm trying to do this right now, and I can get this to work fine if I set it up exactly like this movie and only have 1 movieclip on the page that I need to reverse, but in my case I have 6 buttons I need to reverse.

    here's the code I tried, (just for 2)

    Code:
    function doReverse() {
        _root.mybut1mc.onEnterFrame = function() {
            if (_root.mybut1mc._currentframe>2) {
                _root.mybut1mc.gotoAndStop(_root.mybut1mc._currentframe-1);
            } else {
                _root.mybut1mc.onEnterFrame = null;
            }
        };
    }
    mybut1.onRollOver = function() {
        _root.mybut1mc.onEnterFrame = null;
        _root.mybut1mc.play();
    };
    mybut1.onRollOut = mybut1.onDragOut=function () { _root.doReverse();};
    mybut1.onPress = function() {
        trace("Yo!");
    };
    function doReverse() {
        _root.mybut2mc.onEnterFrame = function() {
            if (_root.mybut2mc._currentframe>2) {
                _root.mybut2mc.gotoAndStop(_root.mybut2mc._currentframe-1);
            } else {
                _root.mybut2mc.onEnterFrame = null;
            }
        };
    }
    mybut2.onRollOver = function() {
        _root.mybut2mc.onEnterFrame = null;
        _root.mybut2mc.play();
    };
    mybut2.onRollOut = mybut2.onDragOut=function () { _root.doReverse();};
    mybut2.onPress = function() {
        trace("Yo!");
    };
    stop();
    when I did this I got the mybut2 to work but the first one stopped.. I'm sure there is some basic coding problems.

    thanks
    Sometimes....when it comes over me..... And I totally lose control......... I Like it.



    www.visiontilt.com
    www.glamourdog.com
    www.caseyandcynthia.com

  8. #8
    Ok, never mind, I played with it and just made 6 different functions..

    I think it works great now.

    here's a link if anyone is interested.

    http://www.glamourdog.com

    (this is a holiday thing so it wont be up after the first of the year)
    Sometimes....when it comes over me..... And I totally lose control......... I Like it.



    www.visiontilt.com
    www.glamourdog.com
    www.caseyandcynthia.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center