External asset objects

43 views
Skip to first unread message

Dan East

unread,
Jul 16, 2015, 12:43:30 AM7/16/15
to fla...@googlegroups.com
  Hello.  I'm trying to determine if Flambe can access external resources (the HTML platform to be specific - not using the Flash platform at this time).  What I'm talking about is the ability for external Javascript in the host page in which Flambe is embedded to pass image and sound objects to Flambe.  If this is possible then I presume the resources would be passed into Flambe via functions exposed to the host environment (System.external.bind).

  Is this possible?  TIA!

  Dan

Mark Knol

unread,
Jul 24, 2015, 5:58:27 PM7/24/15
to Flambe
You can create your own Manifest and add all the resources you need.
https://github.com/markknol/flambe-guide/wiki/Working-with-assets

Dan East

unread,
Jul 24, 2015, 9:42:42 PM7/24/15
to Flambe, mark...@gmail.com
Thank you, but those resources are just URLs to resources that Flambe then loads, not actual resources.  What I'm talking about is in the host web page in javascript external to Flambe I create an image, then I'd like to pass that image object into Flambe for use.  Is that possible?

  Dan

Jon Grant

unread,
Jul 28, 2015, 7:18:37 PM7/28/15
to Flambe, mark...@gmail.com, ois...@gmail.com
I think if you set a global JS var e.g var myImage = new Image().  Then Flambe could access using  untyped Browser.window.myImage;

I've done this with JSON

Bruno Garcia

unread,
Jul 28, 2015, 8:07:16 PM7/28/15
to fla...@googlegroups.com
Once you have the ImageElement on the Haxe side, you can call System.renderer.createTexture() to turn it into a Flambe texture.
--
You received this message because you are subscribed to the Google Groups "Flambe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flambe+un...@googlegroups.com.
To post to this group, send email to fla...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flambe/9e5d688b-349e-4778-8c4f-3b6c86175440%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages