Flixel Forums

development => help => Topic started by: Evan Zenker on Wed, Oct 20, 2010

Title: How to create a random starfield in flixel 2?
Post by: Evan Zenker on Wed, Oct 20, 2010
The snippet spits a bunch of errors which makes me think it was written for 1.0.
Title: Re: How to create a random starfield in flixel 2?
Post by: konamicode on Wed, Oct 20, 2010
Just tested it by straight copying the text from the snippet into a class. Worked perfectly.  What sorts of errors are you getting?
Title: Re: How to create a random starfield in flixel 2?
Post by: OmegaStorm on Wed, Oct 20, 2010
It works as far as I know. What are the errors?
Title: Re: How to create a random starfield in flixel 2?
Post by: initials on Wed, Oct 20, 2010
I can confirm it works great in Flixel v2.35.

You may need to stagger the code. Declare variables in up the top and then in the constructor call the StarField constructor.
Title: Re: How to create a random starfield in flixel 2?
Post by: Evan Zenker on Thu, Oct 21, 2010
I figured it out... I was trying to put the class in the root flixel folder. It didn't work so I fixed it by putting it in the projects src folder...  :-\