Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Embed to JS #115

Open
renaun opened this issue Jun 12, 2013 · 1 comment
Open

Feature Request: Embed to JS #115

renaun opened this issue Jun 12, 2013 · 1 comment
Assignees

Comments

@renaun
Copy link
Contributor

renaun commented Jun 12, 2013

There are many ways this can be done, and full embedding might be possible in the future with base64 injection. But I believe people might want an easy option to also just load at runtime.

Feature Request:
AS3:

package
{
    public class AssetEmbeds_1x
    {
    [Embed(source="../media/textures/1x/atlas.xml", mimeType="application/octet-stream")]
    public static const AtlasXml:Class;

    [Embed(source="../media/textures/1x/atlas.png")]
    public static const AtlasTexture:Class;
    }
}

JS Snippet of relevant parts:

AssetEmbeds_1x.Embed$AtlasXml = function () {this.source = "../media/textures/1x/atlas.xml";
this.mimeType = "application/octet-stream";};
AssetEmbeds_1x.AtlasXml = AssetEmbeds_1x.Embed$AtlasXml;

AssetEmbeds_1x.Embed$AtlasTexture = function () {this.source = "../media/textures/1x/atlas.png";};
AssetEmbeds_1x.AtlasTexture = AssetEmbeds_1x.Embed$AtlasTexture;

Dependency:
Class name to use in the compiler output, hard code to flash.utils.Embed or make it a compiler option. I vote for hard code for now. Developers will have to write the flash.utils.Embed class, but an example of the class will be provided later.

@ghost ghost assigned teotigraphix Jun 12, 2013
@labriola
Copy link
Member

lets discuss tomorrow. i am just not 100% sure that this makes sense in the browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants