<?xml version="1.0" encoding="UTF-8"?>
<posts type="array">
  <post>
    <body>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href='/forums/4/topics/65613?page=1#posts-1479468'&gt;MaToMaStEr&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;add a Mouse Listener, and catch the left clicks. when it&amp;#8217;s clicked, make the finish invisible&amp;#8230; and make it visible again when the button is up.&lt;/p&gt;
&lt;pre&gt;
var mouseLis:Object = new OBject();
Mouse.addListener(mouseLis);

mouseLis.onMouseDown = function(){
    finish._visible=false;
}
mouseLis.onMouseUp = function(){
    finish._visible=true;
}
&lt;/pre&gt;
&lt;p&gt;add that code on the first lines of the frame where your maze is.&lt;/p&gt;&lt;/blockquote&gt;

Off topic, but that's pretty clever : )
I don't think I've ever seen that one before.</body>
    <body-html>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/4/topics/65613?page=1#posts-1479468&quot;&gt;MaToMaStEr&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;add a Mouse Listener, and catch the left clicks. when it&amp;#8217;s clicked, make the finish invisible&amp;#8230; and make it visible again when the button is up.&lt;/p&gt;
&lt;pre&gt;
var mouseLis:Object = new OBject();
Mouse.addListener(mouseLis);

mouseLis.onMouseDown = function(){
    finish._visible=false;
}
mouseLis.onMouseUp = function(){
    finish._visible=true;
}
&lt;/pre&gt;
&lt;p&gt;add that code on the first lines of the frame where your maze is.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Off topic, but that&amp;#8217;s pretty clever : )&lt;br /&gt;
I don&amp;#8217;t think I&amp;#8217;ve ever seen that one before.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-20T11:44: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">1479490</id>
    <post-number type="integer">4</post-number>
    <topic-id type="integer">65613</topic-id>
    <updated-at type="datetime">2009-11-20T11:44:43-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href='/forums/4/topics/65553?page=1#posts-1478256'&gt;KMAE&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&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;/blockquote&gt;

Have you tried calling play(); from the last preloader frame?</body>
    <body-html>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/4/topics/65553?page=1#posts-1478256&quot;&gt;&lt;span class=&quot;caps&quot;&gt;KMAE&lt;/span&gt;&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&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;/blockquote&gt;
&lt;p&gt;Have you tried calling play(); from the last preloader frame?&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-19T19:37:29-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">1478281</id>
    <post-number type="integer">4</post-number>
    <topic-id type="integer">65553</topic-id>
    <updated-at type="datetime">2009-11-19T19:38:28-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href='/forums/4/topics/65553?page=1#posts-1478201'&gt;KMAE&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;
&lt;pre&gt;
function continueOn():void {
	removeEventListener(Event.ENTER_FRAME, preloaderListener);
	gotoAndPlay(&quot;intro&quot;, &quot;Poe&quot;);
}
&lt;/pre&gt;&lt;/blockquote&gt;

Why do you have a gotoAndPlay?
Try using this instead. If I know how your preloader looks, then this should work just fine.

&lt;pre&gt;
function continueOn():void {
	removeEventListener(Event.ENTER_FRAME, preloaderListener);
	nextFrame();
}

If that code is in the last frame of your preloader, or a layer that reaches the last frame, your swf will automatically advance to the next scene.</body>
    <body-html>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/4/topics/65553?page=1#posts-1478201&quot;&gt;&lt;span class=&quot;caps&quot;&gt;KMAE&lt;/span&gt;&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
function continueOn():void {&lt;br /&gt;
	removeEventListener(Event.ENTER_FRAME, preloaderListener);&lt;br /&gt;
	gotoAndPlay(&amp;#8220;intro&amp;#8221;, &amp;#8220;Poe&amp;#8221;);&lt;br /&gt;
}&lt;br /&gt;
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;Why do you have a gotoAndPlay?&lt;br /&gt;
Try using this instead. If I know how your preloader looks, then this should work just fine.&lt;/p&gt;
&lt;pre&gt;
function continueOn():void {
	removeEventListener(Event.ENTER_FRAME, preloaderListener);
	nextFrame();
}

If that code is in the last frame of your preloader, or a layer that reaches the last frame, your swf will automatically advance to the next scene.</body-html>
    <created-at type="datetime">2009-11-19T19:27:49-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">1478243</id>
    <post-number type="integer">2</post-number>
    <topic-id type="integer">65553</topic-id>
    <updated-at type="datetime">2009-11-19T19:28:42-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>Finally got it all working!
I put it in the timeline, and everything worked fine.
If anyone else has problems with the AS3 API, I recommend using your frame 1 to load data/API.</body>
    <body-html>&lt;p&gt;Finally got it all working!&lt;br /&gt;
I put it in the timeline, and everything worked fine.&lt;br /&gt;
If anyone else has problems with the AS3 &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;, I recommend using your frame 1 to load data/&lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-19T16:21: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">1477497</id>
    <post-number type="integer">10</post-number>
    <topic-id type="integer">65472</topic-id>
    <updated-at type="datetime">2009-11-19T16:21:24-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>I'm going to make a new class for the API. I'll use the example from the primer.
What I'm wondering is if it matters that I use a preloader in a different scene.

What's so bad about using the component anyway?</body>
    <body-html>&lt;p&gt;I&amp;#8217;m going to make a new class for the &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;. I&amp;#8217;ll use the example from the primer.&lt;br /&gt;
What I&amp;#8217;m wondering is if it matters that I use a preloader in a different scene.&lt;/p&gt;
&lt;p&gt;What&amp;#8217;s so bad about using the component anyway?&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-19T15:32:31-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">1477373</id>
    <post-number type="integer">9</post-number>
    <topic-id type="integer">65472</topic-id>
    <updated-at type="datetime">2009-11-19T15:35:47-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href='/forums/4/topics/65358?page=1#posts-1477027'&gt;Cantor&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;Why are you using an ENTER_FRAME event type? I have never used that to make a preloader, i have always used the ProgressEvent type and never had any trouble with them.&lt;/p&gt;
&lt;p&gt;Try using:&lt;/p&gt;
&lt;pre&gt;stop();

loaderInfo.addEventListener(ProgressEvent.PROGRESS, loader);

function loader(filename:ProgressEvent):void
{
	//find the file size and convert it to a 1-100% number
	var percent:Number = Math.floor((filename.bytesLoaded*100) /filename.bytesTotal);
	
	//go to the frame number based on the percent loaded 
	if(percent &amp;lt;=99)
	{
		preloader.gotoAndStop(percent);
	}//end of if
	
	//when fully loaded go to the last perloader frame and remove the listener
	else if(percent == 100)
	{
		preloader.gotoAndStop(percent);
		loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loader);
                nextBtn.x = 275;
	}//end of else if
	
};&lt;/pre&gt;
&lt;p&gt;That should work. As i said, it never fails for me.&lt;/p&gt;&lt;/blockquote&gt;

