A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Loopy Behavior

  1. #1
    Junior Member
    Join Date
    May 2004
    Posts
    12

    Loopy Behavior

    Hello All and Thanks in Advance for Help ...

    On this page:

    http://www.zorbapress.com/youthtopia.../test_003.html

    Can someone suggest why on the first play, the blue-circle moves, but the second and all future plays it stays in one place?

    ... I have only 5 keyframes in this movie, and all of them are set for the blue-circle to move (using a Motion-Script).

    I would like the blue-circle to move every time the movie plays, including all loops.

    new2cool

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    Its most likely a buggy Motion script. Motion scripts are really more or less just pre-packaged Actionscripts.

    What was the name of the Motion Script you used?

  3. #3
    Junior Member
    Join Date
    May 2004
    Posts
    12
    The motion script used was:

    Flow on Curved.

    Thanks ... new2kool

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    Okay,

    You are going to do 1 of 2 things....

    First off you are going to check to see if there is a built in loop inside that effect. You are going to Click on properties, CLick on Effects, then Click on effect properties and see if there is a Loop Option for the effect.

    If there is set it to yes.

    If there isn't (And there should be) then you will need to do one of two things here to force it to loop...

    1. You could Manually edit the Motion script so that it loops. You do this by opening up the install folder of KoolMoves and then open the MotionScripts folder, find the effect you want to alter, open the text file found in there and look for this line; this.gotoAndStop("end"); . Change it to this.GotoAndPlay("end");

    2. Your other option is to use actionscript to force the script to replay on the last frame. This is how you do this;

    On the last Frame of your movie you will add this script;

    this.objname.play()

    objname is the name of your object in which the script is associoted with.

    You could also (If you feel the need to) make a button which forces the object to replay the motion script.

  5. #5
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    As far as I know, when a movie loops and a movieclip is created on a depth below zero, it is reinitialized. For some reason shapes or texts with a motion script aren't properly reinitialized.

    An easy solution is to add one blank frame at the beginning or the end of your movie with zero tween frames. That way the text or shape is taken off the timeline for a short time and reinitialized when it reappears.

  6. #6
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    It is carrying over the data from before. The way the Motionscripts work are all based on mathmatical algorthims. It creates a two-three frame movie clip with one of them named "end". The motion is caused through math until the end frame.

    I'm not a huge fan of motionscripts but see their value in reducing filesize.

    When the movie loops over becuse the script stops the MC at the "end" frame of the MC it never looses the value set. The scripts tend not to clean up the values after themsleves. Forcing it to play or reseting the values with scripting both tend to fix the problem. A third option is to fix the scipt to clean up afteritself by reseting the values. Removing it from the timeline should also fix it.
    Last edited by johnie; 06-05-2004 at 03:16 PM.

  7. #7
    Junior Member
    Join Date
    May 2004
    Posts
    12

    loopy problem solved

    Yes, there is an option to set the loop for that Motion Script from NO to YES.

    It's now working as needed:
    http://www.zorbapress.com/youthtopia.../test_004.html

    thanks! ... n2k

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