At 14:09 +0000 02/14/2002, [EMAIL PROTECTED] wrote:
>Hi Dave, Hi list
>
>here is the code i'm working on. should you run it it'll move the 
>sprite along a parabolic shape.
>
>on enterFrame me
>   fullStageHeight = the stageBottom - the stageTop
>   fullStageWidth  = the stageRight  - the stageLeft
>   halfStageHeight = fullStageHeight / 2
>   halfStageWidth  = fullStageWidth  / 2
>   a = halfStageHeight *0.90
>   sprite(4).locH = 75
>   sprite(4).locV = 163
>
>   repeat with n = -1500 to  1500
>     t = float(n)/float(1500)
>     sprite(4).locH = 1.0* a * (t   0.05) halfStageHeight/2
>     sprite(4).locV = 2.0  * a * (t * t  0.05)
>     sprite(4).rotation = n/10
>     updateStage
>   end repeat
>end enterFrame

Mmm, no it won't. These lines:

     sprite(4).locH = 1.0* a * (t   0.05) halfStageHeight/2
     sprite(4).locV = 2.0  * a * (t * t  0.05)

don't work. There are math operators missing.

Also doing all that in a repeat looop will halt everything else while 
the loop executes. If you put those values into properties and 
refresh when the playback head cycles through -- that is, write them 
out to be used as framescripts -- you'll keep Director, the computer 
and the user happy.

You will then also have the control you need to keep another sprite 
"attached" to this one.

-- 

              Warren Ockrassa | http://www.nightwares.com/
  Director help | Free files | Sample chapters | Freelance | Consulting
        Author | Director 8.5 Shockwave Studio: A Beginner's Guide
                    Published by Osborne/McGraw-Hill
          http://www.osborne.com/indexes/beginners_guides.shtml
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to