Assets class assignment error in NME html5 target

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Assets class assignment error in NME html5 target

Alex Liebert
Testing out the html5 target now :)

I get this error:

bin/html5/haxe/ApplicationMain.hx:7: characters 0-18 : Class not found : nme.Assets
Called from ? line 1
Called from InstallTool.hx line 395
Called from InstallTool.hx line 75
Called from installers/InstallerBase.hx line 112
Called from installers/HTML5Installer.hx line 27
Called from installers/InstallerBase.hx line 988
Called from InstallTool.hx line 210
Uncaught exception - Error running: haxe bin/html5/haxe/debug.hxml

it looks as though the typdef should be setting nme.installer.Assets to pointed to from nme.Assets, but isn't happening.  Any suggestions?

Thanks,

Alex


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Assets class assignment error in NME html5 target

Alex Liebert
just realized maybe i dont have latest jeash... stupid...whoops.

On Fri, Sep 23, 2011 at 1:30 PM, Alex Liebert <[hidden email]> wrote:
Testing out the html5 target now :)

I get this error:

bin/html5/haxe/ApplicationMain.hx:7: characters 0-18 : Class not found : nme.Assets
Called from ? line 1
Called from InstallTool.hx line 395
Called from InstallTool.hx line 75
Called from installers/InstallerBase.hx line 112
Called from installers/HTML5Installer.hx line 27
Called from installers/InstallerBase.hx line 988
Called from InstallTool.hx line 210
Uncaught exception - Error running: haxe bin/html5/haxe/debug.hxml

it looks as though the typdef should be setting nme.installer.Assets to pointed to from nme.Assets, but isn't happening.  Any suggestions?

Thanks,

Alex



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Assets class assignment error in NME html5 target

Alex Liebert
hm...is there an svn version of jeash i should use instead? I have latest haxelib.

My naieve guess is that remap jeash::nme is breaking it since theres no jeash.assets, but i'm not sure thats right.


On Fri, Sep 23, 2011 at 1:32 PM, Alex Liebert <[hidden email]> wrote:
just realized maybe i dont have latest jeash... stupid...whoops.


On Fri, Sep 23, 2011 at 1:30 PM, Alex Liebert <[hidden email]> wrote:
Testing out the html5 target now :)

I get this error:

bin/html5/haxe/ApplicationMain.hx:7: characters 0-18 : Class not found : nme.Assets
Called from ? line 1
Called from InstallTool.hx line 395
Called from InstallTool.hx line 75
Called from installers/InstallerBase.hx line 112
Called from installers/HTML5Installer.hx line 27
Called from installers/InstallerBase.hx line 988
Called from InstallTool.hx line 210
Uncaught exception - Error running: haxe bin/html5/haxe/debug.hxml

it looks as though the typdef should be setting nme.installer.Assets to pointed to from nme.Assets, but isn't happening.  Any suggestions?

Thanks,

Alex




--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Assets class assignment error in NME html5 target

singmajesty
Hi Alex,

Thanks, again for bringing this to my attention :)

The release builds worked, but the debug build blew up. It should not have  
had the "--remap nme:jeash" flag when compiling.

I also just added tracing, similar to Flash. If you have -debug enabled,  
it will show trace messages over the top of your project. If you are  
making a release build, that div will be hidden



On Fri, 23 Sep 2011 13:43:53 -0700, Alex Liebert  
<[hidden email]> wrote:

> hm...is there an svn version of jeash i should use instead? I have latest
> haxelib.
>
> My naieve guess is that remap jeash::nme is breaking it since theres no
> jeash.assets, but i'm not sure thats right.
>
>
> On Fri, Sep 23, 2011 at 1:32 PM, Alex Liebert  
> <[hidden email]>wrote:
>
>> just realized maybe i dont have latest jeash... stupid...whoops.
>>
>>
>> On Fri, Sep 23, 2011 at 1:30 PM, Alex Liebert  
>> <[hidden email]>wrote:
>>
>>> Testing out the html5 target now :)
>>>
>>> I get this error:
>>>
>>> bin/html5/haxe/ApplicationMain.hx:7: characters 0-18 : Class not found  
>>> :
>>> nme.Assets
>>> Called from ? line 1
>>> Called from InstallTool.hx line 395
>>> Called from InstallTool.hx line 75
>>> Called from installers/InstallerBase.hx line 112
>>> Called from installers/HTML5Installer.hx line 27
>>> Called from installers/InstallerBase.hx line 988
>>> Called from InstallTool.hx line 210
>>> Uncaught exception - Error running: haxe bin/html5/haxe/debug.hxml
>>>
>>> it looks as though the typdef should be setting nme.installer.Assets to
>>> pointed to from nme.Assets, but isn't happening.  Any suggestions?
>>>
>>> Thanks,
>>>
>>> Alex
>>>
>>>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Assets class assignment error in NME html5 target

