From: <s4...@st...> - 2003-07-18 21:19:04
|
Hi guys, hi Leif, I apologize if this is the 2nd time you receive the same email. I used=20 my company's email address to sent the first one, and wasn't sure if=20 that was able to get through, since I am not registered with that email=20 address.=20 I am using DynAPI version 3.0, which I downloaded from this link: http://osdn.dl.sourceforge.net/sourceforge/dynapi/dynapi-3.0.0-beta1.zip I checked out the snapshots, but I'm not sure which one this file=20 corresponds to. I found this link on the DynAPI website, here: http://dynapi.sourceforge.net/dynapi/article.php? sid=3D55&mode=3Dthreaded&order=3D0 Anyway, the scripts I was writing was nothing special, but I will just=20 give you a simple example: ----------------------------------------------------------------------- <html> <head> <title>DynAPI Examples - Glide Animation (Path Animation)</title> <script language=3D"JavaScript" src=3D"dynapi3x/src/dynapi.js"></script> <script language=3D"Javascript"> dynapi.library.setPath('dynapi3x/src/'); dynapi.library.include('dynapi.api'); dynapi.library.include('PathAnimation'); dynapi.library.include('GlideAnimation'); </script> <script language=3D"Javascript"> DynAPI.onLoad(init); function init() { a =3D new DynLayer(); a.setSize(20,20); a.setLocation(500,100); a.setBgColor("green"); b =3D new DynLayer(); b.setSize(20,20); b.setLocation(200,100); b.setBgColor("red"); =09 b_anim =3D new PathAnimation(b); b_anim.sleep(20); var p =3D GlideAnimation(200,100,400,100,7,'slow','slow');=09 b_anim.add(p,false); =09 a_anim =3D new PathAnimation(a); a_anim.sleep(20); var t =3D GlideAnimation(500,100,400,100,7,'slow','slow'); t =3D t.concat( GlideAnimation(400,100,400,200,7,'slow','slow') ); t =3D t.concat( GlideAnimation(400,200,200,200,7,'slow','slow') ); t =3D t.concat( GlideAnimation(200,200,200,100,7,'slow','slow') ); a_anim.add(t,false); =09 a_anim.playAnimation(); b_anim.playAnimation(); =09 dynapi.document.addChild(a); dynapi.document.addChild(b); } //--> </script> </head> <body bgcolor=3D"#ffffff"> <script>dynapi.document.insertAllChildren();</script> </body> </html> ----------------------------------------------------------------------- So, the =93a_anim=94 and =93b_anim=94 execute simultaneously, which is wh= at I=20 DON=92T want. I want to be able to wait until =93a_anim=94 is finished, a= nd=20 then execute =93b_anim=94.=20 Now, as I mentioned before, I found a =93.playing=94 property in the sour= ce=20 files, so I thought I might want to give that a go. But that property=20 is always true. Maybe I can=92t access it or something... I don=92t know.= =20 Are there =93private=94 and =93public=94 properties in JS? Again, I=92m n= ew at=20 this, so these questions may sound pretty stupid.=20 Anyway, if anyone would be kind enough to point out how I can execute=20 the animations sequentially rather than simultaneously, he has my=20 gratitude and thanks =3D) Steven |