If I have to, I will use that. But for some reason, I switched to using a preloader in a different scene, and the problem fixed itself.</body>
    <body-html>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/4/topics/65358?page=1#posts-1477027&quot;&gt;Cantor&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;Why are you using an ENTER_FRAME event type? I have never used that to make a preloader, i have always used the ProgressEvent type and never had any trouble with them.&lt;/p&gt;
&lt;p&gt;Try using:&lt;/p&gt;
&lt;pre&gt;stop();

loaderInfo.addEventListener(ProgressEvent.PROGRESS, loader);

function loader(filename:ProgressEvent):void
{
	//find the file size and convert it to a 1-100% number
	var percent:Number = Math.floor((filename.bytesLoaded*100) /filename.bytesTotal);
	
	//go to the frame number based on the percent loaded 
	if(percent &amp;amp;lt;=99)
	{
		preloader.gotoAndStop(percent);
	}//end of if
	
	//when fully loaded go to the last perloader frame and remove the listener
	else if(percent == 100)
	{
		preloader.gotoAndStop(percent);
		loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loader);
                nextBtn.x = 275;
	}//end of else if
	
};&lt;/pre&gt;
&lt;p&gt;That should work. As i said, it never fails for me.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;If I have to, I will use that. But for some reason, I switched to using a preloader in a different scene, and the problem fixed itself.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-19T13:27:40-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">1477076</id>
    <post-number type="integer">5</post-number>
    <topic-id type="integer">65358</topic-id>
    <updated-at type="datetime">2009-11-19T13:27:40-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href='/forums/4/topics/65472?page=1#posts-1477004'&gt;SuperMarioJump&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;And when you set the document class in the properties toolbar it didn&amp;#8217;t give you a warning like &amp;#8220;Class cannot be found, will be created at runtime&amp;#8221;?&lt;/p&gt;&lt;/blockquote&gt;
No, I didn't get an error. Also, I made the class before setting it as the main class, and made sure it was in the root project folder.

Creating a new post instead of editing because this might be important.
I get this error:

&lt;pre&gt;
TypeError: Error #1010: A term is undefined and has no properties.
	at scoreButton()[C:\Documents and Settings\(Censored)\My Documents\Flash Design\API Test\scoreButton.as:20]
&lt;/pre&gt;

I get it when I originally try to submit a score.
So I deleted that line. Then I got it when I clicked the button (line 28)
Which raises another problem. It's the kongregate.stats.submit piece of code that's causing the error, but the last time it's in there (API load complete) it doesn't throw an error.</body>
    <body-html>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/4/topics/65472?page=1#posts-1477004&quot;&gt;SuperMarioJump&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;And when you set the document class in the properties toolbar it didn&amp;#8217;t give you a warning like &amp;#8220;Class cannot be found, will be created at runtime&amp;#8221;?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;No, I didn&amp;#8217;t get an error. Also, I made the class before setting it as the main class, and made sure it was in the root project folder.&lt;/p&gt;
&lt;p&gt;Creating a new post instead of editing because this might be important.&lt;br /&gt;
I get this error:&lt;/p&gt;
&lt;pre&gt;
TypeError: Error #1010: A term is undefined and has no properties.
	at scoreButton()[C:\Documents and Settings\(Censored)\My Documents\Flash Design\API Test\scoreButton.as:20]
&lt;/pre&gt;
&lt;p&gt;I get it when I originally try to submit a score.&lt;br /&gt;
So I deleted that line. Then I got it when I clicked the button (line 28)&lt;br /&gt;
Which raises another problem. It&amp;#8217;s the kongregate.stats.submit piece of code that&amp;#8217;s causing the error, but the last time it&amp;#8217;s in there (&lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; load complete) it doesn&amp;#8217;t throw an error.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-19T13:08:49-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">1477023</id>
    <post-number type="integer">8</post-number>
    <topic-id type="integer">65472</topic-id>
    <updated-at type="datetime">2009-11-19T13:20:33-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href='/forums/4/topics/65472?page=1#posts-1476976'&gt;SuperMarioJump&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;Are you really sure it&amp;#8217;s set as the main class? If it&amp;#8217;s not tracing &amp;#8220;Initialized&amp;#8221; either you don&amp;#8217;t have the debug Flash Player or you&amp;#8217;re not comiling this class.&lt;/p&gt;&lt;/blockquote&gt;
I don't know which flash program you use, but I use CS4. So all I do is click the first frame, go to the properties toolbar, and I can edit the main document class.

I do find it weird that it wasn't initializing when it was the main class.</body>
    <body-html>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/4/topics/65472?page=1#posts-1476976&quot;&gt;SuperMarioJump&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;Are you really sure it&amp;#8217;s set as the main class? If it&amp;#8217;s not tracing &amp;#8220;Initialized&amp;#8221; either you don&amp;#8217;t have the debug Flash Player or you&amp;#8217;re not comiling this class.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I don&amp;#8217;t know which flash program you use, but I use CS4. So all I do is click the first frame, go to the properties toolbar, and I can edit the main document class.&lt;/p&gt;
&lt;p&gt;I do find it weird that it wasn&amp;#8217;t initializing when it was the main class.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-19T12:57:56-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">1476990</id>
    <post-number type="integer">6</post-number>
    <topic-id type="integer">65472</topic-id>
    <updated-at type="datetime">2009-11-19T12:57:56-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href='/forums/4/topics/64505?page=1#posts-1476719'&gt;Gamepages&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;I&amp;#8217;d highly recommend not drawing it like that. use a movieclip.&lt;/p&gt;&lt;/blockquote&gt;
