Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

EventEmitter & TextStyle in pixi v4 (reported in html5gamedevs.com) #93

Closed
adireddy opened this issue Sep 8, 2016 · 2 comments
Closed

Comments

@adireddy
Copy link
Contributor

adireddy commented Sep 8, 2016

In Pixi v3 it was impossible to extends EventEmitter because the resource was loaded at runtime

Unless I'm wrong, EventEmitter code is now include in the pixi.js v4 file.

I have tried to extends EventEmitter in v4 but have this error: Uncaught ReferenceError: EventEmitter is not defined

The haxe extern has no reference to a JS Object so I added :

@:native("EventEmitter")
extern class EventEmitter {

in the externs but it doesnt work either. Have you an idea about the issue ?

Last question about TextStyle:

// generate an error (in FlashDevelop)
var lTxt2:Text = new Text("pixiv4", { fontSize: 100, fontFamily: "MyOtherFont", fill: 0x000000, align: "left" } ); 

// works fine
var lStyle:TextStyleObject = { fontSize: 100, fontFamily: "MyOtherFont", fill: 0x000000, align: "left" };
var lTxt2:Text = new Text("pixiv4", lStyle );

Any other idea ?

Thank you for your help.

@adireddy

This comment was marked as spam.

@adireddy adireddy reopened this Sep 8, 2016
@adireddy

This comment was marked as spam.

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

No branches or pull requests

1 participant