HTML or NME2?

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

HTML or NME2?

slenkar
Im making a turn based game, I am using a HTML table to show the game board,

I want maximum compatibility across platforms, so would NME2 be better with canvas and flash, or HTML ?

Also how do i get NME2? cant find it on google anywhere.

Does the canvas element work on cell phones like android and iphone?
Reply | Threaded
Open this post in threaded view
|

Re: HTML or NME2?

Lee Sylvester
Hi Slenkar,

NME doesn't work in the browser. It can be used to create executable
applications, both for desktop and mobile. If you want browser based, it
would pay to stick with Flash / HTML + JS.

Best,
Lee




slenkar wrote:

> Im making a turn based game, I am using a HTML table to show the game board,
>
> I want maximum compatibility across platforms, so would NME2 be better with
> canvas and flash, or HTML ?
>
> Also how do i get NME2? cant find it on google anywhere.
>
> Does the canvas element work on cell phones like android and iphone?
>
>  


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

Re: HTML or NME2?

slenkar
how do I keep the drawing code as similar as possible between flash and canvas?

flash has buttons - i dont suppose javascript handles buttons in the same way

I sometimes use 'drawpixels' in flash for just drawing images, does canvas have a similar command or is it just sprites?
Reply | Threaded
Open this post in threaded view
|

Re: HTML or NME2?

domrein
I'm not positive about drawPixels, but you can copy an image onto canvas or copy an array of pixels.  The best reference I've found for canvas so far is this: http://ie.microsoft.com/testdrive/Graphics/CanvasPad/Default.html 

On Tue, Jul 27, 2010 at 9:53 AM, slenkar <[hidden email]> wrote:

how do I keep the drawing code as similar as possible between flash and
canvas?

flash has buttons - i dont suppose javascript handles buttons in the same
way

I sometimes use 'drawpixels' in flash for just drawing images, does canvas
have a similar command or is it just sprites?
--
View this message in context: http://haxe.1354130.n2.nabble.com/HTML-or-NME2-tp5342630p5342738.html
Sent from the Haxe mailing list archive at Nabble.com.

--
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: HTML or NME2?

slenkar
thanks,

I cant seem to use canvas in haxe/js

the getcontext command isnt recognized
Reply | Threaded
Open this post in threaded view
|

Re: HTML or NME2?

domrein
_canvas = js.Lib.document.getElementById("chartCanvas");
_context = _canvas.getContext("2d");

_canvas and _context are both Dynamic.  I'm actually working on a project using canvas right now.  I haven't started making changes necessary to publish to Flash, but the canvas stuff is all working fine.
On Tue, Jul 27, 2010 at 10:15 AM, slenkar <[hidden email]> wrote:

thanks,

I cant seem to use canvas in haxe/js

the getcontext command isnt recognized
--
View this message in context: http://haxe.1354130.n2.nabble.com/HTML-or-NME2-tp5342630p5342851.html
Sent from the Haxe mailing list archive at Nabble.com.

--
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: HTML or NME2?

slenkar
thanks that worked
Reply | Threaded
Open this post in threaded view
|

Re: HTML or NME2?

Niel Drummond-3
if you have difficulty, you can also use Jeash, which maps the flash API to canvas calls:

https://launchpad.net/jeash

to use you need a html file a bit like the following

<div id="haxe:jeash" style="width:400px;height:400px"></div>
<style type="text/javascript" src="./app.js"></script>

and a hxml like the following

-cp path/to/jeash
--remap flash:jeash
-js app.js
-main App

let me know if you have problems

- Niel

On Tue, Jul 27, 2010 at 09:23:53AM -0700, slenkar wrote:
>
> thanks that worked
> --
> View this message in context: http://haxe.1354130.n2.nabble.com/HTML-or-NME2-tp5342630p5342894.html
> Sent from the Haxe mailing list archive at Nabble.com.
>
> --
> 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: HTML or NME2?

slenkar
thanks ill check it out