Drawing it like that is less memory-intensive, and is better when it's scaled.

Anyone can correct me if I'm wrong, but isn't he better off drawing it like this?</body>
    <body-html>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/4/topics/64505?page=1#posts-1476719&quot;&gt;Gamepages&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;I&amp;#8217;d highly recommend not drawing it like that. use a movieclip.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Drawing it like that is less memory-intensive, and is better when it&amp;#8217;s scaled.&lt;/p&gt;
&lt;p&gt;Anyone can correct me if I&amp;#8217;m wrong, but isn&amp;#8217;t he better off drawing it like this?&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-19T12:55:32-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">1476985</id>
    <post-number type="integer">14</post-number>
    <topic-id type="integer">64505</topic-id>
    <updated-at type="datetime">2009-11-19T12:55:32-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>Sorry I took so long. I hope someone's reading this.
But it's set as the main document class. Does this need to be instantiated as an object or something?

Edit:
I added it to the Button on the stage, and I got my first trace (the class is created)
But there's no API traces, and the button doesn't trace anything when it's clicked.</body>
    <body-html>&lt;p&gt;Sorry I took so long. I hope someone&amp;#8217;s reading this.&lt;br /&gt;
But it&amp;#8217;s set as the main document class. Does this need to be instantiated as an object or something?&lt;/p&gt;
&lt;p&gt;Edit:&lt;br /&gt;
I added it to the Button on the stage, and I got my first trace (the class is created)&lt;br /&gt;
But there&amp;#8217;s no &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; traces, and the button doesn&amp;#8217;t trace anything when it&amp;#8217;s clicked.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-19T12:47:26-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">1476963</id>
    <post-number type="integer">4</post-number>
    <topic-id type="integer">65472</topic-id>
    <updated-at type="datetime">2009-11-19T12:52:49-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>&lt;pre&gt;
package
{
	import flash.display.*;
	import flash.events.*;
	import flash.media.Sound;
	import flash.net.URLRequest;
	import flash.system.Security;

	public class Main extends MovieClip
	{
		public var kongregate:*
		var paramObj:Object = LoaderInfo(root.loaderInfo).parameters;
		var apiPath:String = paramObj.kongregate_api_path || 
		&quot;http://www.kongregate.com/flash/API_AS3_Local.swf&quot;;
		public var three:int=3;
		
		public function Main()
		{
			trace(&quot;Initialized&quot;);
			kongregate.stats.submit(&quot;score&quot;, three);
			Security.allowDomain(apiPath);
			scoreBtn.addEventListener(MouseEvent.MOUSE_UP,clicked);
		}
		
		private function clicked(e:MouseEvent)
		{
			kongregate.stats.submit(&quot;score&quot;, three);
			trace(&quot;Score Submitted&quot;);
		}
		
		public function loadAPI()
		{
			var paramObj:Object = LoaderInfo(root.loaderInfo).parameters;
			var api_url:String = paramObj.api_path ||  &quot;http://www.kongregate.com/flash/API_AS3_Local.swf&quot;;
			var request:URLRequest = new URLRequest ( api_url );
			var loader:Loader = new Loader();
			loader.contentLoaderInfo.addEventListener ( Event.COMPLETE, apiLoadComplete );
			loader.load ( request );
			this.addChild ( loader );
			trace(&quot;API loaded&quot;);
		}
		
		public function apiLoadComplete( event:Event ):void
		{
			kongregate = event.target.content;
			kongregate.services.connect();
			kongregate.stats.submit(&quot;score&quot;, three);
			trace(&quot;Load Complete&quot;);
		}
	}
}
&lt;/pre&gt;

Is there any reason why this shouldn't work?
When I test it locally, the Main class doesn't trace anything, even when I click the button.
When I test it on the site, I get the green light, but no score submission.</body>
    <body-html>&lt;pre&gt;
package
{
	import flash.display.*;
	import flash.events.*;
	import flash.media.Sound;
	import flash.net.URLRequest;
	import flash.system.Security;

	public class Main extends MovieClip
	{
		public var kongregate:*
		var paramObj:Object = LoaderInfo(root.loaderInfo).parameters;
		var apiPath:String = paramObj.kongregate_api_path || 
		&quot;&lt;a href=&quot;http://www.kongregate.com/flash/API_AS3_Local.swf&amp;quot;&quot;&gt;http://www.kongregate.com/flash/API_AS3_Local.swf&amp;quot;&lt;/a&gt;;
		public var three:int=3;
		
		public function Main()
		{
			trace(&quot;Initialized&quot;);
			kongregate.stats.submit(&quot;score&quot;, three);
			Security.allowDomain(apiPath);
			scoreBtn.addEventListener(MouseEvent.MOUSE_UP,clicked);
		}
		
		private function clicked(e:MouseEvent)
		{
			kongregate.stats.submit(&quot;score&quot;, three);
			trace(&quot;Score Submitted&quot;);
		}
		
		public function loadAPI()
		{
			var paramObj:Object = LoaderInfo(root.loaderInfo).parameters;
			var api_url:String = paramObj.api_path ||  &quot;&lt;a href=&quot;http://www.kongregate.com/flash/API_AS3_Local.swf&amp;quot;&quot;&gt;http://www.kongregate.com/flash/API_AS3_Local.swf&amp;quot;&lt;/a&gt;;
			var request:URLRequest = new URLRequest ( api_url );
			var loader:Loader = new Loader();
			loader.contentLoaderInfo.addEventListener ( Event.COMPLETE, apiLoadComplete );
			loader.load ( request );
			this.addChild ( loader );
			trace(&quot;API loaded&quot;);
		}
		
		public function apiLoadComplete( event:Event ):void
		{
			kongregate = event.target.content;
			kongregate.services.connect();
			kongregate.stats.submit(&quot;score&quot;, three);
			trace(&quot;Load Complete&quot;);
		}
	}
}
&lt;/pre&gt;
&lt;p&gt;Is there any reason why this shouldn&amp;#8217;t work?&lt;br /&gt;
When I test it locally, the Main class doesn&amp;#8217;t trace anything, even when I click the button.&lt;br /&gt;
When I test it on the site, I get the green light, but no score submission.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-19T06:32:29-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">1476361</id>
    <post-number type="integer">1</post-number>
    <topic-id type="integer">65472</topic-id>
    <updated-at type="datetime">2009-11-19T06:34:57-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href='/forums/4/topics/65383?page=1#posts-1474777'&gt;SuperMarioJump&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;I think you just have to connect to the &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; in the preloader, then find a way to communicate with the preloader from your game swf. Otherwise you could switch to FlashDevelop which has simple preloading.&lt;/p&gt;&lt;/blockquote&gt;