Alex Liebert
great!  Trying now.  I hacked around the Assets problem and got it running but unfortunately got lots of errors .stepping through now.

On Fri, Sep 23, 2011 at 1:59 PM, Joshua Granick <[hidden email]> wrote:
Hi Alex,

Thanks, again for bringing this to my attention :)

The release builds worked, but the debug build blew up. It should not have had the "--remap nme:jeash" flag when compiling.

I also just added tracing, similar to Flash. If you have -debug enabled, it will show trace messages over the top of your project. If you are making a release build, that div will be hidden




On Fri, 23 Sep 2011 13:43:53 -0700, Alex Liebert <[hidden email]> wrote:

hm...is there an svn version of jeash i should use instead? I have latest
haxelib.

My naieve guess is that remap jeash::nme is breaking it since theres no
jeash.assets, but i'm not sure thats right.


On Fri, Sep 23, 2011 at 1:32 PM, Alex Liebert <[hidden email]>wrote:

just realized maybe i dont have latest jeash... stupid...whoops.


On Fri, Sep 23, 2011 at 1:30 PM, Alex Liebert <[hidden email]>wrote:

Testing out the html5 target now :)

I get this error:

bin/html5/haxe/ApplicationMain.hx:7: characters 0-18 : Class not found :
nme.Assets
Called from ? line 1
Called from InstallTool.hx line 395
Called from InstallTool.hx line 75
Called from installers/InstallerBase.hx line 112
Called from installers/HTML5Installer.hx line 27
Called from installers/InstallerBase.hx line 988
Called from InstallTool.hx line 210
Uncaught exception - Error running: haxe bin/html5/haxe/debug.hxml

it looks as though the typdef should be setting nme.installer.Assets to
pointed to from nme.Assets, but isn't happening.  Any suggestions?

Thanks,

Alex



--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Assets class assignment error in NME html5 target

Alex Liebert
its running!  Awesome.  Some graphics aren't displaying, I can debug that separately.  TTF font is not working (don't care much about that either. :)

Seems fast and responsive in chrome.

Big problem though - no click events seem to be working at all.  how best to debug this?

Thanks,

Alex


On Fri, Sep 23, 2011 at 2:01 PM, Alex Liebert <[hidden email]> wrote:
great!  Trying now.  I hacked around the Assets problem and got it running but unfortunately got lots of errors .stepping through now.


On Fri, Sep 23, 2011 at 1:59 PM, Joshua Granick <[hidden email]> wrote:
Hi Alex,

Thanks, again for bringing this to my attention :)

The release builds worked, but the debug build blew up. It should not have had the "--remap nme:jeash" flag when compiling.

I also just added tracing, similar to Flash. If you have -debug enabled, it will show trace messages over the top of your project. If you are making a release build, that div will be hidden




On Fri, 23 Sep 2011 13:43:53 -0700, Alex Liebert <[hidden email]> wrote:

hm...is there an svn version of jeash i should use instead? I have latest
haxelib.

My naieve guess is that remap jeash::nme is breaking it since theres no
jeash.assets, but i'm not sure thats right.


On Fri, Sep 23, 2011 at 1:32 PM, Alex Liebert <[hidden email]>wrote:

just realized maybe i dont have latest jeash... stupid...whoops.


On Fri, Sep 23, 2011 at 1:30 PM, Alex Liebert <[hidden email]>wrote:

Testing out the html5 target now :)

I get this error:

bin/html5/haxe/ApplicationMain.hx:7: characters 0-18 : Class not found :
nme.Assets
Called from ? line 1
Called from InstallTool.hx line 395
Called from InstallTool.hx line 75
Called from installers/InstallerBase.hx line 112
Called from installers/HTML5Installer.hx line 27
Called from installers/InstallerBase.hx line 988
Called from InstallTool.hx line 210
Uncaught exception - Error running: haxe bin/html5/haxe/debug.hxml

