Jump to content
  • Advertisement
Sign in to follow this  
Koobazaur

[web] ActionScript ridiculousness

This topic is 3059 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Alright, I just spent two hours trying to figure out why my flash film will not skip to the desired frame and finally narrowed it down. The gotoAndPlay() function is not working correctly. My document is 621 frames long (@24fps) and if I plug in 0-99 into gotoAndPlay() it skips to the right frame. But if I go above 100, it ALWAYS jumps to the same 100th frame. Doesn't matter if it's 400 or 200, it's ALWAYS THE SAME FRAME. This is driving me crazy - what the HELL is wrong with Flash CS4? Why is a simple call to the most basic function NOT working? What the hell am I doing wrong? What's even more annoying is when I debug the movie, lo-and-behold the function call works perfectly well! But as soon as I publish it, it's broken. Doesn't matter how I publish it, AS 3 or 2, Flash 9 or 7, it always screws up. Whaaaaaaaaaaat theeeeeeeeeeee heeeeeeellllllllll??????

Share this post


Link to post
Share on other sites
Advertisement
Hahaha you gave me a very good laugh!
It reminds me of my flash days..
All I can tell you is "welcome to the world of Adobe where nothing really works".

Now to be serious.
If I understand you correctly I'd suggest having a certain global var at frame 1.
Call it "m_nJump".
At frame 100 have a function that when this frame is being arrived, it'll check "m_nJump" and gotoAndPlay(current_frame + "m_nJump"), if "m_nJump" is not zero.
Maybe that'll do.

I would tell you to also check their official forums but there all I found is a huge nothing.

Good luck.

Share this post


Link to post
Share on other sites
Don't get me started. Sometimes I had to wait in a frame loop for a member to become "available" even though I had just goto'd that frame :)

And sometimes adding new objects to a frame, would cause some of the others to disappear.

It *might* look like a program language, but the runtime is horribly broken :)

Share this post


Link to post
Share on other sites
*sigh*

To shed some more light:

The whole flash is super simple. It's basically just a slides how of images (alternatingly moving left/right). Every 100 frames, the next image fades in over the previous image. Each image is it's own layer inside the Symbol which is inserted in scene 1.

(since the flash appears on multiple pages, I wanted to just jump to a random image on each one so that it doesn't always play from the same start)

So it seems that somehow introducing the new image is what halts the gotoAndPlay(). Like I said, any frame before it and it jumps fine. Any frame after it, and it stops as soon as the first new image fade in happens.

Why this would occur is beyond me. It's not like I have a billion symbols with thousands of sub-symbols and hundreds of lines of ActionScript. It's literally 10 images, one symbol and 1 line of actionscript. And it fails.

I remember having random bugs way way back in Flash MX. I thought they'd figure that stuff out by CS4. How people manage to make long and complicated Flash games with this is beyond me.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!