If anyone can confirm this, I'm guessing that means communicating with the preloader SWF with public, static functions?</body>
    <body-html>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/4/topics/65383?page=1#posts-1474777&quot;&gt;SuperMarioJump&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;I think you just have to connect to the &lt;span class=&quot;caps&quot;&gt;&lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;&lt;/span&gt; in the preloader, then find a way to communicate with the preloader from your game swf. Otherwise you could switch to FlashDevelop which has simple preloading.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;If anyone can confirm this, I&amp;#8217;m guessing that means communicating with the preloader &lt;span class=&quot;caps&quot;&gt;SWF&lt;/span&gt; with public, static functions?&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-18T14:49:03-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">1474788</id>
    <post-number type="integer">3</post-number>
    <topic-id type="integer">65383</topic-id>
    <updated-at type="datetime">2009-11-18T14:49:03-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>The problem can be found at http://www.kongregate.com/forums/4-programming/topics/5564-problem-with-highscore-api

But if you don't want to read it, the idea is that you can't use an external preloader on Kong, because the Kong API needs to be used in your Main swf. If you're trying to load a game, it makes sense that your main .swf would be the preloader.

Anyone can correct me if I'm wrong, but if I use an external preloader, then how can I submit the game with the Kong API implemented!

Also, if I can't use an external preloader, how am I supposed to load a game? I've tried everything. Frame 2 and 3 versions of preloaders, new scene preloaders, and anything else I can find.

I have a brand new FLA that is empty except for a bunch of .png files to take up space on the stage. I would really appreciate it if someone could tell me how to load this thing!</body>
    <body-html>&lt;p&gt;The problem can be found at &lt;a href=&quot;http://www.kongregate.com/forums/4-programming/topics/5564-problem-with-highscore-api&quot;&gt;http://www.kongregate.com/forums/4-programming/topics/5564-problem-with-highscore-api&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But if you don&amp;#8217;t want to read it, the idea is that you can&amp;#8217;t use an external preloader on Kong, because the Kong &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; needs to be used in your Main swf. If you&amp;#8217;re trying to load a game, it makes sense that your main .swf would be the preloader.&lt;/p&gt;
&lt;p&gt;Anyone can correct me if I&amp;#8217;m wrong, but if I use an external preloader, then how can I submit the game with the Kong &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; implemented!&lt;/p&gt;
&lt;p&gt;Also, if I can&amp;#8217;t use an external preloader, how am I supposed to load a game? I&amp;#8217;ve tried everything. Frame 2 and 3 versions of preloaders, new scene preloaders, and anything else I can find.&lt;/p&gt;
&lt;p&gt;I have a brand new &lt;span class=&quot;caps&quot;&gt;FLA&lt;/span&gt; that is empty except for a bunch of .png files to take up space on the stage. I would really appreciate it if someone could tell me how to load this thing!&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-18T14:35:54-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">1474742</id>
    <post-number type="integer">1</post-number>
    <topic-id type="integer">65383</topic-id>
    <updated-at type="datetime">2009-11-18T14:35:54-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>The title says it all.
When I start my game up on my pc, it loads to 100%. shows the correct loaded/total bytes, and the animation works.
When I upload it to SWFCabin, I get infinite %, and 0 bytes to load.

I tried adding:

&lt;pre&gt;
if(toLoad==0)
{
    toLoad=1;
}
&lt;/pre&gt;

To the code, but to no avail.

Full code, all children/dynamic textfields are appropriately named.

&lt;pre&gt;
stop();

stage.addEventListener(Event.ENTER_FRAME, loader);
nextBtn.tabEnabled=false;
nextBtn.addEventListener(MouseEvent.MOUSE_UP,clicking);

function clicking(e:MouseEvent)
{
	gotoAndPlay(2);
}

function loader(e:Event):void
{
	var toLoad:Number = stage.loaderInfo.bytesTotal;
	var loaded:Number = stage.loaderInfo.bytesLoaded;
	var total:Number = loaded/toLoad;
	if(toLoad==0){toLoad=1;}
	if(loaded &gt;= toLoad)
	{
		preloader.gotoAndStop(Math.floor(total*100));
		preloader.percentBytes.text=Math.floor(total*100) + &quot;%&quot;;
		preloader.currentBytes.text=&quot;&quot;+loaded;
		preloader.totalBytes.text =&quot;&quot;+toLoad;
	
		removeEventListener(Event.ENTER_FRAME, loader);
		nextBtn.x=275;
	} 
	else 
	{
	preloader.gotoAndStop(Math.floor(total*100));
	preloader.percentBytes.text=Math.floor(total*100) + &quot;%&quot;;
	preloader.currentBytes.text=&quot;&quot;+loaded;
	preloader.totalBytes.text =&quot;&quot;+toLoad;
	}
}
&lt;/pre&gt;

All objects are set to export on frame 2.
Thanks as usual!</body>
    <body-html>&lt;p&gt;The title says it all.&lt;br /&gt;
When I start my game up on my pc, it loads to 100%. shows the correct loaded/total bytes, and the animation works.&lt;br /&gt;
When I upload it to SWFCabin, I get infinite %, and 0 bytes to load.&lt;/p&gt;
&lt;p&gt;I tried adding:&lt;/p&gt;
&lt;pre&gt;
if(toLoad==0)
{
    toLoad=1;
}
&lt;/pre&gt;
&lt;p&gt;To the code, but to no avail.&lt;/p&gt;
&lt;p&gt;Full code, all children/dynamic textfields are appropriately named.&lt;/p&gt;
&lt;pre&gt;
stop();

stage.addEventListener(Event.ENTER_FRAME, loader);
nextBtn.tabEnabled=false;
nextBtn.addEventListener(MouseEvent.MOUSE_UP,clicking);

