<?xml version="1.0" encoding="UTF-8"?>
<posts type="array">
  <post>
    <body>If you've all seen my scene, no pun intended, thread I have decided that scenes are not worth working with because they seem to me to interrupt the flow of gotoAndStop statements.

So here is my attempt at making my preloader a separate .swf file. I wouldn't be posting it here if I didn't have problems so here is what's going on.

I use simulate download for this.
The preloader loads, the bar starts loading, the trace statements are repeating &quot;loading&quot; over and over, then halfway through my game starts. The loading bar is still loading through the opening credits. trace is still outputting &quot;loading&quot;. Then trace outputs &quot;complete&quot; and everything turns white, the end.

So why do you suppose my movie loads before it's done loading? and why do you suppose the screen blanks out upon completion?

Thanks all, full preloader below.

&lt;pre&gt;
stop();
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.net.URLRequest;
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.display.Sprite;

var sndCat:catmeow3 = new catmeow3();
var sndCatChannel:SoundChannel = sndCat.play(10);
var myLoader:Loader = new Loader();
var logo:MovieClip = new Logo();
var pcLoadLetter:MovieClip = new loadingBase();
var loadBar:MovieClip = new preLoader();
var mySprite:Sprite = new Sprite();

logo.x = (stage.width / 2) + (logo.width / 2) + 50;
logo.y = (stage.height / 2) + logo.height;
pcLoadLetter.x = 100;
pcLoadLetter.y = logo.y + logo.height;
loadBar.x = pcLoadLetter.x;
loadBar.y = pcLoadLetter.y;

myLoader.contentLoaderInfo.addEventListener(Event.OPEN, handleOpen);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);

myLoader.load(new URLRequest(&quot;BottleYourPoe.swf&quot;));

function handleOpen(e:Event):void {
	mySprite.addChild(logo);
	mySprite.addChild(pcLoadLetter);
	mySprite.addChild(myLoader);
	mySprite.addChild(loadBar);
	addChild(mySprite);
	myLoader.contentLoaderInfo.removeEventListener(Event.OPEN, handleOpen);
	trace(&quot;Open&quot;);
}

function onProgress(e:ProgressEvent):void {
	trace(&quot;Loading&quot;);
	var pct:Number = e.bytesLoaded / e.bytesTotal;
	loadBar.scaleX = pct;
	//trace(pct);
}

function onComplete(e:Event):void {
	myLoader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, onProgress);
	removeChild(mySprite);
	trace(&quot;Complete&quot;);
	myLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onComplete);
}
&lt;/pre&gt;</body>
    <body-html>&lt;p&gt;If you&amp;#8217;ve all seen my scene, no pun intended, thread I have decided that scenes are not worth working with because they seem to me to interrupt the flow of gotoAndStop statements.&lt;/p&gt;
&lt;p&gt;So here is my attempt at making my preloader a separate .swf file. I wouldn&amp;#8217;t be posting it here if I didn&amp;#8217;t have problems so here is what&amp;#8217;s going on.&lt;/p&gt;
&lt;p&gt;I use simulate download for this.&lt;br /&gt;
The preloader loads, the bar starts loading, the trace statements are repeating &amp;#8220;loading&amp;#8221; over and over, then halfway through my game starts. The loading bar is still loading through the opening credits. trace is still outputting &amp;#8220;loading&amp;#8221;. Then trace outputs &amp;#8220;complete&amp;#8221; and everything turns white, the end.&lt;/p&gt;
&lt;p&gt;So why do you suppose my movie loads before it&amp;#8217;s done loading? and why do you suppose the screen blanks out upon completion?&lt;/p&gt;
&lt;p&gt;Thanks all, full preloader below.&lt;/p&gt;
&lt;pre&gt;
stop();
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.net.URLRequest;
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.display.Sprite;

var sndCat:catmeow3 = new catmeow3();
var sndCatChannel:SoundChannel = sndCat.play(10);
var myLoader:Loader = new Loader();
var logo:MovieClip = new Logo();
var pcLoadLetter:MovieClip = new loadingBase();
var loadBar:MovieClip = new preLoader();
var mySprite:Sprite = new Sprite();

logo.x = (stage.width / 2) + (logo.width / 2) + 50;
logo.y = (stage.height / 2) + logo.height;
pcLoadLetter.x = 100;
pcLoadLetter.y = logo.y + logo.height;
loadBar.x = pcLoadLetter.x;
loadBar.y = pcLoadLetter.y;

myLoader.contentLoaderInfo.addEventListener(Event.OPEN, handleOpen);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);

myLoader.load(new URLRequest(&quot;BottleYourPoe.swf&quot;));

