Author Topic: Any tutorials on using Flash Builder for a flixel GUI?  (Read 2131 times)

bobbybaker82

  • Active Member
  • ***
  • Posts: 155
  • Karma: +0/-0
    • View Profile
Hi, I've been searching for the past hour now on a way to use Flash Builder to make a GUI for a flixel game. Does anyone know of a tutorial that shows how to communicate between FB components and flixel?

Thanks

grisevg

  • Member
  • **
  • Posts: 47
  • Karma: +0/-0
    • View Profile
    • Dubit Limited
Are you talking about Flex components? Flixel doesn't work with flex components as far as I know, it's pure ActionScript.

Maybe there's is a way to hack it in though...but that would be very hacky...

pWEN

  • Cicadomorph
  • Member
  • **
  • Posts: 85
  • Karma: +0/-0
    • View Profile
    • Portfolio
Even if you were able to get that to work, you would have to include a ton of different FB-specific classes. It would make your game very bloated, and you'd likely run into legal problems if Adobe caught wind of it.

Gama11

  • Contributor
  • ****
  • Posts: 390
  • Karma: +0/-0
    • View Profile
Even if you were able to get that to work, you would have to include a ton of different FB-specific classes. It would make your game very bloated, and you'd likely run into legal problems if Adobe caught wind of it.

I kind of doubt that legal problems part. I don't think Adobe would a) even notice it b) care at all. I mean, what's the point of a lawsuit or something like that? They're not really gonna benefit from that, quite the opposite, the more flash game devs there are, the better for them. They even released some game developer tools recently in hope of attracting more devs.

What are your main reason for wanting to use FB for GUI design btw? I assume that it it because you can create a GUI with your mouse rather than code? Well, I gotta admit, GUI design is painful sometimes.

Something that's helped me when designing GUI in code are the following two lines:

Code: [Select]
FlxG.watch(FlxG.mouse, "x", "Mouse X");
FlxG.watch(FlxG.mouse, "y", "Mouse Y");

Always lets you know what your mouse coords are when bringing up the debugging screen, so object placement is a bit easier.

Raf

  • Contributor
  • ****
  • Posts: 268
  • Karma: +0/-0
    • View Profile
Code: [Select]
FlxG.watch(FlxG.mouse, "x", "Mouse X");
FlxG.watch(FlxG.mouse, "y", "Mouse Y");

Always lets you know what your mouse coords are when bringing up the debugging screen, so object placement is a bit easier.
That right there'll save me a crapload of time from now on! It's ridiculous how much time I've spent saying: "... nope, it's gotta go a bit to the right. I suppose that might be about 20px? Let's give that a try"

What also helps, is having some reusable class. For my current project, I needed popup windows for menu's, info text, etc. and wrote a class for it which I should be able to take along to my next project. Of course, as it's been used in only one project so far, I'm bound to have to make some changes to it so it'll fit the second one. But eventually, if you got a couple such elements, after a couple of projects, they'll be general enough to make GUI creation fast and easy in code, and 100% fit to your own style of coding.

grisevg

  • Member
  • **
  • Posts: 47
  • Karma: +0/-0
    • View Profile
    • Dubit Limited
That right there'll save me a crapload of time from now on! It's ridiculous how much time I've spent saying: "... nope, it's gotta go a bit to the right. I suppose that might be about 20px? Let's give that a try"

What also helps, is having some reusable class. For my current project, I needed popup windows for menu's, info text, etc. and wrote a class for it which I should be able to take along to my next project. Of course, as it's been used in only one project so far, I'm bound to have to make some changes to it so it'll fit the second one. But eventually, if you got a couple such elements, after a couple of projects, they'll be general enough to make GUI creation fast and easy in code, and 100% fit to your own style of coding.
http://www.picpick.org/

Gama11

  • Contributor
  • ****
  • Posts: 390
  • Karma: +0/-0
    • View Profile
http://www.picpick.org/

Just downloaded that piece of software, seems really useful acutally! Thanks! :)

bobbybaker82

  • Active Member
  • ***
  • Posts: 155
  • Karma: +0/-0
    • View Profile
Re: Any tutorials on using Flash Builder for a flixel GUI?
« Reply #7 on: Fri, Dec 14, 2012 »
Hi, sorry it took so long to reply, I was out of town.  Yeah, I wanted to be able to build menu's without having to do it through code :(

Looks like there is no way around it.

Thanks,

Bobby