it looks as though the typdef should be setting nme.installer.Assets to
pointed to from nme.Assets, but isn't happening.  Any suggestions?

Thanks,

Alex



--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Assets class assignment error in NME html5 target

Alex Liebert
if it helps, every clickable thing in my app is a bitmap pretty much, i vaguely remember reading a post you said there's an issue with click events on js bitmaps?  Can't find it though.  Any advice?

On Fri, Sep 23, 2011 at 2:03 PM, Alex Liebert <[hidden email]> wrote:
its running!  Awesome.  Some graphics aren't displaying, I can debug that separately.  TTF font is not working (don't care much about that either. :)

Seems fast and responsive in chrome.

Big problem though - no click events seem to be working at all.  how best to debug this?

Thanks,

Alex


On Fri, Sep 23, 2011 at 2:01 PM, Alex Liebert <[hidden email]> wrote:
great!  Trying now.  I hacked around the Assets problem and got it running but unfortunately got lots of errors .stepping through now.


On Fri, Sep 23, 2011 at 1:59 PM, Joshua Granick <[hidden email]> wrote:
Hi Alex,

Thanks, again for bringing this to my attention :)

The release builds worked, but the debug build blew up. It should not have had the "--remap nme:jeash" flag when compiling.

I also just added tracing, similar to Flash. If you have -debug enabled, it will show trace messages over the top of your project. If you are making a release build, that div will be hidden




On Fri, 23 Sep 2011 13:43:53 -0700, Alex Liebert <[hidden email]> wrote:

hm...is there an svn version of jeash i should use instead? I have latest
haxelib.

My naieve guess is that remap jeash::nme is breaking it since theres no
jeash.assets, but i'm not sure thats right.


On Fri, Sep 23, 2011 at 1:32 PM, Alex Liebert <[hidden email]>wrote:

just realized maybe i dont have latest jeash... stupid...whoops.


On Fri, Sep 23, 2011 at 1:30 PM, Alex Liebert <[hidden email]>wrote:

Testing out the html5 target now :)

I get this error:

bin/html5/haxe/ApplicationMain.hx:7: characters 0-18 : Class not found :
nme.Assets
Called from ? line 1
Called from InstallTool.hx line 395
Called from InstallTool.hx line 75
Called from installers/InstallerBase.hx line 112
Called from installers/HTML5Installer.hx line 27
Called from installers/InstallerBase.hx line 988
Called from InstallTool.hx line 210
Uncaught exception - Error running: haxe bin/html5/haxe/debug.hxml

it looks as though the typdef should be setting nme.installer.Assets to
pointed to from nme.Assets, but isn't happening.  Any suggestions?

Thanks,

Alex



--
haXe - an open source web programming language
http://haxe.org




--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Assets class assignment error in NME html5 target

singmajesty
If you want to use a TTF font, make sure you use this format:


var font = Assets.getFont ("path/to/font/or/id.ttf");
var format = new TextFormat (font.fontName);
var textField = new TextField ();
textField.defaultTextFormat = format;
textField.embedFonts = true;
textField.text = "Hello World";
addChild (textField);



On Fri, 23 Sep 2011 14:06:21 -0700, Alex Liebert  
<[hidden email]> wrote:

