OpenFL random Font Names issue

Posted by Dana on June 5, 2015 in HAXE, openfl |

Fonts are one of my list favourite things in any platform… They always come with issues…

In OpenFL one of the main issues I have found is to know what to use as the font name since it doesn’t match the name of the file and you can’t always guess what it is… Always feels like a random issue to me.

So here is a tip to find out what the name should be:

var your_font:Font = Assets.getFont(“assets/fonts/font_file_name.ttf”);

Run the code and the trace should give you the information you are looking for.


Tags: ,


GameCenter library example

Posted by Dana on March 26, 2015 in HAXE, openfl |

I couldn’t find any documentation on this so after I figured out how it works I decided to share this example. It’s really simple actually!


There’s a lot of bureaucracy when it comes to integrate game center on your game… here are a few steps…


1 – Create the leaderboards / achivements and respective IDs on itunes connect.

2 -Turn sandbox on on the iphone/ipad
go to Settings / game center/ sandbox.

3 – Create a gamecenter sandbox testing account and logging to game center.

4 – Upload the app to itunes connect and make sure to turn game center ON on and all the options needed. This will create your game center functionality on a test environment. I am not sure how much of this step is needed I only uploaded the app to itunes connect the first time and after that deploying directly to the ipad works.


The code:



Creating Haxe NME extensions

Posted by Dana on June 24, 2013 in NME |

Here are some links with all the useful information I could find.




Extension to use as example:



Haxe NME call function with delay

Posted by Dana on April 1, 2013 in NME |

Haxe Timer has the delay method.
haxe.Timer.delay(func , time_ms);

The function can’t accept parameters or return anything.

If you need one of those things to happen I would suggest using it like this:

haxe.Timer.delay(function () { func(arg1, arg2); }, delay);


EDIT theres a new way of doing this.

You can use Actuate like this


Actuate.timer(i).onComplete(delayedFunction, [functionParameterValue]);


Haxe NME Array indexOf

Posted by Dana on April 1, 2013 in HAXE, NME |

Arrays on Haxe/NME are not very straignt forward to me.

So if your are looking for indexOf the Lambda Class is where you will find it.

On the Haxe documentation for Array it show only this vars and methods:

  • var¬†length(default,null) :¬†Int
  • function¬†new() :¬†Void
  • function¬†concat( a :¬†Array<T> ) :¬†Array<T>
  • function¬†copy() :¬†Array<T>
  • function¬†filter( f : T ->¬†Bool¬†) :¬†Array<T>
  • function¬†insert( pos :¬†Int, x : T ) :¬†Void
  • function¬†iterator() :¬†Iterator<T>
  • function¬†join( sep :¬†String¬†) :¬†String
  • function¬†map<S>( f : T -> S ) :¬†Array<S>
  • function¬†pop() :¬†Null<T>
  • function¬†push( x : T ) :¬†Int
  • function¬†remove( x : T ) :¬†Bool
  • function¬†reverse() :¬†Void
  • function¬†shift() :¬†Null<T>
  • function¬†slice( pos :¬†Int, ?end :¬†Int¬†) :¬†Array<T>
  • function¬†sort( f : T -> T ->¬†Int¬†) :¬†Void
  • function¬†splice( pos :¬†Int, len :¬†Int¬†) :¬†Array<T>
  • function¬†toString() :¬†String
  • function¬†unshift( x : T ) :¬†Void

Lambda example:


Alternative to mask when scrolling

Posted by Dana on December 5, 2012 in HAXE, NME |

Use scrollRect. Check the example:




Copyright © 2012-2018 Code in GoGoLand All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.