To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > General Help > Games

Reply
 
Thread Tools Search this Thread Display Modes
Old 08-17-2007, 03:08 PM   #1
Alluvian
Senior Member
 
Alluvian's Avatar
 
Join Date: Jun 2006
Posts: 873
Inconsistent bahavior just KILLING me. Any suggestions?

This is just driving me nuts. I have my basic "move object around" code in my MovieClip subclass, but every 1 in 20 or so times I tell it to do something, it fails and does something weird. Like the code skipped a step. It isn't just one method that is failing either, but any number of them can do weird things.

For example, I can have two objects start next to each other and move one into the other. This should trigger my hittest. But if I completely close down the flash environment, start up the fla, and test the movie, it will fail. The hittest won't register.

So I close down the test, right away test it again with NO CHANGES and this time the hittest works fine.

Another example
I have a rotate_right method that basically just checks a facing property and then calls a 'setfacing' method with the correct angle that just takes that facing, assigns it to the internal facing variable, and tells the class to move to a new internal animation frame to show that it has rotated (dealing with 90 degree turns and sprites that are not pure topdown). Basically switching from a back view to a right side view if rotate_right is called when the facing was 0 to start with. Sometimes the movieclip won't change to the sideview though! I KNOW the 'setfacing' method is being called since it is changing the facing value, but the sprite still shows the back view but then acts like it is going right.

Any idea what would be causing a vague problem like this? It sure makes me want to punch my monitor when it works fine one time, and then skips instructions another time. I cannot reproduce ANY of these errors in debug mode. It always does just what I want in debug mode.

It's driving me nuts. I have a very object intensive setup, with each tile of a 32x32 board being an object in an array (anything off screen is just set as _visible = false). I don't go through that array too often though, except when scrolling or scaling the board. And these problems happen when the board is still.

Could having too many objects cause flash to skip lines of code? I know it can slow down framerate, but the when a hittest misses, it will miss while it should be true for probably 10-15 frames. These objects are not moving that fast.
Alluvian is offline   Reply With Quote
Old 08-17-2007, 03:24 PM   #2
renderhjs
Student
 
Join Date: Apr 2001
Location: -
Posts: 4,756
I had problems with AS2 and FlashMX2004+Flash8 as it cached the AS classes and it wouldn´t update it even after some restarts- sounds the same as what you have
renderhjs is offline   Reply With Quote
Old 08-17-2007, 03:58 PM   #3
Alluvian
Senior Member
 
Alluvian's Avatar
 
Join Date: Jun 2006
Posts: 873
If it was a cacheing issue, wouldn't that basically mean that my main script would be calling old versions of my classes?

If that would work how I would think it would work, then the 'rotate_right' script would still either call the 'this.gotoAndPlay("framename")' command correctly to set visual facing or it wouldn't. How would caching cause it to sometimes set the facing and other times leave the current one? All during the same testing of the swf? I can keep hitting my test button to call the turn_right method and watch as it usually works fine, but seemingly randomly fails to update visual facing. Odd that it always seems to update the actually _facing property.

Or am I misunderstanding what you are saying?

Is there maybe something wonky about gotoAndPlay? I remember last time I was coding in flash I was getting really mad that gotoAndStop would not actually STOP all of the time.
Alluvian is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > General Help > Games

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:19 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.