> if it helps, every clickable thing in my app is a bitmap pretty much, i
> vaguely remember reading a post you said there's an issue with click  
> events
> on js bitmaps?  Can't find it though.  Any advice?
>
> On Fri, Sep 23, 2011 at 2:03 PM, Alex Liebert  
> <[hidden email]>wrote:
>
>> its running!  Awesome.  Some graphics aren't displaying, I can debug  
>> that
>> separately.  TTF font is not working (don't care much about that  
>> either. :)
>>
>> Seems fast and responsive in chrome.
>>
>> Big problem though - no click events seem to be working at all.  how  
>> best
>> to debug this?
>>
>> Thanks,
>>
>> Alex
>>
>>
>> On Fri, Sep 23, 2011 at 2:01 PM, Alex Liebert  
>> <[hidden email]>wrote:
>>
>>> great!  Trying now.  I hacked around the Assets problem and got it  
>>> running
>>> but unfortunately got lots of errors .stepping through now.
>>>
>>>
>>> On Fri, Sep 23, 2011 at 1:59 PM, Joshua Granick <
>>> [hidden email]> wrote:
>>>
>>>> Hi Alex,
>>>>
>>>> Thanks, again for bringing this to my attention :)
>>>>
>>>> The release builds worked, but the debug build blew up. It should not
>>>> have had the "--remap nme:jeash" flag when compiling.
>>>>
>>>> I also just added tracing, similar to Flash. If you have -debug  
>>>> enabled,
>>>> it will show trace messages over the top of your project. If you are  
>>>> making
>>>> a release build, that div will be hidden
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, 23 Sep 2011 13:43:53 -0700, Alex Liebert <
>>>> [hidden email]> wrote:
>>>>
>>>>  hm...is there an svn version of jeash i should use instead? I have
>>>>> latest
>>>>> haxelib.
>>>>>
>>>>> My naieve guess is that remap jeash::nme is breaking it since theres  
>>>>> no
>>>>> jeash.assets, but i'm not sure thats right.
>>>>>
>>>>>
>>>>> On Fri, Sep 23, 2011 at 1:32 PM, Alex Liebert <
>>>>> [hidden email]>**wrote:
>>>>>
>>>>>  just realized maybe i dont have latest jeash... stupid...whoops.
>>>>>>
>>>>>>
>>>>>> On Fri, Sep 23, 2011 at 1:30 PM, Alex Liebert <
>>>>>> [hidden email]>**wrote:
>>>>>>
>>>>>>  Testing out the html5 target now :)
>>>>>>>
>>>>>>> I get this error:
>>>>>>>
>>>>>>> bin/html5/haxe/**ApplicationMain.hx:7: characters 0-18 : Class not
>>>>>>> found :
>>>>>>> nme.Assets
>>>>>>> Called from ? line 1
>>>>>>> Called from InstallTool.hx line 395
>>>>>>> Called from InstallTool.hx line 75
>>>>>>> Called from installers/InstallerBase.hx line 112
>>>>>>> Called from installers/HTML5Installer.hx line 27
>>>>>>> Called from installers/InstallerBase.hx line 988
>>>>>>> Called from InstallTool.hx line 210
>>>>>>> Uncaught exception - Error running: haxe bin/html5/haxe/debug.hxml
>>>>>>>
>>>>>>> it looks as though the typdef should be setting  
>>>>>>> nme.installer.Assets
>>>>>>> to
>>>>>>> pointed to from nme.Assets, but isn't happening.  Any suggestions?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Alex
>>>>>>>
>>>>>>>
>>>>>>>
>>>> --
>>>> haXe - an open source web programming language
>>>> http://haxe.org
>>>>
>>>
>>>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Assets class assignment error in NME html5 target

singmajesty
In reply to this post by Alex Liebert
Jeash does not emit mouse events for Bitmaps, it seems. This is something  
I wanted to try and look into.

However, it will emit events for drawn objects, like fills:



var button = new Sprite ();

var graphic = new Bitmap (Assets.getBitmapData ("Button.jpg"));

#if js
var hitArea = new Sprite ();
hitArea.graphics.beginFill (0xFFFFFF);
hitArea.graphics.drawRect (0, 0, graphic.width, graphic.height);
hitArea.alpha = 0;
#end

button.addChild (graphic);
button.addChild (hitArea);





On Fri, 23 Sep 2011 14:06:21 -0700, Alex Liebert  
<[hidden email]> wrote:

> if it helps, every clickable thing in my app is a bitmap pretty much, i
> vaguely remember reading a post you said there's an issue with click  
> events
> on js bitmaps?  Can't find it though.  Any advice?
>
> On Fri, Sep 23, 2011 at 2:03 PM, Alex Liebert  
> <[hidden email]>wrote:
>
>> its running!  Awesome.  Some graphics aren't displaying, I can debug  
>> that
>> separately.  TTF font is not working (don't care much about that  
>> either. :)
>>
>> Seems fast and responsive in chrome.
>>
>> Big problem though - no click events seem to be working at all.  how  
>> best
>> to debug this?
>>
>> Thanks,
>>
>> Alex
>>
>>
>> On Fri, Sep 23, 2011 at 2:01 PM, Alex Liebert  
>> <[hidden email]>wrote:
>>
>>> great!  Trying now.  I hacked around the Assets problem and got it  
>>> running
>>> but unfortunately got lots of errors .stepping through now.
>>>
>>>
>>> On Fri, Sep 23, 2011 at 1:59 PM, Joshua Granick <
>>> [hidden email]> wrote:
>>>
>>>> Hi Alex,
>>>>
>>>> Thanks, again for bringing this to my attention :)
>>>>
>>>> The release builds worked, but the debug build blew up. It should not
>>>> have had the "--remap nme:jeash" flag when compiling.
>>>>
>>>> I also just added tracing, similar to Flash. If you have -debug  
>>>> enabled,
>>>> it will show trace messages over the top of your project. If you are  
>>>> making
>>>> a release build, that div will be hidden
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, 23 Sep 2011 13:43:53 -0700, Alex Liebert <
>>>> [hidden email]> wrote:
>>>>
>>>>  hm...is there an svn version of jeash i should use instead? I have
>>>>> latest
>>>>> haxelib.
>>>>>
>>>>> My naieve guess is that remap jeash::nme is breaking it since theres  
>>>>> no
>>>>> jeash.assets, but i'm not sure thats right.
>>>>>
>>>>>
>>>>> On Fri, Sep 23, 2011 at 1:32 PM, Alex Liebert <
>>>>> [hidden email]>**wrote:
>>>>>
>>>>>  just realized maybe i dont have latest jeash... stupid...whoops.
>>>>>>
>>>>>>
>>>>>> On Fri, Sep 23, 2011 at 1:30 PM, Alex Liebert <
>>>>>> [hidden email]>**wrote:
>>>>>>
>>>>>>  Testing out the html5 target now :)
>>>>>>>
>>>>>>> I get this error:
>>>>>>>
>>>>>>> bin/html5/haxe/**ApplicationMain.hx:7: characters 0-18 : Class not
>>>>>>> found :
>>>>>>> nme.Assets
>>>>>>> Called from ? line 1
>>>>>>> Called from InstallTool.hx line 395
>>>>>>> Called from InstallTool.hx line 75
>>>>>>> Called from installers/InstallerBase.hx line 112
>>>>>>> Called from installers/HTML5Installer.hx line 27
>>>>>>> Called from installers/InstallerBase.hx line 988
>>>>>>> Called from InstallTool.hx line 210
>>>>>>> Uncaught exception - Error running: haxe bin/html5/haxe/debug.hxml
>>>>>>>
>>>>>>> it looks as though the typdef should be setting  
>>>>>>> nme.installer.Assets
>>>>>>> to
>>>>>>> pointed to from nme.Assets, but isn't happening.  Any suggestions?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Alex
>>>>>>>
>>>>>>>
>>>>>>>
>>>> --
>>>> haXe - an open source web programming language
>>>> http://haxe.org
>>>>
>>>
>>>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Assets class assignment error in NME html5 target

Alex Liebert
Thanks Josh!  I'll try the font change.

No Bitmap events is pretty unfortunate- that would be a massive rewrite on my end so I'll park it for now.

I wonder what kind of cheap work around we could do internally to solve the bitmap issue?  I don't know much about canvas at all so I'm not familiar with whatever the core problem is.

I could see some kind of hack inside the jeash bitmap rendering code to redraw everything with the method you describe perhaps.

Alex

On Fri, Sep 23, 2011 at 2:21 PM, Joshua Granick <[hidden email]> wrote:
Jeash does not emit mouse events for Bitmaps, it seems. This is something I wanted to try and look into.

However, it will emit events for drawn objects, like fills:



var button = new Sprite ();

var graphic = new Bitmap (Assets.getBitmapData ("Button.jpg"));

#if js
var hitArea = new Sprite ();
hitArea.graphics.beginFill (0xFFFFFF);
hitArea.graphics.drawRect (0, 0, graphic.width, graphic.height);
hitArea.alpha = 0;
#end

button.addChild (graphic);
button.addChild (hitArea);






On Fri, 23 Sep 2011 14:06:21 -0700, Alex Liebert <[hidden email]> wrote:

if it helps, every clickable thing in my app is a bitmap pretty much, i
vaguely remember reading a post you said there's an issue with click events
on js bitmaps?  Can't find it though.  Any advice?

On Fri, Sep 23, 2011 at 2:03 PM, Alex Liebert <[hidden email]>wrote:

its running!  Awesome.  Some graphics aren't displaying, I can debug that
separately.  TTF font is not working (don't care much about that either. :)

Seems fast and responsive in chrome.

Big problem though - no click events seem to be working at all.  how best
to debug this?

Thanks,

Alex


On Fri, Sep 23, 2011 at 2:01 PM, Alex Liebert <[hidden email]>wrote:

great!  Trying now.  I hacked around the Assets problem and got it running
but unfortunately got lots of errors .stepping through now.


On Fri, Sep 23, 2011 at 1:59 PM, Joshua Granick <
[hidden email]> wrote:

Hi Alex,

Thanks, again for bringing this to my attention :)

The release builds worked, but the debug build blew up. It should not
have had the "--remap nme:jeash" flag when compiling.

I also just added tracing, similar to Flash. If you have -debug enabled,
it will show trace messages over the top of your project. If you are making
a release build, that div will be hidden




On Fri, 23 Sep 2011 13:43:53 -0700, Alex Liebert <
[hidden email]> wrote:

 hm...is there an svn version of jeash i should use instead? I have
latest
haxelib.

My naieve guess is that remap jeash::nme is breaking it since theres no
jeash.assets, but i'm not sure thats right.


On Fri, Sep 23, 2011 at 1:32 PM, Alex Liebert <
[hidden email]>**wrote:

 just realized maybe i dont have latest jeash... stupid...whoops.


On Fri, Sep 23, 2011 at 1:30 PM, Alex Liebert <
[hidden email]>**wrote:

 Testing out the html5 target now :)

I get this error:

bin/html5/haxe/**ApplicationMain.hx:7: characters 0-18 : Class not
found :
nme.Assets
Called from ? line 1
Called from InstallTool.hx line 395
Called from InstallTool.hx line 75
Called from installers/InstallerBase.hx line 112
Called from installers/HTML5Installer.hx line 27
Called from installers/InstallerBase.hx line 988
Called from InstallTool.hx line 210
Uncaught exception - Error running: haxe bin/html5/haxe/debug.hxml

it looks as though the typdef should be setting nme.installer.Assets
to
pointed to from nme.Assets, but isn't happening.  Any suggestions?

Thanks,

Alex



--
haXe - an open source web programming language
http://haxe.org




--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Assets class assignment error in NME html5 target

Alex Liebert
also curious how well copyPixels is supported (if at all) since I depend on this for flash side animation alot, and it doesn't seem to be working.

On Fri, Sep 23, 2011 at 2:29 PM, Alex Liebert <[hidden email]> wrote:
Thanks Josh!  I'll try the font change.

No Bitmap events is pretty unfortunate- that would be a massive rewrite on my end so I'll park it for now.

I wonder what kind of cheap work around we could do internally to solve the bitmap issue?  I don't know much about canvas at all so I'm not familiar with whatever the core problem is.

I could see some kind of hack inside the jeash bitmap rendering code to redraw everything with the method you describe perhaps.

Alex


On Fri, Sep 23, 2011 at 2:21 PM, Joshua Granick <[hidden email]> wrote:
Jeash does not emit mouse events for Bitmaps, it seems. This is something I wanted to try and look into.

However, it will emit events for drawn objects, like fills:



var button = new Sprite ();

var graphic = new Bitmap (Assets.getBitmapData ("Button.jpg"));

#if js
var hitArea = new Sprite ();
hitArea.graphics.beginFill (0xFFFFFF);
hitArea.graphics.drawRect (0, 0, graphic.width, graphic.height);
hitArea.alpha = 0;
#end

button.addChild (graphic);
button.addChild (hitArea);






On Fri, 23 Sep 2011 14:06:21 -0700, Alex Liebert <[hidden email]> wrote:

if it helps, every clickable thing in my app is a bitmap pretty much, i
vaguely remember reading a post you said there's an issue with click events
on js bitmaps?  Can't find it though.  Any advice?

On Fri, Sep 23, 2011 at 2:03 PM, Alex Liebert <[hidden email]>wrote:

its running!  Awesome.  Some graphics aren't displaying, I can debug that
separately.  TTF font is not working (don't care much about that either. :)

Seems fast and responsive in chrome.

Big problem though - no click events seem to be working at all.  how best
to debug this?

Thanks,

Alex


On Fri, Sep 23, 2011 at 2:01 PM, Alex Liebert <[hidden email]>wrote:

great!  Trying now.  I hacked around the Assets problem and got it running
but unfortunately got lots of errors .stepping through now.


On Fri, Sep 23, 2011 at 1:59 PM, Joshua Granick <
[hidden email]> wrote:

Hi Alex,

Thanks, again for bringing this to my attention :)

The release builds worked, but the debug build blew up. It should not
have had the "--remap nme:jeash" flag when compiling.

I also just added tracing, similar to Flash. If you have -debug enabled,
it will show trace messages over the top of your project. If you are making
a release build, that div will be hidden




On Fri, 23 Sep 2011 13:43:53 -0700, Alex Liebert <
[hidden email]> wrote:

 hm...is there an svn version of jeash i should use instead? I have
latest
haxelib.

My naieve guess is that remap jeash::nme is breaking it since theres no
jeash.assets, but i'm not sure thats right.


On Fri, Sep 23, 2011 at 1:32 PM, Alex Liebert <
[hidden email]>**wrote:

 just realized maybe i dont have latest jeash... stupid...whoops.


On Fri, Sep 23, 2011 at 1:30 PM, Alex Liebert <
[hidden email]>**wrote:

 Testing out the html5 target now :)

I get this error:

bin/html5/haxe/**ApplicationMain.hx:7: characters 0-18 : Class not
found :
nme.Assets
Called from ? line 1
Called from InstallTool.hx line 395
Called from InstallTool.hx line 75
Called from installers/InstallerBase.hx line 112
Called from installers/HTML5Installer.hx line 27
Called from installers/InstallerBase.hx line 988
Called from InstallTool.hx line 210
Uncaught exception - Error running: haxe bin/html5/haxe/debug.hxml

it looks as though the typdef should be setting nme.installer.Assets
to
pointed to from nme.Assets, but isn't happening.  Any suggestions?

Thanks,

Alex



--
haXe - an open source web programming language
http://haxe.org




--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Assets class assignment error in NME html5 target

singmajesty
I haven't tried copyPixels yet, though I bet it could be implemented.

MineHX was written before the install tool, so I had a Utils.loadGraphic  
class, which handled differences between Flash and C++ for loading  
resources. It had a property that let me define if I needed a Sprite or  
not, since bitmaps would not trigger mouse events.

I went ahead and put this extra code in my utility function, so if I  
requested a Sprite it would automatically add the fill. The real solution,  
of course, is to try and solve this at a framework level instead of  
needing workarounds like this.





On Fri, 23 Sep 2011 14:30:15 -0700, Alex Liebert  
<[hidden email]> wrote:

> also curious how well copyPixels is supported (if at all) since I depend  
> on
> this for flash side animation alot, and it doesn't seem to be working.
>
> On Fri, Sep 23, 2011 at 2:29 PM, Alex Liebert  
> <[hidden email]>wrote:
>
>> Thanks Josh!  I'll try the font change.
>>
>> No Bitmap events is pretty unfortunate- that would be a massive rewrite  
>> on
>> my end so I'll park it for now.
>>
>> I wonder what kind of cheap work around we could do internally to solve  
>> the
>> bitmap issue?  I don't know much about canvas at all so I'm not familiar
>> with whatever the core problem is.
>>
>> I could see some kind of hack inside the jeash bitmap rendering code to
>> redraw everything with the method you describe perhaps.
>>
>> Alex
>>
>>
>> On Fri, Sep 23, 2011 at 2:21 PM, Joshua Granick <
>> [hidden email]> wrote:
>>
>>> Jeash does not emit mouse events for Bitmaps, it seems. This is  
>>> something
>>> I wanted to try and look into.
>>>
>>> However, it will emit events for drawn objects, like fills:
>>>
>>>
>>>
>>> var button = new Sprite ();
>>>
>>> var graphic = new Bitmap (Assets.getBitmapData ("Button.jpg"));
>>>
>>> #if js
>>> var hitArea = new Sprite ();
>>> hitArea.graphics.beginFill (0xFFFFFF);
>>> hitArea.graphics.drawRect (0, 0, graphic.width, graphic.height);
>>> hitArea.alpha = 0;
>>> #end
>>>
>>> button.addChild (graphic);
>>> button.addChild (hitArea);
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Fri, 23 Sep 2011 14:06:21 -0700, Alex Liebert <
>>> [hidden email]> wrote:
>>>
>>>  if it helps, every clickable thing in my app is a bitmap pretty much,  
>>> i
>>>> vaguely remember reading a post you said there's an issue with click
>>>> events
>>>> on js bitmaps?  Can't find it though.  Any advice?
>>>>
>>>> On Fri, Sep 23, 2011 at 2:03 PM, Alex Liebert  
>>>> <[hidden email]
>>>> >**wrote:
>>>>
>>>>  its running!  Awesome.  Some graphics aren't displaying, I can debug
>>>>> that
>>>>> separately.  TTF font is not working (don't care much about that  
>>>>> either.
>>>>> :)
>>>>>
>>>>> Seems fast and responsive in chrome.
>>>>>
>>>>> Big problem though - no click events seem to be working at all.  how
>>>>> best
>>>>> to debug this?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Alex
>>>>>
>>>>>
>>>>> On Fri, Sep 23, 2011 at 2:01 PM, Alex Liebert <
>>>>> [hidden email]>**wrote:
>>>>>
>>>>>  great!  Trying now.  I hacked around the Assets problem and got it
>>>>>> running
>>>>>> but unfortunately got lots of errors .stepping through now.
>>>>>>
>>>>>>
>>>>>> On Fri, Sep 23, 2011 at 1:59 PM, Joshua Granick <
>>>>>> [hidden email]> wrote:
>>>>>>
>>>>>>  Hi Alex,
>>>>>>>
>>>>>>> Thanks, again for bringing this to my attention :)
>>>>>>>
>>>>>>> The release builds worked, but the debug build blew up. It should  
>>>>>>> not
>>>>>>> have had the "--remap nme:jeash" flag when compiling.
>>>>>>>
>>>>>>> I also just added tracing, similar to Flash. If you have -debug
>>>>>>> enabled,
>>>>>>> it will show trace messages over the top of your project. If you  
>>>>>>> are
>>>>>>> making
>>>>>>> a release build, that div will be hidden
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Fri, 23 Sep 2011 13:43:53 -0700, Alex Liebert <
>>>>>>> [hidden email]> wrote:
>>>>>>>
>>>>>>>  hm...is there an svn version of jeash i should use instead? I have
>>>>>>>
>>>>>>>> latest
>>>>>>>> haxelib.
>>>>>>>>
>>>>>>>> My naieve guess is that remap jeash::nme is breaking it since  
>>>>>>>> theres
>>>>>>>> no
>>>>>>>> jeash.assets, but i'm not sure thats right.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Sep 23, 2011 at 1:32 PM, Alex Liebert <
>>>>>>>> [hidden email]>****wrote:
>>>>>>>>
>>>>>>>>  just realized maybe i dont have latest jeash... stupid...whoops.
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Fri, Sep 23, 2011 at 1:30 PM, Alex Liebert <
>>>>>>>>> [hidden email]>****wrote:
>>>>>>>>>
>>>>>>>>>  Testing out the html5 target now :)
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I get this error:
>>>>>>>>>>
>>>>>>>>>> bin/html5/haxe/****ApplicationMain.hx:7: characters 0-18 : Class
>>>>>>>>>> not
>>>>>>>>>> found :
>>>>>>>>>> nme.Assets
>>>>>>>>>> Called from ? line 1
>>>>>>>>>> Called from InstallTool.hx line 395
>>>>>>>>>> Called from InstallTool.hx line 75
>>>>>>>>>> Called from installers/InstallerBase.hx line 112
>>>>>>>>>> Called from installers/HTML5Installer.hx line 27
>>>>>>>>>> Called from installers/InstallerBase.hx line 988
>>>>>>>>>> Called from InstallTool.hx line 210
>>>>>>>>>> Uncaught exception - Error running: haxe  
>>>>>>>>>> bin/html5/haxe/debug.hxml
>>>>>>>>>>
>>>>>>>>>> it looks as though the typdef should be setting
>>>>>>>>>> nme.installer.Assets
>>>>>>>>>> to
>>>>>>>>>> pointed to from nme.Assets, but isn't happening.  Any  
>>>>>>>>>> suggestions?
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>>
>>>>>>>>>> Alex
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>  --
>>>>>>> haXe - an open source web programming language
>>>>>>> http://haxe.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>> --
>>> haXe - an open source web programming language
>>> http://haxe.org
>>>
>>

--
haXe - an open source web programming language
http://haxe.org