Author Topic: hello world probelm  (Read 10407 times)

zxz1661

  • Member
  • **
  • Posts: 62
  • Karma: +0/-0
  • Full of Fail
    • View Profile
hello world probelm
« on: Tue, Apr 26, 2011 »
I followed the tutorial for Hello World! onn the flash game dojo (using FlashDevelop) and i filled in the code exactly the way it was supposed to be and installed flashdevelop with the flash debugger and the SDK and flixel correctly. I hit "run", but the flash window is blank!

Please help!

*please bear with me, my first post on the forums. If you need more information to fix this, reply. I have absolutely no experience with actionscript.

mightiest_hero

  • Member
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: hello world probelm
« Reply #1 on: Tue, Apr 26, 2011 »
Hi zxz1661,
Hello word using trace (compile using flash develop debug mode) will appear in flash develop output.

Arkeus

  • Contributor
  • ****
  • Posts: 321
  • Karma: +1/-0
    • View Profile
    • I, Arkeus
Re: hello world probelm
« Reply #2 on: Tue, Apr 26, 2011 »
If you could post your code of your files that would be the easiest way to get help. Just copy and paste all the file between [code ][ /code] tags (put each file into a separate code tag).

(I'm assuming you mean http://flashgamedojo.com/wiki/index.php?title=Hello_World_-_FlashDevelop_(Flixel) which has the hello world text?)

I would suggest using the
http://flashgamedojo.com/wiki/index.php?title=Installing_FlashDevelop

Tutorial for installing, as I know that works (and gets you started easier by just getting a trace hello world working, rather than FlxText). Then you can move on to trying to integrate the steps from the other tutorial.

zxz1661

  • Member
  • **
  • Posts: 62
  • Karma: +0/-0
  • Full of Fail
    • View Profile
Re: hello world probelm
« Reply #3 on: Wed, Apr 27, 2011 »
I already did the trace one, and it worked perfectly fine.

--but this is just bugging me.

Code for HelloWorld.as:
Code: [Select]
package
{
import org.flixel.*;
[SWF(width="640", height="480", backgroundColor="#000000")]
 
public class HelloWorld extends FlxGame
{
public function HelloWorld()
{
super(320,240,PlayState,2);
}
}
}

and the code for PlayState.as

Code: [Select]
package
{
import org.flixel.*;
 
public class PlayState extends FlxState
{
override public function create():void
{
add(new FlxText(0,0,100,"Hello, World!"));
}
}
}

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: hello world probelm
« Reply #4 on: Wed, Apr 27, 2011 »
huh, that should work fine O_O  have you tried doing a trace() from inside PlayState.create()?
« Last Edit: Wed, Apr 27, 2011 by Adam Atomic »

zxz1661

  • Member
  • **
  • Posts: 62
  • Karma: +0/-0
  • Full of Fail
    • View Profile
Re: hello world probelm
« Reply #5 on: Wed, Apr 27, 2011 »
i put trace () in the create () in playstate, and this is what it said

Code: [Select]
Running process: C:\Program Files (x86)\FlashDevelop\Tools\fdbuild\fdbuild.exe "C:\Users\Matthew\Desktop\game\New Project\New Project.as3proj" -ipc 633b8cfd-9abf-4223-8c59-74016ab274a3 -compiler "C:\Users\Matthew\Desktop\game\flex_sdk_3.5.0.12683" -library "C:\Program Files (x86)\FlashDevelop\Library"
Using the Flex Compiler Shell.
Building New Project
mxmlc -load-config+=obj\NewProjectConfig.xml -debug=true -incremental=true -benchmark=false -static-link-runtime-shared-libraries=true -o obj\NewProject634394473626287585
Incremental compile of 1
 Loading configuration file C:\Users\Matthew\Desktop\game\flex_sdk_3.5.0.12683\frameworks\flex-config.xml
Loading configuration file C:\Users\Matthew\Desktop\game\New Project\obj\NewProjectConfig.xml
Nothing has changed since the last compile. Skip...
obj\NewProject634394473626287585 (843 bytes)
(fcsh)Build succeeded
Done(0)
[Starting debug session with FDB]
[SWF] C:\Users\Matthew\Desktop\game\New Project\bin\NewProject.swf - 1,190 bytes after decompression.


and the flash window looks like this:


Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: hello world probelm
« Reply #6 on: Wed, Apr 27, 2011 »
how come the window is white?  by default the text is white, so the text might actually be drawn...

zadvornykh

  • Active Member
  • ***
  • Posts: 205
  • Karma: +1/-0
    • View Profile
Re: hello world probelm
« Reply #7 on: Thu, Apr 28, 2011 »
What version of flixel are you using?

You might need to call super.create(); in the create method.

zxz1661

  • Member
  • **
  • Posts: 62
  • Karma: +0/-0
  • Full of Fail
    • View Profile
Re: hello world probelm
« Reply #8 on: Thu, Apr 28, 2011 »
im pretty sure i have the most stable version, forget what it's called.
(Im pretty sure the text itself isn't rendering. I changed the text color to black and it still didn't work. I also tried super.create and still nothing.

Marth87

  • New Member
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: hello world probelm
« Reply #9 on: Thu, Apr 28, 2011 »
What version of Flex are you using? I couldn't compile your code with Flex 3, but it worked fine with Flex 4 and Flixel 2.5. The tutorial on FlashGameDojo points you to Flex 3, but you can get Flex 4 here: http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: hello world probelm
« Reply #10 on: Thu, Apr 28, 2011 »
"NewProject.swf - 1,190 bytes after decompression."

This is FAR too small for a Flixel project. The smallest I've ever seen it is around 50KB.

So basically whatever you're compiling, it's not the project you think it is :)
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

zxz1661

  • Member
  • **
  • Posts: 62
  • Karma: +0/-0
  • Full of Fail
    • View Profile
Re: hello world probelm
« Reply #11 on: Fri, Apr 29, 2011 »
New problem-i reinstalled flashdevelop (the newest version) and now when i click "run" it says i need adobe flash professional IDE. It didn't say this before...

(im sorry if this thread is a complete bore to you guys, but thanks for the help :))

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: hello world probelm
« Reply #12 on: Fri, Apr 29, 2011 »
When you create the project in FlashDevelop you must pick "AS3 Project" or "AS3 Project with Preloader". You have obviously picked "Flash IDE Project".

