Hi rachid Im going to comment your code below to show where it goes
wrong
(untested code)
> 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.
>
Property spriteNum -- so i can refer to the sprite as me.spriteNum
Property fullStageHeight
Property fullStageWidth
Property halfStageHeight
Property halfStageWidth
property a
property nMin
property nMax
property n
on beginsprite me
-- only want to do this stuff once
> fullStageHeight = the stageBottom - the stageTop
> fullStageWidth = the stageRight - the stageLeft
> halfStageHeight = fullStageHeight / 2
> halfStageWidth = fullStageWidth / 2
> a = halfStageHeight *0.90
> sprite(me.spriteNum).locH = 75 -- only needs to be done once and
posiblly when resetting n
> sprite(me.spriteNum).locV = 163
nMin = -1501 -- because we are going to add 1 in on enterframe
nMax = 1500
n = nMin
end
> on enterFrame me
-- this event is trigered everytime a frame is entered and it is
present
-- so it is imp[ortant where you put it
(Movie,frame,castmember,sprite)
-- and therefore wiLl change the code you write
-- I will assume you have it on a sprite you want to move (sprite 4
but written to work on any)
n = n + 1
if n > nMax then
n = nMin
-- sprite(me.spriteNum).locH = 75
-- sprite(me.spriteNum).locV = 163
end if
> t = float(n)/float(1500)
> sprite(me.spriteNum).locH = 1.0* a * (t 0.05)
halfStageHeight/2
> sprite(me.spriteNum).locV = 2.0 * a * (t * t 0.05)
> sprite(me.spriteNum).rotation = n/10
> updateStage -- not sure you need this
> end enterFrame
>
HTH
Dave
>
> thanks
>
> [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!]
>
>
______________________________________________________________________
__
> This email has been scanned for all viruses by the MessageLabs
SkyScan
> service. For more information on a proactive anti-virus service
working
> around the clock, around the globe, visit http://www.messagelabs.com
>
______________________________________________________________________
__
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________
[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!]