function clicking(e:MouseEvent)
{
	gotoAndPlay(2);
}

function loader(e:Event):void
{
	var toLoad:Number = stage.loaderInfo.bytesTotal;
	var loaded:Number = stage.loaderInfo.bytesLoaded;
	var total:Number = loaded/toLoad;
	if(toLoad==0){toLoad=1;}
	if(loaded &amp;gt;= toLoad)
	{
		preloader.gotoAndStop(Math.floor(total*100));
		preloader.percentBytes.text=Math.floor(total*100) + &quot;%&quot;;
		preloader.currentBytes.text=&quot;&quot;+loaded;
		preloader.totalBytes.text =&quot;&quot;+toLoad;
	
		removeEventListener(Event.ENTER_FRAME, loader);
		nextBtn.x=275;
	} 
	else 
	{
	preloader.gotoAndStop(Math.floor(total*100));
	preloader.percentBytes.text=Math.floor(total*100) + &quot;%&quot;;
	preloader.currentBytes.text=&quot;&quot;+loaded;
	preloader.totalBytes.text =&quot;&quot;+toLoad;
	}
}
&lt;/pre&gt;
&lt;p&gt;All objects are set to export on frame 2.&lt;br /&gt;
Thanks as usual!&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-18T11:52:07-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">1474167</id>
    <post-number type="integer">1</post-number>
    <topic-id type="integer">65358</topic-id>
    <updated-at type="datetime">2009-11-18T11:53:35-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href='/forums/4/topics/65233?page=1#posts-1471199'&gt;DeepClaw&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;you may add a number to flush:&lt;/p&gt;
&lt;pre&gt;
  so.flush(1024);
&lt;/pre&gt;

That way you could make public functions to read your SharedObject.
Only open the SharedObject once in your class and use the function to access it:

&lt;pre&gt;
readString(name:String):String {
  return so.data[name];
}
&lt;/pre&gt;

&lt;/blockquote&gt;

I looked at the livedocs, and that number is supposed to be the 'minimum disk space.'
How do I determine what number I need that to be? How does that speed up progress?
Can you give me a good example of that last function?
Sorry for all the questions!</body>
    <body-html>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/4/topics/65233?page=1#posts-1471199&quot;&gt;DeepClaw&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;you may add a number to flush:&lt;/p&gt;
&lt;pre&gt;
  so.flush(1024);
&lt;/pre&gt;
&lt;p&gt;That way you could make public functions to read your SharedObject.&lt;br /&gt;
Only open the SharedObject once in your class and use the function to access it:&lt;/p&gt;
&lt;pre&gt;
readString(name:String):String {
  return so.data[name];
}
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;I looked at the livedocs, and that number is supposed to be the &amp;#8216;minimum disk space.&amp;#8217;&lt;br /&gt;
How do I determine what number I need that to be? How does that speed up progress?&lt;br /&gt;
Can you give me a good example of that last function?&lt;br /&gt;
Sorry for all the questions!&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-17T13:41:13-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">1471338</id>
    <post-number type="integer">4</post-number>
    <topic-id type="integer">65233</topic-id>
    <updated-at type="datetime">2009-11-17T14:06:29-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>If anyone can't answer that, I have one more question.
If I test my project, and I have Shared Objects being saved, where will Flash save them?</body>
    <body-html>&lt;p&gt;If anyone can&amp;#8217;t answer that, I have one more question.&lt;br /&gt;
If I test my project, and I have Shared Objects being saved, where will Flash save them?&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-17T12:25:05-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">1471094</id>
    <post-number type="integer">2</post-number>
    <topic-id type="integer">65233</topic-id>
    <updated-at type="datetime">2009-11-17T12:25:05-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>I was looking at my game, and realized I haven't done anything with Shared Objects! I knew they were a necessity, so started looking around the web to see what I could find as information.

Correct this if it is wrong, if anyone wouldn't mind.

&lt;pre&gt;
//To write data
import flash.net.SharedObject;
var so:SharedObject = SharedObject.getLocal(&quot;userData&quot;);
so.data.username= &quot;user1377&quot;;
so.data.pwdhash= &quot;[hash] or pwd&quot;;
so.flush(); // writes changes to disk

//To load data
import flash.net.SharedObject;
var so:SharedObject = SharedObject.getLocal(&quot;userData&quot;);
var username:String = so.data.username;
var pwdhash:String = so.data.pwdhash;
&lt;/pre&gt;

Is this all there is to it? I understand you need to have your variables ready, and put this code in the appropriate places. But is this all there is to Shared Objects?

If anyone has a better tutorial, I would appreciate it.</body>
    <body-html>&lt;p&gt;I was looking at my game, and realized I haven&amp;#8217;t done anything with Shared Objects! I knew they were a necessity, so started looking around the web to see what I could find as information.&lt;/p&gt;
&lt;p&gt;Correct this if it is wrong, if anyone wouldn&amp;#8217;t mind.&lt;/p&gt;
&lt;pre&gt;
//To write data
import flash.net.SharedObject;
var so:SharedObject = SharedObject.getLocal(&quot;userData&quot;);
so.data.username= &quot;user1377&quot;;
so.data.pwdhash= &quot;[hash] or pwd&quot;;
so.flush(); // writes changes to disk

//To load data
import flash.net.SharedObject;
var so:SharedObject = SharedObject.getLocal(&quot;userData&quot;);
var username:String = so.data.username;
var pwdhash:String = so.data.pwdhash;
&lt;/pre&gt;
&lt;p&gt;Is this all there is to it? I understand you need to have your variables ready, and put this code in the appropriate places. But is this all there is to Shared Objects?&lt;/p&gt;
&lt;p&gt;If anyone has a better tutorial, I would appreciate it.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-17T11:33: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">1471009</id>
    <post-number type="integer">1</post-number>
    <topic-id type="integer">65233</topic-id>
    <updated-at type="datetime">2009-11-17T11:33:42-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>Try this.
In your 'Wall' class, have a public, static array. If you don't have a wall class, I suggest you make one.

&lt;pre&gt;
//Declare the variable at the very beginning! I recommend right after you declare the class.
public static var wallArray:Array= new Array();

