Skip navigation
Currently Being Moderated

Time line

Apr 11, 2012 6:03 AM

i know its a bad practice to use timeline scripting but  i was obliged to do that

if user clicked a button that will goto and play for example frame 10 and at frame 10 i have my game code that ill start

the problem is when user clicks the button ( i have a mosue event that shoots) so directly when its loaded i can see the shot in the middle of the screen how can i avoid this

is there something i can do to delay that

 
Replies
  • Currently Being Moderated
    Apr 11, 2012 6:31 AM   in reply to mr.shumi

    Timeline scripting is not a bad practice, thoug when using it there are numerous bad practices that should be avoided.

     

    Your problem is not clear to me.  If you are indicating that you have a moiuse event the results in something shooting, like a gun/bullet, then chances are you need to hold off assigning that event listener until it is time for it to exist.  If you mean that you assign this listner in frame 1 but do not need it un til frame 10, then you could put a conditional inside its event handler that checks the frame before allowing anything to shoot.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 11, 2012 5:54 PM   in reply to mr.shumi

    If clicking the button isn't doing it, then it sounds like just entering the frame causes a bullet to be there.  What makes the bullet appear?  You need to make it such that it cannot happen. 

     

    You'll need to show relevant code if you want help... just explaining with words is not likely to work for you.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 12, 2012 7:21 AM   in reply to mr.shumi

    Seeing it doesn't help solve it.  If you cannot answer the questions or provide what is asked for, there is nothing I can do to help you.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 13, 2012 4:50 AM   in reply to mr.shumi

    It is nearly impossible to read the code you posted.  While I can find that you have a MOUSE_DOWN event that triggers firing a bullet, I don't see where you added that listener, only where you remove it.

     

    What I would guess is that you are entering the frame with the MOUSE_DOWN still registering from having clicked to get to the frame, which triggers the bullet to fire.

     

    What kind of MouseEvent do you have triggering the startLevel2 function ?  It should be a CLICK event

    
     
    |
    Mark as:
  • Currently Being Moderated
    Apr 13, 2012 7:35 PM   in reply to mr.shumi

    I already told you I know what you mean.  I will not even begin to try to find relevant code in all of what you posted.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points