function handleOpen(e:Event):void {
	mySprite.addChild(logo);
	mySprite.addChild(pcLoadLetter);
	mySprite.addChild(myLoader);
	mySprite.addChild(loadBar);
	addChild(mySprite);
	myLoader.contentLoaderInfo.removeEventListener(Event.OPEN, handleOpen);
	trace(&quot;Open&quot;);
}

function onProgress(e:ProgressEvent):void {
	trace(&quot;Loading&quot;);
	var pct:Number = e.bytesLoaded / e.bytesTotal;
	loadBar.scaleX = pct;
	//trace(pct);
}

function onComplete(e:Event):void {
	myLoader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, onProgress);
	removeChild(mySprite);
	trace(&quot;Complete&quot;);
	myLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onComplete);
}
&lt;/pre&gt;</body-html>
    <created-at type="datetime">2009-11-20T19:38:42-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1481010</id>
    <post-number type="integer">1</post-number>
    <topic-id type="integer">65680</topic-id>
    <updated-at type="datetime">2009-11-20T19:38:42-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>I would much rather use the scaleX property to make my box a little bit bigger on each enter frame than to use so many frames.</body>
    <body-html>&lt;p&gt;I would much rather use the scaleX property to make my box a little bit bigger on each enter frame than to use so many frames.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-20T17:06:17-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1480477</id>
    <post-number type="integer">15</post-number>
    <topic-id type="integer">65358</topic-id>
    <updated-at type="datetime">2009-11-20T17:06:17-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>No, it isn't that thanks. I have removed the reference to the new scene. Just have the labels. 
Calling play from the preloader still sends me on my way fine, but for some reason the links are still screwed up. Maybe it could be Flash? I'll try to do a proper publish and try it in a browser instead of the built in player.

Edit: Nope, wasn't that. Still does it when published too. Anyone work with scenes before? Is there some way they can mess up the goto links?</body>
    <body-html>&lt;p&gt;No, it isn&amp;#8217;t that thanks. I have removed the reference to the new scene. Just have the labels. &lt;br /&gt;
Calling play from the preloader still sends me on my way fine, but for some reason the links are still screwed up. Maybe it could be Flash? I&amp;#8217;ll try to do a proper publish and try it in a browser instead of the built in player.&lt;/p&gt;
&lt;p&gt;Edit: Nope, wasn&amp;#8217;t that. Still does it when published too. Anyone work with scenes before? Is there some way they can mess up the goto links?&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-20T14:36:59-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1480023</id>
    <post-number type="integer">7</post-number>
    <topic-id type="integer">65553</topic-id>
    <updated-at type="datetime">2009-11-20T14:39:16-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>Same error.</body>
    <body-html>&lt;p&gt;Same error.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-20T14:19:41-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1479921</id>
    <post-number type="integer">5</post-number>
    <topic-id type="integer">65553</topic-id>
    <updated-at type="datetime">2009-11-20T14:19:41-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>I will try that, I didn't know the scene was considered attached so closely if that makes sense. I thought in order to get out of one scene to another you had to specifically call it. The play is because it goes right into the intro animation so I don't want to stop.

Edit: That did not work. Since I had erased the first frame of the second scene thinking it would conflict, calling nextFrame(); just goes to that blank frame and stops. If I call nextFrame(); from there it goes to the first frame of animation and stops. So I have to call play(); to get it started again.

I want to get this fixed because having a portable preloader is supposed to be beneficial. If I give up, I'll just end up putting the preloader in the 1st frame of my second scene and probably never use scenes again :P</body>
    <body-html>&lt;p&gt;I will try that, I didn&amp;#8217;t know the scene was considered attached so closely if that makes sense. I thought in order to get out of one scene to another you had to specifically call it. The play is because it goes right into the intro animation so I don&amp;#8217;t want to stop.&lt;/p&gt;
&lt;p&gt;Edit: That did not work. Since I had erased the first frame of the second scene thinking it would conflict, calling nextFrame(); just goes to that blank frame and stops. If I call nextFrame(); from there it goes to the first frame of animation and stops. So I have to call play(); to get it started again.&lt;/p&gt;
&lt;p&gt;I want to get this fixed because having a portable preloader is supposed to be beneficial. If I give up, I&amp;#8217;ll just end up putting the preloader in the 1st frame of my second scene and probably never use scenes again :P&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-19T19:31:25-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1478256</id>
    <post-number type="integer">3</post-number>
    <topic-id type="integer">65553</topic-id>
    <updated-at type="datetime">2009-11-19T19:38:07-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>I am having some trouble with Scenes in CS4. Below is my preloader which is in a separate scene. The preloader works great, it loads and continues onto the next scene. The problem occurs after. All my gotoAndStops and/or gotoAndPlays seem to have some wonky behavior. When I remove the scene everything plays normally as before. But when I put the scene back it messes up again. 