//Somewhere in your class, you need an event listener. I recommend putting this in the main function of your class.
stage.addEventListener(Event.ADDED_TO_STAGE,created);

//Then the event. You can copy this exactly.
private function created(e:Event):void
{
	wallArray.push(this);
	this.removeEventListener(Event.ADDED_TO_STAGE, created);
}
&lt;/pre&gt;</body>
    <body-html>&lt;p&gt;Try this.&lt;br /&gt;
In your &amp;#8216;Wall&amp;#8217; class, have a public, static array. If you don&amp;#8217;t have a wall class, I suggest you make one.&lt;/p&gt;
&lt;pre&gt;
//Declare the variable at the very beginning! I recommend right after you declare the class.
public static var wallArray:Array= new Array();

//Somewhere in your class, you need an event listener. I recommend putting this in the main function of your class.
stage.addEventListener(Event.ADDED_TO_STAGE,created);

//Then the event. You can copy this exactly.
private function created(e:Event):void
{
	wallArray.push(this);
	this.removeEventListener(Event.ADDED_TO_STAGE, created);
}
&lt;/pre&gt;</body-html>
    <created-at type="datetime">2009-11-16T19:03: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">1469936</id>
    <post-number type="integer">7</post-number>
    <topic-id type="integer">65080</topic-id>
    <updated-at type="datetime">2009-11-16T19:04:20-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>Wow...I never really thought of it like that...
@Mond - I really got used to using Globals because it made things simple. I could more easily access variables, since when I first started using public variables...My code would attack me... But looking at all I've learned recently...I think I might be able to.

@Vexthil - When you put it like that, maybe I should take a look at what variables I'm using, and if they can just be turned into public variables.

And if anyone else replies, I definitely find myself far from a 'programming ace.' I have many, many, many years, and a few more languages to learn before I ever would think that...

Thank you guys for all the help!</body>
    <body-html>&lt;p&gt;Wow&amp;#8230;I never really thought of it like that&amp;#8230;&lt;br /&gt;
@Mond &amp;#8211; I really got used to using Globals because it made things simple. I could more easily access variables, since when I first started using public variables&amp;#8230;My code would attack me&amp;#8230; But looking at all I&amp;#8217;ve learned recently&amp;#8230;I think I might be able to.&lt;/p&gt;
&lt;p&gt;@Vexthil &amp;#8211; When you put it like that, maybe I should take a look at what variables I&amp;#8217;m using, and if they can just be turned into public variables.&lt;/p&gt;
&lt;p&gt;And if anyone else replies, I definitely find myself far from a &amp;#8216;programming ace.&amp;#8217; I have many, many, many years, and a few more languages to learn before I ever would think that&amp;#8230;&lt;/p&gt;
&lt;p&gt;Thank you guys for all the help!&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-16T10:49: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">1467961</id>
    <post-number type="integer">5</post-number>
    <topic-id type="integer">65063</topic-id>
    <updated-at type="datetime">2009-11-16T10:49:41-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>I just finished testing out all my features...I'm ready to start actually making my first game I plan on publishing...But then I thought about something...

I was having problems when I first started programming in AS3 with global variables. Correct me if I'm wrong, but they are almost essential for many major games.

I looked around, and found that using a Global object (created a class, with a public, static object, and add your variables to it) seemed like a good idea.

But the websites warned against these, saying:
&quot;Its a convenient way to store variables that are accessible from anywhere in your project, but with great power comes great responsibility :).&quot;
Also, with indirect quotes they say that there are 'potential dangers' and that it can be 'sloppy'

I suppose I can see that if you code wrong, and accidentally modify variables, or access variables that don't exist, there could be problems...

But am I missing something? Assume I'm some programming ace. I've made sure all variables I'm trying to access are declared, and all variables will be edited only when they need to... I use them rarely, favoring public variables, but sometimes I need a simple, global variable.

Am I looking at any risks?

As always, sorry about the long post, and thanks in advance for all your help!</body>
    <body-html>&lt;p&gt;I just finished testing out all my features&amp;#8230;I&amp;#8217;m ready to start actually making my first game I plan on publishing&amp;#8230;But then I thought about something&amp;#8230;&lt;/p&gt;
&lt;p&gt;I was having problems when I first started programming in AS3 with global variables. Correct me if I&amp;#8217;m wrong, but they are almost essential for many major games.&lt;/p&gt;
&lt;p&gt;I looked around, and found that using a Global object (created a class, with a public, static object, and add your variables to it) seemed like a good idea.&lt;/p&gt;
&lt;p&gt;But the websites warned against these, saying:&lt;br /&gt;
&amp;#8220;Its a convenient way to store variables that are accessible from anywhere in your project, but with great power comes great responsibility :).&amp;#8221;&lt;br /&gt;
Also, with indirect quotes they say that there are &amp;#8216;potential dangers&amp;#8217; and that it can be &amp;#8216;sloppy&amp;#8217;&lt;/p&gt;
&lt;p&gt;I suppose I can see that if you code wrong, and accidentally modify variables, or access variables that don&amp;#8217;t exist, there could be problems&amp;#8230;&lt;/p&gt;
&lt;p&gt;But am I missing something? Assume I&amp;#8217;m some programming ace. I&amp;#8217;ve made sure all variables I&amp;#8217;m trying to access are declared, and all variables will be edited only when they need to&amp;#8230; I use them rarely, favoring public variables, but sometimes I need a simple, global variable.&lt;/p&gt;
&lt;p&gt;Am I looking at any risks?&lt;/p&gt;
&lt;p&gt;As always, sorry about the long post, and thanks in advance for all your help!&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-15T21:02:23-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">1467057</id>
    <post-number type="integer">1</post-number>
    <topic-id type="integer">65063</topic-id>
    <updated-at type="datetime">2009-11-15T21:02:23-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href='/forums/4/topics/64668?page=1#posts-1458332'&gt;faiuwle&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;Possibly adding &amp;#8220;new&amp;#8221; in front of &amp;#8220;MovieClip (root)&amp;#8221; would fix it?  I&amp;#8217;m also not sure where this enemyholder array is coming from (unless the standard MovieClip class has an &amp;#8220;enemyholder&amp;#8221; array in it already?).  Also, you don&amp;#8217;t need to use &amp;#8220;this&amp;#8221; in front of everything, unless you&amp;#8217;ve got function parameters with conflicting names, or something.&lt;/p&gt;
