Comments on: MGAS3FD 5: Enter the frame https://prototyprally.com/mgas3fd-5-enter-the-frame/ rapid prototyping of games using flash Tue, 14 Feb 2017 09:15:06 +0000 hourly 1 https://wordpress.org/?v=5.1.1 By: MGAS3FD 4: More embedding | prototyprally https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-14390 Wed, 05 Sep 2012 14:57:25 +0000 https://prototyprally.com/?p=268#comment-14390 […] prototyprally rapid prototyping of games using flash ← a winner is me. MGAS3FD 5: Enter the frame → […]

]]>
By: Jack https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-9442 Sat, 12 Nov 2011 16:43:21 +0000 https://prototyprally.com/?p=268#comment-9442 I FINALY got it to work. Turns out I accidentally put a semi-colon after void.

]]>
By: Jack https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-9436 Sat, 12 Nov 2011 11:29:18 +0000 https://prototyprally.com/?p=268#comment-9436 When I do everything up to the private function handleEnterFrame(e:Event):void; { trace(“enter the frame!”); } bit but when I test it it gives my the following error:

‘Function does not have a body.
private function handleEnterFrame(e:Event):void; {‘

]]>
By: Ian https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1150 Tue, 08 Jun 2010 02:37:17 +0000 https://prototyprally.com/?p=268#comment-1150 Thanks for the help David, I was stuck on that, too 🙂

Thanks for all these tutorials!

]]>
By: David https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1149 Sat, 08 May 2010 03:31:04 +0000 https://prototyprally.com/?p=268#comment-1149 Okay, I FINALLY got that friggin’ gnome to move! Turns out I had to put enemy.x+=1 into the handleEnterFrame function, and not in Main().
To the guy who made the tutorial: a revision making that fact clearer would be much appreciated.

]]>
By: David https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1148 Wed, 28 Apr 2010 02:44:33 +0000 https://prototyprally.com/?p=268#comment-1148 I’m good up until I enter “enemy.x += 1;” which completely fails to move the gnome. I _am_ changing the one in Main.as, right?

]]>
By: MGAS3FD 4: More embedding | prototyprally https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1147 Wed, 07 Apr 2010 06:55:11 +0000 https://prototyprally.com/?p=268#comment-1147 […] Flashpiper « a winner is me. MGAS3FD 5: Enter the frame » […]

]]>
By: Anonymous https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1146 Sun, 14 Mar 2010 22:21:38 +0000 https://prototyprally.com/?p=268#comment-1146 Thank you for these tutorials!

]]>
By: Anonymous https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1145 Sat, 13 Mar 2010 17:09:21 +0000 https://prototyprally.com/?p=268#comment-1145 It’s Ctrl+Shift+1 to generate the code from the function name you’re mouse-pointing.

Btw, good tut.

]]>
By: Jens https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1144 Wed, 24 Feb 2010 23:05:55 +0000 https://prototyprally.com/?p=268#comment-1144 This is my code, if it would help:

package com.grapefrukt.tutorial.supergame {

import com.grapefrukt.tutorial.supergame.enemies.Enemy;
import flash.display.Sprite;
import flash.events.Event

public class Main extends Sprite {

public var enemy:Enemy;

private function handleEnterFrame(e:Event):void {
enemy.x += 1;
enemy.y = mouseY
}

public function Main():void {
enemy = new Enemy();
addChild(enemy)
this.x = Math.random() * 500
this.y = 300;
enemy.rotation = 90
addEventListener(Event.ENTER_FRAME, handleEnterFrame);
}

}

}

]]>
By: Ohno https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1143 Sun, 21 Feb 2010 02:59:55 +0000 https://prototyprally.com/?p=268#comment-1143 Yeah, ditto, I can’t get mine to move either. Really wish you had uploaded the project for this one, I’m totally lost.

]]>
By: w33n https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1142 Sat, 20 Feb 2010 13:14:59 +0000 https://prototyprally.com/?p=268#comment-1142 Gah, another thing, I can’t get my gnome to move.
Doesn’t do anything.

]]>
By: w33n https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1141 Sat, 20 Feb 2010 13:10:35 +0000 https://prototyprally.com/?p=268#comment-1141 Nevermind, I realized I had to place “private function handleEnterFrame(e:Event):void {
trace(“enter the frame!”);
}” above the constructor.

]]>
By: w33n https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1140 Sat, 20 Feb 2010 13:09:03 +0000 https://prototyprally.com/?p=268#comment-1140 I don’t know what I’m doing wrong, but no matter how many times I start over, it keeps giving me the “The private attribute may be used only on class property definitions.” error.

What am I doing wrong?
I already imported flash.events.Event, and I followed the tutorial 100%.

]]>
By: vik https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1139 Mon, 25 Jan 2010 18:56:49 +0000 https://prototyprally.com/?p=268#comment-1139 okay got it
I had to add “import flash.events.Event”

]]>
By: vik https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1138 Mon, 25 Jan 2010 17:30:05 +0000 https://prototyprally.com/?p=268#comment-1138 I actually did everything but it gives me this error:
The private attribute may be used only on class property definitions.
private function handleEnterFrame(e:Event):void {

]]>
By: Johnthegaylizard https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1137 Tue, 05 Jan 2010 20:24:26 +0000 https://prototyprally.com/?p=268#comment-1137 @ Siyano

the “addEventListener” goes into the constructor of Main.as, or “public function Main():void {” below the enemy x and y positions

The “private function handleEnter….” goes outside the constructor, within the class.

I was trying to figure out how to use Mouse.hide() so we don’t see that accursed pointer, but I only know how to do that in actual flash 🙁

]]>
By: Siyano https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1136 Tue, 05 Jan 2010 19:44:39 +0000 https://prototyprally.com/?p=268#comment-1136 “I don’t where you put that line”
I meant to say “I dont see where”

]]>
By: Siyano https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1135 Tue, 05 Jan 2010 19:43:39 +0000 https://prototyprally.com/?p=268#comment-1135 I don’t understand really this part, where do you type the addEventListener? Even the prepared project from part 6 I don’t where you put that line

]]>
By: Stefano https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1134 Thu, 12 Nov 2009 16:23:47 +0000 https://prototyprally.com/?p=268#comment-1134 I’m finally overcoming my phobia and understanding OOP.
It’s actually pretty fun and easier than just stuffing everything in frames.
Yay!

As for the “added challenge” bit:
Is there a better (and not too complicated) way to change graphics registration points in AS3?
I moved the “gfx” child bitmap inside its “Enemy” container so the gnome nose was properly aligned.

]]>
By: Drazzke https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1133 Mon, 06 Jul 2009 19:16:26 +0000 https://prototyprally.com/?p=268#comment-1133 Really great tutorial, it’s a really nice introduction to actionscript!

]]>
By: Hallonduell https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1132 Thu, 23 Apr 2009 20:28:49 +0000 https://prototyprally.com/?p=268#comment-1132 After using FD you realize how crappy the flash IDE is when it comes to coding.

]]>
By: Bernard https://prototyprally.com/mgas3fd-5-enter-the-frame/#comment-1131 Tue, 21 Apr 2009 02:27:38 +0000 https://prototyprally.com/?p=268#comment-1131 Hey, thanks for the tutorials, helped me a lot!

]]>