I have selectively gone and tried putting on those certain links that don't seem to work: I have not done this for all of them. Should I? I usually just put gotoAndStop... without anything in front of it. Is that a problem with scenes. Anyways the below don't seem to make any difference. I tried to make sure my timeline layers were all still aligned appropriately and they seem fine to me. 

&lt;pre&gt;
this.gotoAndStop(&quot;frame&quot;, &quot;scene&quot;);
this.gotoAndStop(&quot;frame&quot;);
MovieClip(root).gotoAndStop(&quot;frame&quot;);
MovieClip(root).gotoAndStop(&quot;frame&quot;, &quot;scene&quot;);
&lt;/pre&gt;

For example when I click on the credits button that points to the credits frame it goes instead to the game frame and the game is playable. When I click the game button it says that frame doesn't exist.

From the game frame that I got to by clicking the credits button, if I click the quit button I go to the last instructions page instead of the main menu. I don't see any pattern to this.

I found a potential solution that does not appear to work. A website said make sure there is no actionscript on the page you are linking to from the other scene. So I have removed the actionscript from that frame and started it on the next frame. Still no go.

I have a couple more things to try, any advice is appreciated.

Preloader:

&lt;pre&gt;
stop();
import flash.media.Sound;
import flash.media.SoundChannel;

addEventListener(Event.ENTER_FRAME, preloaderListener);

var sndCat:catmeow3 = new catmeow3();
var sndCatChannel:SoundChannel = sndCat.play(10);

function preloaderListener(evt:Event):void {
	var percent = loaderInfo.bytesLoaded/loaderInfo.bytesTotal;
	preLoad.scaleX = percent;
	//trace(percent);
	if (percent == 1) {
		continueOn();
	}
}

function continueOn():void {
	removeEventListener(Event.ENTER_FRAME, preloaderListener);
	gotoAndPlay(&quot;intro&quot;, &quot;Poe&quot;);
}
&lt;/pre&gt;</body>
    <body-html>&lt;p&gt;I am having some trouble with Scenes in CS4. Below is my preloader which is in a separate scene. The preloader works great, it loads and continues onto the next scene. The problem occurs after. All my gotoAndStops and/or gotoAndPlays seem to have some wonky behavior. When I remove the scene everything plays normally as before. But when I put the scene back it messes up again.&lt;/p&gt;
&lt;p&gt;I have selectively gone and tried putting on those certain links that don&amp;#8217;t seem to work: I have not done this for all of them. Should I? I usually just put gotoAndStop&amp;#8230; without anything in front of it. Is that a problem with scenes. Anyways the below don&amp;#8217;t seem to make any difference. I tried to make sure my timeline layers were all still aligned appropriately and they seem fine to me.&lt;/p&gt;
&lt;pre&gt;
this.gotoAndStop(&quot;frame&quot;, &quot;scene&quot;);
this.gotoAndStop(&quot;frame&quot;);
MovieClip(root).gotoAndStop(&quot;frame&quot;);
MovieClip(root).gotoAndStop(&quot;frame&quot;, &quot;scene&quot;);
&lt;/pre&gt;
&lt;p&gt;For example when I click on the credits button that points to the credits frame it goes instead to the game frame and the game is playable. When I click the game button it says that frame doesn&amp;#8217;t exist.&lt;/p&gt;
&lt;p&gt;From the game frame that I got to by clicking the credits button, if I click the quit button I go to the last instructions page instead of the main menu. I don&amp;#8217;t see any pattern to this.&lt;/p&gt;
&lt;p&gt;I found a potential solution that does not appear to work. A website said make sure there is no actionscript on the page you are linking to from the other scene. So I have removed the actionscript from that frame and started it on the next frame. Still no go.&lt;/p&gt;
&lt;p&gt;I have a couple more things to try, any advice is appreciated.&lt;/p&gt;
&lt;p&gt;Preloader:&lt;/p&gt;
&lt;pre&gt;
stop();
import flash.media.Sound;
import flash.media.SoundChannel;

addEventListener(Event.ENTER_FRAME, preloaderListener);

var sndCat:catmeow3 = new catmeow3();
var sndCatChannel:SoundChannel = sndCat.play(10);

function preloaderListener(evt:Event):void {
	var percent = loaderInfo.bytesLoaded/loaderInfo.bytesTotal;
	preLoad.scaleX = percent;
	//trace(percent);
	if (percent == 1) {
		continueOn();
	}
}

