-
Simple Actionscript not working...
I've been programming for 12 years and for some reason Actionscript is turning out to be such a pain in the butt. So I would appreciate any pointers you may have.
What I want is very simple. I have multiple webpages all with the same flash header that plays from frame 1 --> 362 and at the end loops back at frame 70 --> 362 and so on. (Frames 1-69 should only play once)
onFrame (362) {
gotoSceneAndPlay("<current scene>",70);
}
That works great, however I don't want the first 70 frames to played everytime a new page opens. No matter what I try it doesn't work.
So what I do is pass a variable through the <PARAM NAME=FlashVars VALUE="startpos1=70"> in the HTML when I want to start mid-way through the animation. I can verify that it is actually passed and is seen as a string.
So what I tried to do is put the following code on the scene timeline. I can verify that the IF statement works, but for some reason the GOTOSCENEANDPLAY function is utterly ignored. What am I doing wrong?
onFrame (1) {
if (startpos1 eq "70") {
gotoSceneAndPlay("<current scene>",70);
}
THANKS!!
shawn@smallbizwebsites.net
-
er ... I've never seen an "onFrame" handler before. I'm also unfamiliar with the "gotoSceneAndPlay" function. Would you plz check/explain that first!
pecoes
-
The onFrame() handler is just what it describes. For the object (in this case the scene), when the frame# identified is encountered, a script is executed.
I can verify that the onFrame() handler works as expected.
As far as I can tell, the gotoSceneAndPlay() method is just what is says. It's my guess that this is the problem. I guess the question would be, what is the correct directive to tell the movie to skip or jump to a particular frame without playing the frames in-between?
As I mentioned before, I use this because my movie is:
Frame 1 ----> FANCY INTRO ANIMATION --> Frame 70 --> REPEATING MARKETING LOOP --> Frame xxx
I want the intro to play only once per visit, but the loop to repeat regardless of what page is opened.
Thanks
Shawn
-
Hi Shawn,
okay, I checked AStDG2, I ckecked macromedia's livedocs; I even looked at the list of undocumented features over at flashcoders wiki.
As far as I can tell neither that handler nor that function exist. What have you read?
pecoes
Last edited by pecoes; 12-19-2003 at 07:41 PM.
-
You aren't using Flash, right? You're using "Swish"?
If so, you may be better off in one of their forums ...
Last edited by pecoes; 12-19-2003 at 08:36 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|