Animation library - libRMC
Erik Hansen
erikhans08 at yahoo.com
Tue Aug 3 20:24:31 EDT 2004
thanks Malte,
the next question: can the animation be synced
with MIDI or audio sound?
--- Malte Brill <malte.brill at t-online.de> wrote:
> >do you move multiple objects simultaneously?
>
> Yes, I do. The main concept is to have handlers
> that calculate the next
> point on the path. So if you call the handlers
> just once it will move the
> object to the next point. You can easiely
> create a handler that calls itself
> in a send in time structure.
>
> In this handler you call the handlers that
> animate your objects.
> You can have all animations in one place if you
> like. (mind that you must
> start using stack "libRMC" to make it work.)
>
> e.g. in a button:
>
> on mouseUp
> if the flag of me is empty then
> set the flag of me to -1
> end if
> set the flag of me to the flag of me*-1
> hereWeGo
> end mouseUp
>
> on hereWeGo
> lock screen
> send moveCircular to img "myImage"
> send moveElliptical to grc "myGraphic"
> send moveLinear to fld "myField"
> unlock screen
> if the flag of me=1 then
> send hereWeGo to me in 4 milliseconds
> end if
> end hereWeGo
>
> Now you can use the inspector and set the
> custom properties created by the
> handlers.
>
> There will be a custom property set
> moveCircular for image "myImage" with
> the following properties:
>
> centerX - the x location of the circular paths
> center point
> centerY - the y location
> isAngle - the arcAngle
> isRadius - the radius of the circle
> step - the speed and direction the object
> moves on the path
>
> Each handler creates its own Custom properties
> set, so its easy to play with
> it. :-)
>
> Of course you can set these properties by
> script:
>
> e.g.
>
> set the moveCircular["isRadius"] of img
> "myImage" to 80
> set the moveCircular["step"] of img "myImage"
> to -0.5
>
> If you happen to find the time, download my
> ERCSneak preview stack to see
> libRMC in action.
>
> I´ll be updating libRMC from time to time (next
> update will follow at the
> end of August)
=====
erik at erikhansen.org http://www.erikhansen.org
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
More information about the use-livecode
mailing list