function continueOn():void {
	removeEventListener(Event.ENTER_FRAME, preloaderListener);
	gotoAndPlay(&quot;intro&quot;, &quot;Poe&quot;);
}
&lt;/pre&gt;</body-html>
    <created-at type="datetime">2009-11-19T19:20:08-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1478201</id>
    <post-number type="integer">1</post-number>
    <topic-id type="integer">65553</topic-id>
    <updated-at type="datetime">2009-11-19T19:20:08-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>I tried the progress event and it didn't work for me. Why are you going to &quot;percent&quot;? Are you using multiple frames for this?</body>
    <body-html>&lt;p&gt;I tried the progress event and it didn&amp;#8217;t work for me. Why are you going to &amp;#8220;percent&amp;#8221;? Are you using multiple frames for this?&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-19T19:04:44-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1478152</id>
    <post-number type="integer">9</post-number>
    <topic-id type="integer">65358</topic-id>
    <updated-at type="datetime">2009-11-19T19:04:44-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>I recall hearing about this before...

This forum will help a lot:

http://forums.sun.com/forum.jspa?forumID=54

You might have to sign up, but it is worth it. I used to ask a lot of questions here when programming Java.</body>
    <body-html>&lt;p&gt;I recall hearing about this before&amp;#8230;&lt;/p&gt;
&lt;p&gt;This forum will help a lot:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://forums.sun.com/forum.jspa?forumID=54&quot;&gt;http://forums.sun.com/forum.jspa?forumID=54&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You might have to sign up, but it is worth it. I used to ask a lot of questions here when programming Java.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-18T14:37:46-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1474750</id>
    <post-number type="integer">6</post-number>
    <topic-id type="integer">65302</topic-id>
    <updated-at type="datetime">2009-11-18T14:38:33-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>Huda, I had your second problem I think on one of my games. This game was in AS2, but the concept should be the same. Hopefully this is similar enough to your problem to help. When shooting bullets at enemies I had the same enemy getting hit multiple times so some of the bullets weren't going through. What I did was add a hit flag, so if a bullet hit it it went to &quot;1&quot; or &quot;0&quot;. Then in my hit test I would check that not only did a bullet hit the enemy movieclip but also that it wasn't &quot;hit&quot; previously.</body>
    <body-html>&lt;p&gt;Huda, I had your second problem I think on one of my games. This game was in AS2, but the concept should be the same. Hopefully this is similar enough to your problem to help. When shooting bullets at enemies I had the same enemy getting hit multiple times so some of the bullets weren&amp;#8217;t going through. What I did was add a hit flag, so if a bullet hit it it went to &amp;#8220;1&amp;#8221; or &amp;#8220;0&amp;#8221;. Then in my hit test I would check that not only did a bullet hit the enemy movieclip but also that it wasn&amp;#8217;t &amp;#8220;hit&amp;#8221; previously.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-18T14:24:44-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1474707</id>
    <post-number type="integer">7</post-number>
    <topic-id type="integer">65327</topic-id>
    <updated-at type="datetime">2009-11-18T14:24:44-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>I'm going to run into this problem soon myself, but haven't made it to that point yet. Good luck.</body>
    <body-html>&lt;p&gt;I&amp;#8217;m going to run into this problem soon myself, but haven&amp;#8217;t made it to that point yet. Good luck.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-17T16:15:58-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1472123</id>
    <post-number type="integer">2</post-number>
    <topic-id type="integer">65269</topic-id>
    <updated-at type="datetime">2009-11-17T16:15:58-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>Yeah if you have a slow connection that would explain the discrepancy, a preloader as Moonkey says should do the trick.</body>
    <body-html>&lt;p&gt;Yeah if you have a slow connection that would explain the discrepancy, a preloader as Moonkey says should do the trick.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-15T18:53:15-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1466742</id>
    <post-number type="integer">4</post-number>
    <topic-id type="integer">65040</topic-id>
    <updated-at type="datetime">2009-11-15T18:53:15-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>Are you saying you put code in your pong block movie clip? That is not the right way to go if so, but I won't ask you to change it now.

You should have a layer over the main time line that you can call scripts or whatever and you put the code in there for score keeping. How are you checking for the ball going off the stage? in the ball clip?

In this actions layer, which should be only above the frame your game is on, so a new keyframe over each game frame you should have some code like so:

&lt;pre&gt;
stop();
var leftscore:Number = 0;
var rightscore:Number = 0;