&lt;p&gt;About color codes = 0xFF0000 is just a number, written in hex instead of binary.  It wouldn&amp;#8217;t make sense to pass it as a string.&lt;/p&gt;&lt;/blockquote&gt;

There are a lot of MovieClips with instance problems, and a lot of instances being created. using 'this' in front of everything is just a precaution. 

The problem I'm having is really nothing I'm going to mess with right now. I'm pretesting how to implement some feature in a test project before I get one going. I'm going to come back to this particular feature at another time, when I have a fresh look at how to implement it.

Thanks for your help, everyone.</body>
    <body-html>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/4/topics/64668?page=1#posts-1458332&quot;&gt;faiuwle&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;Possibly adding &amp;#8220;new&amp;#8221; in front of &amp;#8220;MovieClip (root)&amp;#8221; would fix it?  I&amp;#8217;m also not sure where this enemyholder array is coming from (unless the standard MovieClip class has an &amp;#8220;enemyholder&amp;#8221; array in it already?).  Also, you don&amp;#8217;t need to use &amp;#8220;this&amp;#8221; in front of everything, unless you&amp;#8217;ve got function parameters with conflicting names, or something.&lt;/p&gt;
&lt;p&gt;About color codes = 0xFF0000 is just a number, written in hex instead of binary.  It wouldn&amp;#8217;t make sense to pass it as a string.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;There are a lot of MovieClips with instance problems, and a lot of instances being created. using &amp;#8216;this&amp;#8217; in front of everything is just a precaution.&lt;/p&gt;
&lt;p&gt;The problem I&amp;#8217;m having is really nothing I&amp;#8217;m going to mess with right now. I&amp;#8217;m pretesting how to implement some feature in a test project before I get one going. I&amp;#8217;m going to come back to this particular feature at another time, when I have a fresh look at how to implement it.&lt;/p&gt;
&lt;p&gt;Thanks for your help, everyone.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-13T21:15:39-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">1458348</id>
    <post-number type="integer">12</post-number>
    <topic-id type="integer">64668</topic-id>
    <updated-at type="datetime">2009-11-13T21:15:39-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href='/forums/4/topics/64668?page=1#posts-1458303'&gt;UnknownGuardian&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;How about your color code &lt;code&gt;0xFF0000&lt;/code&gt;. Don&amp;#8217;t you have to pass in a string or is this fine?&lt;/p&gt;
&lt;p&gt;Also, I had a similar error today with the same title and it had to do with the function heading&amp;#8217;s parameters &lt;code&gt;Event&lt;/code&gt;. However, I don&amp;#8217;t believe your error is there.&lt;/p&gt;&lt;/blockquote&gt;

Actually, thanks to you mentioning this, I started re-checking the types of everything. And as it turns out, there is a sprite in here that I did not account for. Since I didn't import sprite for this particular class...Flash was freaking out with unexpected errors...

*Edit* Scratch that...Started happening again...Still working on this!!!
Back to having null object references...
Going to replace the hitTest iteration with a loop that checks the distance between enemies...</body>
    <body-html>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/4/topics/64668?page=1#posts-1458303&quot;&gt;UnknownGuardian&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;How about your color code &lt;code&gt;0xFF0000&lt;/code&gt;. Don&amp;#8217;t you have to pass in a string or is this fine?&lt;/p&gt;
&lt;p&gt;Also, I had a similar error today with the same title and it had to do with the function heading&amp;#8217;s parameters &lt;code&gt;Event&lt;/code&gt;. However, I don&amp;#8217;t believe your error is there.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Actually, thanks to you mentioning this, I started re-checking the types of everything. And as it turns out, there is a sprite in here that I did not account for. Since I didn&amp;#8217;t import sprite for this particular class&amp;#8230;Flash was freaking out with unexpected errors&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; Scratch that&amp;#8230;Started happening again&amp;#8230;Still working on this!!!&lt;br /&gt;
Back to having null object references&amp;#8230;&lt;br /&gt;
Going to replace the hitTest iteration with a loop that checks the distance between enemies&amp;#8230;&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-13T21:02:23-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">1458330</id>
    <post-number type="integer">10</post-number>
    <topic-id type="integer">64668</topic-id>
    <updated-at type="datetime">2009-11-13T21:06:31-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href='/forums/2/topics/64682?page=1#posts-1457979'&gt;TerribleToaster&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/2/topics/64682?page=1#posts-1457976&quot;&gt;AnotherRandomKid&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/2/topics/64682?page=1#posts-1457963&quot;&gt;ParalysisTerror&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;Twilight is da bomb!&lt;/p&gt;&lt;p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;You are the bird, I am the turtle.&lt;br&gt;&lt;br /&gt;
&lt;img src=&quot;http://www.threadbombing.com/data/media/2/murder_turtle.gif&quot; /&gt;&lt;br&gt; I murder you.&lt;/p&gt;&lt;/blockquote&gt;

I was browsing through the most recent posts, and accidentally found this...
I love you.</body>
    <body-html>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/2/topics/64682?page=1#posts-1457979&quot;&gt;TerribleToaster&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/2/topics/64682?page=1#posts-1457976&quot;&gt;AnotherRandomKid&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/2/topics/64682?page=1#posts-1457963&quot;&gt;ParalysisTerror&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;Twilight is da bomb!&lt;/p&gt;&lt;p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/blockquote&gt;You are the bird, I am the turtle.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;
&lt;img src=&quot;http://www.threadbombing.com/data/media/2/murder_turtle.gif&quot; /&gt;&lt;br&gt; I murder you.&lt;/p&gt;&lt;/blockquote&gt;&lt;/p&gt;
&lt;p&gt;I was browsing through the most recent posts, and accidentally found this&amp;#8230;&lt;br /&gt;
I love you.&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-13T19:36:04-08:00</created-at>
    <flaggings-count type="integer">0</flaggings-count>
    <forced-visibility-state type="boolean">true</forced-visibility-state>
    <forum-id type="integer">2</forum-id>
    <hidden-by-id type="integer" nil="true"></hidden-by-id>
    <id type="integer">1458049</id>
    <post-number type="integer">12</post-number>
    <topic-id type="integer">64682</topic-id>
    <updated-at type="datetime">2009-11-13T19:36:04-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href='/forums/4/topics/64668?page=1#posts-1457884'&gt;Moonkey&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;The original problem is &lt;code&gt;_root&lt;/code&gt; is null.&lt;/p&gt;
