Profile

Member Since
November 21, 2011

Search Members

  

grumpytoad

63
@

Badges

This user hasn't earned any badges yet.

Posts

Viewing 1 to 20 (63 Total)

Re: Stop Jeash from creating multiple canvases

as already said, you can paint everything into a background image..

var canvas = new BitmapData (Lib.current.stage.stageWidth, Lib.current.stage.stageHeight);
addChild (new Bitmap (canvas));

addEventListener (Event.ENTER_FRAME, function (event:Event) {

// do something with your own sprites

canvas.fillRect(canvas.rect, 0x000000);
canvas.draw (anOnstageDisplayObject);

});

the fillRect does not actually fill everything it just clears the buffer.

It's possible to change the framework to draw everything down to a canvas.. it's not what made sense in the past because you're then predetermined to only provide a framework for games, rather than leaving the door open for RIA/mixed html and games.

Posted on February 20, 2013 at 9:20 AM

Re: TextField with 3.5.0

The size of your ttf.hash depends on how many characters you embed.. you should experiment with just exporting the chinese characters that you need. You can alternatively use the client browser's font system using htmlText, and appropriate CSS.

Posted on December 27, 2012 at 9:53 AM

Re: Jeash:: Can't reset angle to 0

Yes that could be a problem, I shall take a look.. can you write a small bug report onhttp://haxenme.atlassian.net/browse/JEASH... , so i do not forget?

Posted on December 12, 2012 at 10:49 PM

Re: Jeash:: Can't reset angle to 0

I assume you are using a release version.. Please check again with SVN trunk, since the release is quite old, and let me know if it is still a problem.

I am considering doing separate releases for jeash, but for now that is what we have.

Posted on December 12, 2012 at 4:39 AM

Re: IE9 HTML5 XML not able to load, ok in Chrome

I think 4.3.3-beta still contains many problems that I fixed in the beginning of october.. you will need to use a later SVN revision.

Posted on December 04, 2012 at 10:52 PM

Re: IE9 HTML5 XML not able to load, ok in Chrome

what version of NME are you using ?

This was fixed multiple times, once in June, then again in September (and tbh I'm a bit tired of seeing this bug re-occur)... The reason it's happening is due to the funny way text assets are loaded in the NMML asset loading tool (which defaults to binary). If you really need to use NMML, you should check the filenames in your asset path: are they ending in ".txt" or ".xml". Use the latest NME. Try removing some files and see if it works.. If you still have a problem, post a reduced test case.

Yes, IE9 does not have proper binary type access in jeash, but this is also not the default access mode when doing async http requests.. all urlrequests are normally loaded using a normal ajax request.

Posted on December 04, 2012 at 11:10 AM

Re: trouble with html5 and flash differences in recognising objects

you need to give the dynamic e.target a type:

var sprite: Sprite = e.target;
trace(sprite.name);

the reasons for this limitation is that flash does not specify a type for event.target, and haxe Dynamic types are not cross platform - the js target does not support native getters like in avm2 (this will change in haxe-3.0).

Posted on November 29, 2012 at 3:07 PM

Re: Using DropShadowFilter in html5

It's not often that people use the filters in the html5 output, and some bugs were introduced since the merge into NME, so it's probably worth it if you discover whether any filters work at all.

as a replacement I would imagine baking your own using bitmapdata over an underlying sprite, and some math trickery.

Posted on November 10, 2012 at 4:10 PM

Re: Using DropShadowFilter in html5

Unfortunately, the person that contributed the DropShadowFilter code is no longer working on it, and left it in a non-working state...

Posted on November 10, 2012 at 12:08 PM

Re: Unable to compile except in html5

Can you post your NMML file, or if you are not using that, your hxml file or compile command ?

Posted on November 10, 2012 at 12:02 PM

Re: Loading asset issues with HTML5 target

The NMML loader defaults to binary loading, because on CPP that seems the easiest way to get a text file. Unfortunately, for js this isn't appropriate, also because there are issues such as encoding which work differently between flash/cpp and js. So for js, we have a filter on some filename extensions to load them as text files using a traditional ajax text query - as you've discovered though, this can break projects where you have files in your asset folder that shouldn't be loaded that way.

For video, this used to work before the merge, got broken by a careless commit since then, and I simply fixed the compile error. It works, but there's issues such as differing codec support in browsers, that is left up to the user to solve.

Posted on November 08, 2012 at 6:01 AM

Re: Loading asset issues with HTML5 target

This sounds like XML files are running through the binary loader rather than the text loader.. this is a recurring problem and was solved many times over, so please check with the latest SVN checkout, I will try to find time to take another look at it.

Posted on November 05, 2012 at 2:01 PM

Re: text with 'umlaut' (öäüá etc.) is not drawn in html5

So, there's some background to this, that isn't really explained anywhere. Also, I haven't checked if this feature works for some time, so there may still be open bugs since we merged.

We use 'hxswfml' to generate vector glyphs out of a TTF file to render the standard TextField, though we only extract a subsection of glyphs because the serialization used is quite large in size. You can change which glyphs are being exported into the generated 'hash' file, as described by others above, you will need to find the respective ascii codes that you want to export. I don't know what NME does underneath, but the original implementation is documented here:http://haxe.org/com/libs/jeash/embedfont...

There is also a 'native' Textfield that uses a browser's DIV field.. this may be more desirable if you want better performance, I think that's been set by the htmlText field, but it's not that well tested.

Posted on October 10, 2012 at 2:13 PM

Re: [Jeash] No sound playback

Seems to work fine with the nme commandline tool in html5.

Posted on October 08, 2012 at 2:24 PM

Re: [Jeash] No sound playback

It may be that your local server does not serve your mp3 files with the correct mime type, so these will also not play unless they are being retrieved by the browser with the Content-Type 'audio/mpeg'.. If you are using apache, you will need the following directive in your httpd.conf or mod_mime module configuration file.

AddType audio/mpeg .mp3

Posted on October 08, 2012 at 6:43 AM

Re: [Jeash] No sound playback

Thanks, I've not tried with the NME commandline tool with audio, I'll take a look at it.

Currently support for different audio container formats in browsers is fragmented at best, an overview is here:

http://developer.mozilla.org/en-US/docs/Media_formats_supported_by_...

Posted on October 08, 2012 at 1:05 AM

Re: [Jeash] No sound playback

Seemed to be working when I tested it today..

http://fussybeaver.org/jeash-demos/wonderfl/fa6D...

if it's a problem, would be good to get a test case that works in flash.

Posted on October 07, 2012 at 4:15 PM

Re: CopyPixels HTML5 Alternative

CopyPixels doesn't overlap images, it actually sets the data inside the image, and currently the canvas spec ignores alpha when using 'drawImage'..

However, you can draw to a transparent bitmapdata, which you can have as a separate displayobject ontop of your background.

Posted on October 06, 2012 at 7:34 AM

Re: Jeash / IE9 are incompatible

That shouldn't normally happen, but could be an indication that something else is wrong, like the engine not being able to GC some objects due to dangling signal handlers, or playing a sound file too frequently, GC thrashing, or simply abuse of a part of the flash API that IE9 is not good at handling.

Let me know though if you manage to pin it down to something specific.

As a general rule, in jeash, never use lock(). Keep you model count low unless you understand how jeash works, and avoid inheritance.

Posted on September 30, 2012 at 9:50 AM

Re: Jeash / IE9 are incompatible

fixed that... but had to revert some commits made over the last few monthsr, that seem to have broken lots of basic things. . . very slow and painful work.

Posted on September 29, 2012 at 1:45 PM
« Previous1234Next »