//Do an on enter frame event here
On enter frame event {
  if (ball.x &lt; 1) {
    leftscore++;
  else if (ball.x &gt; Stage.width) {
    rightscore++;
  }

  if (leftscore&gt;5) {
    gotoAndStop(nextLevel);
  else if (rightscore&gt;5) {
    gotoAndStop(gameover);
  }
}
&lt;/pre&gt;</body>
    <body-html>&lt;p&gt;Are you saying you put code in your pong block movie clip? That is not the right way to go if so, but I won&amp;#8217;t ask you to change it now.&lt;/p&gt;
&lt;p&gt;You should have a layer over the main time line that you can call scripts or whatever and you put the code in there for score keeping. How are you checking for the ball going off the stage? in the ball clip?&lt;/p&gt;
&lt;p&gt;In this actions layer, which should be only above the frame your game is on, so a new keyframe over each game frame you should have some code like so:&lt;/p&gt;
&lt;pre&gt;
stop();
var leftscore:Number = 0;
var rightscore:Number = 0;

//Do an on enter frame event here
On enter frame event {
  if (ball.x &amp;lt; 1) {
    leftscore++;
  else if (ball.x &amp;gt; Stage.width) {
    rightscore++;
  }

  if (leftscore&amp;gt;5) {
    gotoAndStop(nextLevel);
  else if (rightscore&amp;gt;5) {
    gotoAndStop(gameover);
  }
}
&lt;/pre&gt;</body-html>
    <created-at type="datetime">2009-11-15T18:50:58-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1466737</id>
    <post-number type="integer">46</post-number>
    <topic-id type="integer">64784</topic-id>
    <updated-at type="datetime">2009-11-15T18:50:58-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>Just a noobish thought, but it may work. If you are trying to get a mousover trigger on your bitmap and bitmaps do not dispatch mouse events then perhaps try to add your bitmap as a child to a new simple rectangle the same size as the bitmap with an alpha of 0. Then add the mousover event to the parent (rectangle).</body>
    <body-html>&lt;p&gt;Just a noobish thought, but it may work. If you are trying to get a mousover trigger on your bitmap and bitmaps do not dispatch mouse events then perhaps try to add your bitmap as a child to a new simple rectangle the same size as the bitmap with an alpha of 0. Then add the mousover event to the parent (rectangle).&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-15T18:25:33-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1466641</id>
    <post-number type="integer">5</post-number>
    <topic-id type="integer">65042</topic-id>
    <updated-at type="datetime">2009-11-15T18:25:33-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>I will look into that, because I do have this that works now:

&lt;pre&gt;
function enterFrameEvent(evt:Event):void {
	if(bashPoe.currentFrame &lt; 31) {
		bashPoe.gotoAndPlay(&quot;bash&quot;);
	}
}
&lt;/pre&gt;

But I am referencing a number which defeats the purpose of having labels. I'm new to all this so I didn't realize there was a currentLabel property.

Edit:

&lt;pre&gt;
function enterFrameEvent(evt:Event):void {
	if(bashPoe.currentLabel != &quot;bash&quot;) {
		bashPoe.gotoAndPlay(&quot;bash&quot;);
	}
}
&lt;/pre&gt;

Works like a beauty. Thanks!</body>
    <body-html>&lt;p&gt;I will look into that, because I do have this that works now:&lt;/p&gt;
&lt;pre&gt;
function enterFrameEvent(evt:Event):void {
	if(bashPoe.currentFrame &amp;lt; 31) {
		bashPoe.gotoAndPlay(&quot;bash&quot;);
	}
}
&lt;/pre&gt;
&lt;p&gt;But I am referencing a number which defeats the purpose of having labels. I&amp;#8217;m new to all this so I didn&amp;#8217;t realize there was a currentLabel property.&lt;/p&gt;
&lt;p&gt;Edit:&lt;/p&gt;
&lt;pre&gt;
function enterFrameEvent(evt:Event):void {
	if(bashPoe.currentLabel != &quot;bash&quot;) {
		bashPoe.gotoAndPlay(&quot;bash&quot;);
	}
}
&lt;/pre&gt;
&lt;p&gt;Works like a beauty. Thanks!&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-15T18:05:11-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1466544</id>
    <post-number type="integer">6</post-number>
    <topic-id type="integer">65029</topic-id>
    <updated-at type="datetime">2009-11-15T18:08:00-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>Yes, but I don't understand how it's relevant Unknown.

rara, my movieclip has multiple labeled frames, (for different actions the character can take like walk or punch) so &quot;lantern&quot; does not necessarily end at the end of the clip. Is there someway I can check if currentFrame is equal to &quot;lantern&quot;? I am going to try to trace this next.</body>
    <body-html>&lt;p&gt;Yes, but I don&amp;#8217;t understand how it&amp;#8217;s relevant Unknown.&lt;/p&gt;
&lt;p&gt;rara, my movieclip has multiple labeled frames, (for different actions the character can take like walk or punch) so &amp;#8220;lantern&amp;#8221; does not necessarily end at the end of the clip. Is there someway I can check if currentFrame is equal to &amp;#8220;lantern&amp;#8221;? I am going to try to trace this next.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-15T17:53:58-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1466506</id>
    <post-number type="integer">4</post-number>
    <topic-id type="integer">65029</topic-id>
    <updated-at type="datetime">2009-11-15T17:53:58-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>I'm trying to switch from AS2 to AS3 and use the onEnterFrame. I found out that it has to be a listener, but am having trouble getting a movieclip to repeat with it. It seems the movie clip keeps repeating so fast that it never fully plays before being restarted. I found something on Google saying there is a &quot;isPlaying&quot; property for movie clips and I try to use that here, but my trace says &quot;isPlaying&quot; is undefined. Any suggestions?

&lt;pre&gt;
function enterFrameEvent(evt:Event):void {
	trace(lanternPoe.isPlaying);
	if (!(lanternPoe.isPlaying)) {
		lanternPoe.gotoAndPlay(&quot;lantern&quot;);
		trace(lanternPoe.isPlaying);
		bashPoe.gotoAndPlay(&quot;bash&quot;);
	}
}
&lt;/pre&gt;

Edit: It looks as if this &quot;isPlaying&quot; is an add on. Someone on another site explained better that you need to create a new movieclip class extending the old to add this functionality in. Is there a better way to get my movieclips to repeat?

In my game I would call the gotoAndPlay each time it's needed, but in this instance this is on an instructions page and so I want the image to repeat all the time, but do not want to create a new movieclip just for this nor do I want to alter the current clip internally.</body>
    <body-html>&lt;p&gt;I&amp;#8217;m trying to switch from AS2 to AS3 and use the onEnterFrame. I found out that it has to be a listener, but am having trouble getting a movieclip to repeat with it. It seems the movie clip keeps repeating so fast that it never fully plays before being restarted. I found something on Google saying there is a &amp;#8220;isPlaying&amp;#8221; property for movie clips and I try to use that here, but my trace says &amp;#8220;isPlaying&amp;#8221; is undefined. Any suggestions?&lt;/p&gt;
&lt;pre&gt;
function enterFrameEvent(evt:Event):void {
	trace(lanternPoe.isPlaying);
	if (!(lanternPoe.isPlaying)) {
		lanternPoe.gotoAndPlay(&quot;lantern&quot;);
		trace(lanternPoe.isPlaying);
		bashPoe.gotoAndPlay(&quot;bash&quot;);
	}
}
&lt;/pre&gt;
&lt;p&gt;Edit: It looks as if this &amp;#8220;isPlaying&amp;#8221; is an add on. Someone on another site explained better that you need to create a new movieclip class extending the old to add this functionality in. Is there a better way to get my movieclips to repeat?&lt;/p&gt;
&lt;p&gt;In my game I would call the gotoAndPlay each time it&amp;#8217;s needed, but in this instance this is on an instructions page and so I want the image to repeat all the time, but do not want to create a new movieclip just for this nor do I want to alter the current clip internally.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-15T15:56:14-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1466113</id>
    <post-number type="integer">1</post-number>
    <topic-id type="integer">65029</topic-id>
    <updated-at type="datetime">2009-11-15T16:06:21-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href='/forums/4/topics/64977?page=1#posts-1464508'&gt;bacio48g&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;So I tried to make a game using the shootorials, but when I hit test movie it doesn&amp;#8217;t do what it says it&amp;#8217;s supposed t do. Is it because I&amp;#8217;m using Flash CS4? Are there any other sites that have tutorials like Kongregate&amp;#8217;s shootorials? &lt;br /&gt;
Thanks&lt;/p&gt;&lt;/blockquote&gt;

Read the post again all of you.. The op said that he hit, or pushed, test movie... which is a command in Flash (Ctrl +Enter, or Command-Return). 

He did not say anything about the hitTest function. Pimpgd's question is still valid, bacio please tell us what you mean by it doesn't do what it's supposed to do. I'm afraid I haven't tried the shootorials in my CS4, but I'm sure that it would work.</body>
    <body-html>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/4/topics/64977?page=1#posts-1464508&quot;&gt;bacio48g&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;So I tried to make a game using the shootorials, but when I hit test movie it doesn&amp;#8217;t do what it says it&amp;#8217;s supposed t do. Is it because I&amp;#8217;m using Flash CS4? Are there any other sites that have tutorials like Kongregate&amp;#8217;s shootorials? &lt;br /&gt;&lt;br /&gt;
Thanks&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Read the post again all of you.. The op said that he hit, or pushed, test movie&amp;#8230; which is a command in Flash (Ctrl +Enter, or Command-Return).&lt;/p&gt;
&lt;p&gt;He did not say anything about the hitTest function. Pimpgd&amp;#8217;s question is still valid, bacio please tell us what you mean by it doesn&amp;#8217;t do what it&amp;#8217;s supposed to do. I&amp;#8217;m afraid I haven&amp;#8217;t tried the shootorials in my CS4, but I&amp;#8217;m sure that it would work.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-15T14:58:43-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1465805</id>
    <post-number type="integer">6</post-number>
    <topic-id type="integer">64977</topic-id>
    <updated-at type="datetime">2009-11-15T14:58:43-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>I use frames for intro animations, credits, other menus like the front screen etc. Then I use just one frame for the actual game. And of course I use frames for animating my movieclips.</body>
    <body-html>&lt;p&gt;I use frames for intro animations, credits, other menus like the front screen etc. Then I use just one frame for the actual game. And of course I use frames for animating my movieclips.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-14T16:12:44-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1461060</id>
    <post-number type="integer">12</post-number>
    <topic-id type="integer">64784</topic-id>
    <updated-at type="datetime">2009-11-14T16:12:44-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>traces! Put some traces in update. Go ahead and trace _root.enemyHolder[i]. &quot;Cannot access a property or method of a null object reference.&quot; This means if _root.enemyHolder[1] = null, then _root.enemyHolder.health -= dmg results in a wtfnull error and then Flash will spit out this error that you can't access the properties or methods of a null object reference. I'm pretty sure that's what's going on. 

You probably either have an error in your indices or for some reason your array is empty.

Edit: or what Mond said! _root.enemyHolder.length-1 would be better.</body>
    <body-html>&lt;p&gt;traces! Put some traces in update. Go ahead and trace _root.enemyHolder[i]. &amp;#8220;Cannot access a property or method of a null object reference.&amp;#8221; This means if _root.enemyHolder&lt;sup class=&quot;footnote&quot;&gt;&lt;a href=&quot;#fn1&quot;&gt;1&lt;/a&gt;&lt;/sup&gt; = null, then _root.enemyHolder.health -= dmg results in a wtfnull error and then Flash will spit out this error that you can&amp;#8217;t access the properties or methods of a null object reference. I&amp;#8217;m pretty sure that&amp;#8217;s what&amp;#8217;s going on.&lt;/p&gt;
&lt;p&gt;You probably either have an error in your indices or for some reason your array is empty.&lt;/p&gt;
&lt;p&gt;Edit: or what Mond said! _root.enemyHolder.length-1 would be better.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-13T18:43:24-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1457723</id>
    <post-number type="integer">5</post-number>
    <topic-id type="integer">64668</topic-id>
    <updated-at type="datetime">2009-11-13T18:44:28-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>If you happen to have CS4 stick to the first option and motion tweens, or try your hand at IK Bones which will allow you to attach &quot;limbs&quot; that can be moved with AS3.</body>
    <body-html>&lt;p&gt;If you happen to have CS4 stick to the first option and motion tweens, or try your hand at IK Bones which will allow you to attach &amp;#8220;limbs&amp;#8221; that can be moved with AS3.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-13T16:16:22-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1457215</id>
    <post-number type="integer">3</post-number>
    <topic-id type="integer">64587</topic-id>
    <updated-at type="datetime">2009-11-13T16:16:22-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>First, Hi Varilian!

Well a lot of good reasons here. I have a few. And yes I know Mario that the games I have uploaded are not the greatest either (Done in AS2 which I learned first).

The game I am making now (And some of you have helped with some of my questions, thanks!) is my first in AS3 and I am working super hard on it to give it that polish my other games don't have.

On to my reasons:

I always consider myself very creative and used to draw and try to invent a lot of things which always ended up in the papery grave Lazer talks about. In school I started with engineering and found programming. I really liked it because it's an inexpensive hobby and I get to make things. Of course I turned to games instead of applications because like many I thought wouldn't it be cool if you could do this or that.

When I hit a wall I usually go on hiatus or start a new game. I have a lot to get back to lol.

I think my main reasons are the joy of creating something and the sense of accomplishment. I want to be able to make things that people enjoy, that make them happy. 

I am of course trying to get into the money making business, right now just trying to make enough to cover expenses such as Flash :$

I'm curious to know why you all chose Flash as opposed to anything else and why web based over client based. I started my programming in Java, those are what the classes are in. I tried learning by myself C++ first and got some basics down. I knew that to start by myself I needed to do everything and while I can draw decently I was dreading the art work using Java. That coupled with the fact that I felt it was easier to make a living off web based games led to me using Flash which I discovered after having found Kongregate.</body>
    <body-html>&lt;p&gt;First, Hi Varilian!&lt;/p&gt;
&lt;p&gt;Well a lot of good reasons here. I have a few. And yes I know Mario that the games I have uploaded are not the greatest either (Done in AS2 which I learned first).&lt;/p&gt;
&lt;p&gt;The game I am making now (And some of you have helped with some of my questions, thanks!) is my first in AS3 and I am working super hard on it to give it that polish my other games don&amp;#8217;t have.&lt;/p&gt;
&lt;p&gt;On to my reasons:&lt;/p&gt;
&lt;p&gt;I always consider myself very creative and used to draw and try to invent a lot of things which always ended up in the papery grave Lazer talks about. In school I started with engineering and found programming. I really liked it because it&amp;#8217;s an inexpensive hobby and I get to make things. Of course I turned to games instead of applications because like many I thought wouldn&amp;#8217;t it be cool if you could do this or that.&lt;/p&gt;
&lt;p&gt;When I hit a wall I usually go on hiatus or start a new game. I have a lot to get back to lol.&lt;/p&gt;
&lt;p&gt;I think my main reasons are the joy of creating something and the sense of accomplishment. I want to be able to make things that people enjoy, that make them happy.&lt;/p&gt;
&lt;p&gt;I am of course trying to get into the money making business, right now just trying to make enough to cover expenses such as Flash :$&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m curious to know why you all chose Flash as opposed to anything else and why web based over client based. I started my programming in Java, those are what the classes are in. I tried learning by myself C++ first and got some basics down. I knew that to start by myself I needed to do everything and while I can draw decently I was dreading the art work using Java. That coupled with the fact that I felt it was easier to make a living off web based games led to me using Flash which I discovered after having found Kongregate.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-11T17:53:11-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1452309</id>
    <post-number type="integer">13</post-number>
    <topic-id type="integer">64308</topic-id>
    <updated-at type="datetime">2009-11-11T17:53:11-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>In AS3? If you are jumping to another frame I would make an external class with a get and set method. So you can set in one frame and get in the other.</body>
    <body-html>&lt;p&gt;In AS3? If you are jumping to another frame I would make an external class with a get and set method. So you can set in one frame and get in the other.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-10T14:34:20-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1448116</id>
    <post-number type="integer">2</post-number>
    <topic-id type="integer">64254</topic-id>
    <updated-at type="datetime">2009-11-10T14:34:20-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>Ghost, and if you play your cards right you can get your character married to a person of the same sex O_o.

I am in the preliminary stages of toying with this sort of idea myself. I was thinking of a text based game in which the more the player goes toward what is wrong the more real the world feels, thereby making the player think he's doing the right thing. If the player makes a good choice then the world seems less real. I don't want to share at this time how the world would be more or less real though sorry.

I thought The Game was a very good movie.</body>
    <body-html>&lt;p&gt;Ghost, and if you play your cards right you can get your character married to a person of the same sex O_o.&lt;/p&gt;
&lt;p&gt;I am in the preliminary stages of toying with this sort of idea myself. I was thinking of a text based game in which the more the player goes toward what is wrong the more real the world feels, thereby making the player think he&amp;#8217;s doing the right thing. If the player makes a good choice then the world seems less real. I don&amp;#8217;t want to share at this time how the world would be more or less real though sorry.&lt;/p&gt;
&lt;p&gt;I thought The Game was a very good movie.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-10T14:28:09-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1448102</id>
    <post-number type="integer">4</post-number>
    <topic-id type="integer">64210</topic-id>
    <updated-at type="datetime">2009-11-10T14:29:29-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>Flash game developers are:

Designers, level artists, character artists, item artists, writers, programmers, sound effects artists, musicians, mathematicians (algorithms), and physicists (game physics).</body>
    <body-html>&lt;p&gt;Flash game developers are:&lt;/p&gt;
&lt;p&gt;Designers, level artists, character artists, item artists, writers, programmers, sound effects artists, musicians, mathematicians (algorithms), and physicists (game physics).&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-09T20:04:20-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1446951</id>
    <post-number type="integer">14</post-number>
    <topic-id type="integer">64080</topic-id>
    <updated-at type="datetime">2009-11-09T20:04:20-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
  <post>
    <body>Moonkey, I used your suggestion of currentTarget. That helped. I did not try your safe option, but will keep it in mind in the future.

DeepClaw, adding it to the parent coupled with using currentTarget solved my problem. I'm not sure I would need to use your last suggestion as I am dynamically creating a toolTip without the intention of leaving it on the stage. The mouse can never touch it anyways because I am positioning it just to the upper left of wherever the pointer is. 

Thanks guys.</body>
    <body-html>&lt;p&gt;Moonkey, I used your suggestion of currentTarget. That helped. I did not try your safe option, but will keep it in mind in the future.&lt;/p&gt;
&lt;p&gt;DeepClaw, adding it to the parent coupled with using currentTarget solved my problem. I&amp;#8217;m not sure I would need to use your last suggestion as I am dynamically creating a toolTip without the intention of leaving it on the stage. The mouse can never touch it anyways because I am positioning it just to the upper left of wherever the pointer is.&lt;/p&gt;
&lt;p&gt;Thanks guys.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-09T17:44:59-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">4</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1446502</id>
    <post-number type="integer">4</post-number>
    <topic-id type="integer">64059</topic-id>
    <updated-at type="datetime">2009-11-09T17:44:59-08:00</updated-at>
    <user-id type="integer">604811</user-id>
  </post>
</posts>