&lt;p&gt;At the top when you put&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;private var _root:MovieClip=MovieClip(root);&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;the splasher hasn&amp;#8217;t been added to the stage yet, so its reference to &lt;code&gt;root&lt;/code&gt; is null. root only holds a value when your instance is attached to the stage somehow.&lt;/p&gt;
&lt;p&gt;If you really want to have a &lt;code&gt;_root&lt;/code&gt; variable like that, you should listen for &lt;code&gt;Event.ADDED_TO_STAGE&lt;/code&gt; and assign it then.&lt;/p&gt;&lt;/blockquote&gt;

When I originally posted this topic, that's how I had it. I was receiving errors for having it like that. I tried changing it now, and now I'm getting this code...

&lt;pre&gt;
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Stage@203fdb51 to flash.display.MovieClip.
	at splasher/created()
	at flash.display::DisplayObjectContainer/addChild()
	at flash.display::Stage/addChild()
	at Bullet/eFrame()
&lt;/pre&gt;</body>
    <body-html>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/4/topics/64668?page=1#posts-1457884&quot;&gt;Moonkey&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;The original problem is &lt;code&gt;_root&lt;/code&gt; is null.&lt;/p&gt;
&lt;p&gt;At the top when you put&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;private var _root:MovieClip=MovieClip(root);&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;the splasher hasn&amp;#8217;t been added to the stage yet, so its reference to &lt;code&gt;root&lt;/code&gt; is null. root only holds a value when your instance is attached to the stage somehow.&lt;/p&gt;
&lt;p&gt;If you really want to have a &lt;code&gt;_root&lt;/code&gt; variable like that, you should listen for &lt;code&gt;Event.ADDED_TO_STAGE&lt;/code&gt; and assign it then.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;When I originally posted this topic, that&amp;#8217;s how I had it. I was receiving errors for having it like that. I tried changing it now, and now I&amp;#8217;m getting this code&amp;#8230;&lt;/p&gt;
&lt;pre&gt;
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Stage@203fdb51 to flash.display.MovieClip.
	at splasher/created()
	at flash.display::DisplayObjectContainer/addChild()
	at flash.display::Stage/addChild()
	at Bullet/eFrame()
&lt;/pre&gt;</body-html>
    <created-at type="datetime">2009-11-13T19:14:34-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">1457913</id>
    <post-number type="integer">8</post-number>
    <topic-id type="integer">64668</topic-id>
    <updated-at type="datetime">2009-11-13T19:14:34-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
  <post>
    <body>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href='/forums/4/topics/64668?page=1#posts-1457717'&gt;Mond&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;if enemyHolder is an array, it doesn&amp;#8217;t have a property called numChildren.&lt;/p&gt;&lt;/blockquote&gt;

Okay, that's absolutely my fault...I'm using a lot of arrays. This is a movie clip, and the enemies are added as Children.

@KMAE, adding traces now.

*EDIT*
The second I typed this post, I realized I need to take a break. Since this one's a movie clip, I need to use getChildAt, not the array reference.

Thank you guys for making me think...I'm going to go lay down, get a drink xD

*Second Edit*
Edited the new code to the following:

&lt;pre&gt;
private function update(e:Event):void
			{
				for(var i=_root.enemyHolder.numChildren-1;i&gt;=0;i--)
				{
					var cCheck=_root.enemyHolder.getChildAt(i);
					trace(cCheck);
					if(cCheck.hitTestObject(this))
					{
						cCheck.health-=dmg;
						trace(cCheck.health);
					}
				}
			}
&lt;/pre&gt;

And there are errors everywhere! No traces follow through... Nothing works! Editing, commenting out, and adding traces...Will keep everyone updated...</body>
    <body-html>&lt;blockquote&gt;&lt;cite&gt;Originally posted by &lt;b&gt;&lt;a href=&quot;/forums/4/topics/64668?page=1#posts-1457717&quot;&gt;Mond&lt;/a&gt;:&lt;/b&gt;&lt;/cite&gt;&lt;br&gt;&lt;p&gt;if enemyHolder is an array, it doesn&amp;#8217;t have a property called numChildren.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Okay, that&amp;#8217;s absolutely my fault&amp;#8230;I&amp;#8217;m using a lot of arrays. This is a movie clip, and the enemies are added as Children.&lt;/p&gt;
&lt;p&gt;@KMAE, adding traces now.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class=&quot;caps&quot;&gt;EDIT&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
The second I typed this post, I realized I need to take a break. Since this one&amp;#8217;s a movie clip, I need to use getChildAt, not the array reference.&lt;/p&gt;
&lt;p&gt;Thank you guys for making me think&amp;#8230;I&amp;#8217;m going to go lay down, get a drink xD&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Second Edit&lt;/strong&gt;&lt;br /&gt;
Edited the new code to the following:&lt;/p&gt;
&lt;pre&gt;
private function update(e:Event):void
			{
				for(var i=_root.enemyHolder.numChildren-1;i&amp;gt;=0;i--)
				{
					var cCheck=_root.enemyHolder.getChildAt(i);
					trace(cCheck);
					if(cCheck.hitTestObject(this))
					{
						cCheck.health-=dmg;
						trace(cCheck.health);
					}
				}
			}
&lt;/pre&gt;
&lt;p&gt;And there are errors everywhere! No traces follow through&amp;#8230; Nothing works! Editing, commenting out, and adding traces&amp;#8230;Will keep everyone updated&amp;#8230;&lt;/p&gt;</body-html>
    <created-at type="datetime">2009-11-13T18:47:32-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">1457745</id>
    <post-number type="integer">6</post-number>
    <topic-id type="integer">64668</topic-id>
    <updated-at type="datetime">2009-11-13T18:58:06-08:00</updated-at>
    <user-id type="integer">1325010</user-id>
  </post>
</posts>
