Author Topic: Flixel 2.55 using flash sprites  (Read 1405 times)

fookid

  • New Member
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Flixel 2.55 using flash sprites
« on: Fri, Jul 8, 2011 »
Hi. I'm new to flixel and programming in general. I'm trying to make health bars that are not down scaled when zooming out. How can I add flash sprites to the playstate?

screenberg

  • Guest
Re: Flixel 2.55 using flash sprites
« Reply #1 on: Wed, Jul 13, 2011 »
You could use FlxG.stage. e.g. FlxG.stage.addChild(new MovieClip);

zadvornykh

  • Active Member
  • ***
  • Posts: 205
  • Karma: +1/-0
    • View Profile
Re: Flixel 2.55 using flash sprites
« Reply #2 on: Thu, Jul 14, 2011 »
Do note that the position of those sprites will always be in screen space, not in game space. You might also need to account for zoom in regard to position.

fookid

  • New Member
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Flixel 2.55 using flash sprites
« Reply #3 on: Tue, Jul 19, 2011 »
Thanks

Nazne

  • New Member
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Flixel 2.55 using flash sprites
« Reply #4 on: Fri, Jul 22, 2011 »
Do note that the position of those sprites will always be in screen space, not in game space. You might also need to account for zoom in regard to position.

Sorry, but could you please clarify on that point? How would screen space differ from game space, and is there a simple way to translate between one and the other?

I'm also seriously considering using normal Flash sprites in my Flixel game, due to issues with rendering recolorable images and rotation. I'd like to know if it's feasible to move normal Flash sprites exactly as one would a Flixel sprite - say, by having a Flixel sprite serve as an invisible collision box and updating the normal sprites' x/y coords with it. But I've had past games with objects having issues with the camera, so I thought I'd ask.

lazyCrab

  • Member
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Re: Flixel 2.55 using flash sprites
« Reply #5 on: Sat, Jul 23, 2011 »
What I understand from what he said screen space is the actual x and y in regards to the window and the game space is x and y in regards to Flixel's "screen" sprite.
"WEEKS of programming can save HOURS of design"
"Programming today is a race betwin programmers trying to make bigger and vetter idiot proof programs and between the universe trying to make bigger and better idiots. Currently, the universe is winning"