Profile

Member Since
January 15, 2012

Search Members

  

jansensan

5
@jansensan

Badges

This user hasn't earned any badges yet.

Posts

Viewing 1 to 5 (5 Total)

Re: How to use Jeash properly?

Hahah indeed! Thanks for the heads up, that was so simple smiling I uploaded the fix to the repo, but it works now, thanks!

Posted on June 21, 2012 at 2:12 PM

How to use Jeash properly?

I am trying to do something super simple to test how to work with Jeash: simply put a square on the screen. I have been able to do it before, but somehow not this time.

The SWF part works fine, I get no error anywhere in putting the jeash parameter in the arguments, but nothing comes out visually.

May I ask for help and guidance to help me look at the proper place to fix this? I put my code on github for all to view:http://github.com/jansensan/test-haxe-jeash...

Thanks!

Posted on June 21, 2012 at 1:19 PM

Re: First attempt at using haXe to publish to SWF and JS

It turns out that in order to target the haxe:jeash div with css, the colon has to be escaped:

#haxe\:jeash {
width: 640px;
height: 360px;
}

http://jansensan.net/experiments/haxe-avm2-to-swf-and-js/assets/css...

I leave this here, in case it can be useful to anyone.

Posted on January 16, 2012 at 11:54 AM

Re: First attempt at using haXe to publish to SWF and JS

So I tried that Actuate example, but I guess there is something I do not understand from the instructions, because once the install is complete, I cannot run the example or can I find it on my computer. See the Terminal stuff:

Last login: Sun Jan 15 13:30:16 on ttys000
jansenmac:~ jansensan$ haxelib install actuate
Downloading actuate-1,38.zip...
Download complete : 52001 bytes in 0.7s (71.3KB/s)
Created com/
Created com/eclecticdesignstudio/
Created com/eclecticdesignstudio/motion/
Install com/eclecticdesignstudio/motion/Actuate.hx
Created com/eclecticdesignstudio/motion/actuators/
Install com/eclecticdesignstudio/motion/actuators/FilterActuator.hx
Install com/eclecticdesignstudio/motion/actuators/GenericActuator.hx
Install com/eclecticdesignstudio/motion/actuators/MethodActuator.hx
Install com/eclecticdesignstudio/motion/actuators/MotionPathActuator.as
Install com/eclecticdesignstudio/motion/actuators/PropertyDetails.hx
Install com/eclecticdesignstudio/motion/actuators/SimpleActuator.hx
Install com/eclecticdesignstudio/motion/actuators/TransformActuator.hx
Created com/eclecticdesignstudio/motion/easing/
Install com/eclecticdesignstudio/motion/easing/Back.hx
Install com/eclecticdesignstudio/motion/easing/Cubic.hx
Install com/eclecticdesignstudio/motion/easing/Elastic.hx
Install com/eclecticdesignstudio/motion/easing/Expo.hx
Install com/eclecticdesignstudio/motion/easing/IEasing.hx
Install com/eclecticdesignstudio/motion/easing/Linear.hx
Install com/eclecticdesignstudio/motion/easing/Quad.hx
Install com/eclecticdesignstudio/motion/easing/Quart.hx
Install com/eclecticdesignstudio/motion/easing/Quint.hx
Install com/eclecticdesignstudio/motion/easing/Sine.hx
Install com/eclecticdesignstudio/motion/MotionPath.as
Created documentation/
Install documentation/compile.hxml
Install documentation/ImportAll.hx
Install haxedoc.xml
Install haxelib.xml
Current version is now 1.38
Done
jansenmac:~ jansensan$ nme test "Actuate Example.nmml" html5
-bash: nme: command not foundà
jansenmac:~ jansensan$ sudo haxelib run nme setup
Password:
jansenmac:~ jansensan$ nme test "Actuate Example.nmml" html5
Error using command: test, you must specify a *.nmml file


Overall, that may not be necessary, as your suggestion to change the canvas tag to a div was indeed right. However, there is something in the outputted JS that sets the height of the div to 500, no matter what I do in the CSS, and that is an issue.

jeash.Lib.jeashGetHeight = function() {
var tgt = js.Lib.document.getElementById("haxe:jeash");
return tgt.clientHeight > 0?tgt.clientHeight:500;
}

How can that happen if there is already CSS setting the height?

Posted on January 16, 2012 at 8:07 AM

First attempt at using haXe to publish to SWF and JS

And also my first post to the NME forums smiling

Today I finally managed to install NME thanks to the awesome installers provided here (I gotta say I hate that command line stuff).

So I built a super simple example to test the ability to publish to different targets. I must have done something wrong, for the SWF version outputs properly, whereas the JS target... well is blank. At first I ended up with an error like "tgt is null", the browser was complaining that the canvas tag was missing, while it was actually there and id'ed as "haxe:jeash"

So now I have no errors... and no display either... :/ Would any of you be so kind as to tell me where I screwed up? You can see what I have done here:

SWF:http://jansensan.net/experiments/haxe-avm2-to-swf-and-js/main-swf-f...
JS:http://jansensan.net/experiments/haxe-avm2-to-swf-and-js/main-js.ht...

And you can download the project sources here:http://jansensan.net/experiments/haxe-avm2-to-swf-and-js/test-haxe-...

I built this under FDT5.

Thanks in advance!

-mat.

Posted on January 15, 2012 at 7:45 PM