I'd suggest you follow this guide (to the letter):

http://www.photonstorm.com/archives/1200/flash-game-dev-tip-6-setting-up-flashdevelop-and-flixel-for-the-first-time
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

zxz1661

  • Member
  • **
  • Posts: 62
  • Karma: +0/-0
  • Full of Fail
    • View Profile
Re: hello world probelm
« Reply #13 on: Fri, Apr 29, 2011 »
Im sorry if i seem like a complete "noob"...only 13 :)

zxz1661

  • Member
  • **
  • Posts: 62
  • Karma: +0/-0
  • Full of Fail
    • View Profile
Re: hello world probelm
« Reply #14 on: Fri, Apr 29, 2011 »
ok, did all those installation steps, and still nothing but white.

Im just going to give up :(
not gonna do flash
« Last Edit: Fri, Apr 29, 2011 by zxz1661 »

zxz1661

  • Member
  • **
  • Posts: 62
  • Karma: +0/-0
  • Full of Fail
    • View Profile
Re: hello world probelm
« Reply #15 on: Sun, May 15, 2011 »
I tried to run an AS3 project of a friend of mines and this was in the output...this may be the error messing me up the whole time, but for some reason hasn't showed up until now...

Code: [Select]
Running process: C:\Program Files (x86)\FlashDevelop\Tools\fdbuild\fdbuild.exe "C:\Users\Matthew\Desktop\EZPlatformer\EZPlatformer\EZPlatformer.as3proj" -ipc e88e83db-4638-4b72-b0b1-c8a336c9d681 -compiler "C:\Program Files (x86)\FlashDevelop\Tools\flexsdk" -library "C:\Program Files (x86)\FlashDevelop\Library"
Using the Flex Compiler Shell.
Building EZPlatformer
mxmlc -load-config+=obj\EZPlatformerConfig.xml -debug=true -incremental=true -o obj\EZPlatformer634410533627390954
INITIALIZING: Failed, unable to run compiler
Unable to start java.exe: The system cannot find the file specified
Could not compile because the fcsh process could not be started.
Build halted with errors (fcsh).
Done(1)

please reply...

auriplane

  • Snails!!
  • Contributor
  • ****
  • Posts: 497
  • Karma: +1/-0
  • Snails!!
    • View Profile
Re: hello world probelm
« Reply #16 on: Sun, May 15, 2011 »
Hey, don't get discouraged!  If you want to do this, you CAN do it :-D

This last message sounds like you don't have the Java Runtime Environment (JRE) installed.  You need that in order to run the AS3 compiler that Flex comes with.

zxz1661

  • Member
  • **
  • Posts: 62
  • Karma: +0/-0
  • Full of Fail
    • View Profile
Re: hello world probelm
« Reply #17 on: Sun, May 15, 2011 »
Hey thanks, know where i can download it? ( i want to make sure i have the right version and such)

auriplane

  • Snails!!
  • Contributor
  • ****
  • Posts: 497
  • Karma: +1/-0
  • Snails!!
    • View Profile
Re: hello world probelm
« Reply #18 on: Sun, May 15, 2011 »
Java is developed by the Oracle monster, which ate Sun, so you can get the JRE at their site.

http://www.oracle.com/technetwork/java/javase/downloads/jre-6u25-download-346243.html

I'd guess you want the one named Windows x86, if you don't know which one, but I could be wrong :-)  (If you're running 64-bit Windows, get the one marked x64 instead.  And if you're not running Windows, well... use your head :-D)

zxz1661

  • Member
  • **
  • Posts: 62
  • Karma: +0/-0
  • Full of Fail
    • View Profile
Re: hello world probelm
« Reply #19 on: Sun, May 15, 2011 »
Thanks for all the help!

Does it matter if i download the online or offline one?

(of windows x86?)