A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Problem with my game...

  1. #1
    Patron Saint of Beatings WilloughbyJackson's Avatar
    Join Date
    Nov 2000
    Location
    Ro-cha-cha-cha, New York
    Posts
    1,988
    I keep getting this message at very, very random times that my movie had did over 200,000 actions (more than likely a loop...

    I've been looking but I can't find any loops that would cause that...

    Can anyone tell me what causes this 200,000 action excution error would occur?

    Could it be the fact that I have place multiple actions on the same frame but different layers or something else?

    -pXw

  2. #2
    Welcome to flavour country
    Join Date
    Sep 2000
    Posts
    662
    Originally posted by WilloughbyJackson
    Could it be the fact that I have place multiple actions on the same frame but different layers or something else?
    This is a definite possibility. It's better to keep all your actions in the same keyframe preferably on their own layer.

    This message is only returned if you have a loop in which your condition is not met in 200,000 loops. You must have a loop somewhere which is not functioning properly. Put a trace action inside each loop you have to find the one which is returning this error message.

    Hope this helps.

  3. #3
    Patron Saint of Beatings WilloughbyJackson's Avatar
    Join Date
    Nov 2000
    Location
    Ro-cha-cha-cha, New York
    Posts
    1,988
    Originally posted by thewiz1972
    This message is only returned if you have a loop in which your condition is not met in 200,000 loops. You must have a loop somewhere which is not functioning properly. Put a trace action inside each loop you have to find the one which is returning this error message.

    Hope this helps.
    Thank you. I guess my second question would be, how do I use the Trace Action thing?

    I've heard of Trace before, and how is it suppose to help but in all of the books I have, none of them tell you how to use Trace and the Trace Action option.

    Once again, thank you for the help...

    -pXw

  4. #4
    Welcome to flavour country
    Join Date
    Sep 2000
    Posts
    662
    It's quite simple. Just choose trace from the drop down list of actions and then just enter some text or a number or whatever you'd like. Test your movie and whenever that trace action is encountered in your code it will output the text you entered.

    So whatever trace message is being outputted when the error occurs is the offending loop.

  5. #5
    Senior Member
    Join Date
    Aug 2000
    Posts
    2,235
    It is best that you post your code for questions like this - you'll fix the problem much faster that way. Often this problem is caused by putting the "variable" = variable+1 outside the loop statement...

  6. #6
    Patron Saint of Beatings WilloughbyJackson's Avatar
    Join Date
    Nov 2000
    Location
    Ro-cha-cha-cha, New York
    Posts
    1,988
    Okay... So far, I can't get the error to happen again...
    I think making the actions all on one layer worked...

    Here's the code which seemed to be the problem, though...

    FRAME 2 is this:

    If (NLP > 300)
    Set Variable: "NLP" = 0
    Begin Tell Target ("/")
    Go to and Play (GetProperty ("", _currentframe) + 2)
    End Tell Target
    End If
    Set Variable: "ENEMY" = Random (12) + 1
    Play


    FRAME 3 is this:

    If (GetProperty ("/BAR/V" & ENEMY , _currentframe) = 1)
    Begin Tell Target ("/BAR/V" & ENEMY)
    Play
    End Tell Target
    Else If ((GetProperty ("/BAR/V" & ENEMY , _currentframe) <> 1) )
    Set Variable: "NLP" = NLP + ENEMY
    Go to and Play (2)
    Else
    Play
    End If
    Start Drag ("/SIGHT", lockcenter)

    Basically, there are several movies in the Movie BAR which are being triggered to play when they are choosen. This is V1 - V12. If the V movie is already being played, it goes back to FRAME 2 to choose another one. When I first thought that the ACTION LOOP was being caused by this, I added the NLP variable so it will only loop a certain number of times and then move on...

    So, do you see any problems with this code...

    As I said before, it hasn't crashed on me yet since I streamlined the action script...

    EDIT: Oh yes, and thank you very, very, very much! This is my main project for my Grad Student entrance portfolio...

    -pXw
    [Edited by WilloughbyJackson on 02-16-2001 at 04:45 PM]

  7. #7
    Welcome to flavour country
    Join Date
    Sep 2000
    Posts
    662
    I've had this same problem. The play action at the end of your script does some strange things sometimes. I've had it play my movie super fast and give me the same error even though I didn't have a true loop. If you don't need to tell it to play (i.e. it's not stopped) then it's not neccessary to put the play action in there.

  8. #8
    Patron Saint of Beatings WilloughbyJackson's Avatar
    Join Date
    Nov 2000
    Location
    Ro-cha-cha-cha, New York
    Posts
    1,988
    My movie seems to stall ever once in awhile and that's why I added it. I'll try that.

    Thanks again...

    -pXw

  9. #9
    Senior Member
    Join Date
    Aug 2000
    Posts
    2,235
    You have 2 possible conditions; _currentframe = 1 or _ currentframe <> 1, yet you have 3 conditionals; If, Else if and Else.

    /// first condition:
    If (GetProperty ("/BAR/V" & ENEMY , _currentframe) = 1)
    Begin Tell Target ("/BAR/V" & ENEMY)
    Play
    End Tell Target

    /// second condition:
    Else If ((GetProperty ("/BAR/V" & ENEMY , _currentframe) <> 1) )
    Set Variable: "NLP" = NLP + ENEMY
    Go to and Play (2)

    /// third condition:
    Else
    Play
    End If
    Start Drag ("/SIGHT", lockcenter)

    This might be the problem as you are asking to do something if it is neither equal to 1 or not equal to 1, and it has to be one of these...

    ~mgb

    [Edited by mgb on 02-17-2001 at 12:12 AM]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center