Trying to make a simple banner.
-
Hi!
I'm back to programming games and trying to make a simple banner, but I'm having some issues:
- OpenFl/Flash/Haxeflixel natural incompatibilities.
- The banner works well, but I must control it (show/hide) from the FlxStates.
- The banner is directly loaded. It should be progressive.
Plus, I want to know some links and tutorials about monetization using banners, admob, etc. (using haxeflixel)
P.s.: I'm reinventing the wheel, but I'm very curious about how this can be done in a better way. Here is my mess:
https://gist.github.com/droidalex/b517b681e688c3734fe79c75e9a00f24
Thank you very much!
-
What do you mean by "natural incompatibilities"? HaxeFlixel comes from Flash world and works excellent on this target
-
@starry-abyss I mean that you can't directly load a "Sprite" into a "FlxSprite", for example. It's normal. That's what I said.
-
-
Thank you Sruloart! I will take a look.
I get my code to work directly in haxeflixel with no layer above, no code in Main.hx. It's working well. But....
-Issue:
It only works in neko or os targets. The reason: I need to store the downloaded image somewhere to be read as an Asset.
https://gist.github.com/droidalex/43d36a2f17dda57530d143db32d5c8d1
I think that FlxSprite should have a method for loading images of the internet, like:
FlxSprite.loadFromURL(url:String):Void
What do you think about?