Note that there are some explanatory texts on larger screens.

plurals
  1. PODragDrop and Interval error? (AS3)
    text
    copied!<p>Here is the frame 1 code:</p> <p><a href="http://textuploader.com/1dhz" rel="nofollow">http://textuploader.com/1dhz</a></p> <p>So I made a game, with a chicken (which moving), but you can drag it and drop it + added a timer to chicken (because of moving, chicken moving every 5 seconds). And I made one alert Window, and you can drag and drop it too.</p> <p>I made 2 frame. On the first frame are the chicken, and on the first+second frame are the alert window.</p> <p>When I go to the second frame, i got one error:</p> <pre><code>TypeError: Error #1009: Cannot access a property or method of a null object reference. at ghost_fla::MainTimeline/chicken_moving() at Function/http://adobe.com/AS3/2006/builtin::apply() at SetIntervalTimer/onTimer() at flash.utils::Timer/_timerDispatch() at flash.utils::Timer/tick() </code></pre> <p>I don't understand this error. I didn't made timer on frame 2, i just made an Interval on frame 1. ??</p> <p>And if i click somewhere, i got +1 error:</p> <pre><code>TypeError: Error #1009: Cannot access a property or method of a null object reference. at ghost_fla::MainTimeline/chicken_ReleaseToDrop() </code></pre> <p>I don't understand this too. If I drag + drop the alert Window on frame 2, why i got this error?</p> <p>Please someone help, I don't understand</p> <p>//edit:</p> <p>I fixed the 2. error. I just removed the event listener on frame 2</p> <pre><code>stage.removeEventListener(MouseEvent.MOUSE_UP, chicken_ReleaseToDrop); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload