Profile

Member Since
August 25, 2011

Search Members

  

singmajesty

2147
@singmajesty

Badges

This user hasn't earned any badges yet.

Posts

Viewing 161 to 180 (2136 Total)

Re: Trouble getting javascript and jquery to work within NME

I believe the HTML5 TextField may support DOM text if you use "htmlText" instead of "text", which may be helpful.

What I would like to see for the HTML5 target is an integrated "DOMDisplayObject" which allows you to custom define your own DOM element tag and control the contents. Currently, most (or all?) of the DisplayObjects (with the possible exception of htmlText or Video) are Canvas.

Your code looks good, but the DIV you create might not be visible if the canvas elements are layering on top of it. I'm not sure if you are using a Haxe 3 development build, and if the use of jQuery has changed, but in Haxe 2.10 you will want to use jQuery as a class in order to use its functionality, as "$" is not a valid symbol for Haxe language references:

new JQuery (".my-selector").append(div);

However, I think most anything you would want jQuery for might be covered, using Actuate or other available functions

Posted on February 15, 2013 at 8:31 AM

Re: include.nmml changes in 3.5.x

Currently the SWF works for native and Flash, but there is a development library that does provide HTML5 support. I found there was a minor (but difficult to find) that prevents the new library from being used with anything older than Neko 2, which hasn't been released yet.

If Haxe 3 and Neko 2 are released soon, we may be able to pick up development of the new library again

Posted on February 14, 2013 at 12:09 AM

Re: Problem using SWF library - class not found

Try "var h" (type inference) instead of "var h:Header"

smiling

The rest looks good

Posted on February 13, 2013 at 11:50 PM

Re: include.nmml changes in 3.5.x

Use "var h = Assets..." instead of "var header = Assets..." or type it as format.display.MovieClip

The classes are not generated like in previous versions of NME. After Haxe 3 releases I think it should be possible for the returned type to be nme.display.MovieClip, so that may change in the next major version.

Hope this helps!

Posted on February 13, 2013 at 11:47 PM

Re: Old NME project to blackberry

If you open a terminal and run "nme trace blackberry", from the directory of your project, does it return any new information?

You can also try adding trace() statements in your code. It will be returned when you run "nme trace blackberry"

Usually this type of issue is caused by trying to access a null value

Posted on February 09, 2013 at 8:39 PM

Re: Conditional compile arguments

Rather than answering things in the forums, I'm going to try and starting populating documentation on these topics. I'm sorry that it hasn't existed.

Here you are:

http://www.nme.io/developer/documentation/conditional-compilation/...

Posted on February 06, 2013 at 10:47 AM

Re: Conditional compile arguments

NME should define the target, the platform type and Haxe defines the target language. Between these defines, most everything you need should be covered:

windows
mac
linux
ios
android
blackberry
html5

desktop
mobile
web

js
cpp
neko
flash


These can be accessed using declarations like "#if blackberry" and "#if (neko || cpp)"

Similar defines (with the exception of the language defines) should be available in NMML as well, for "if" and "unless" attribute values

Posted on February 06, 2013 at 9:25 AM

Re: OUYA game console?

I don't have an OUYA, but based on a recommendation I ordered a SteelSeries Free wireless gamepad, which should arrive on Friday.

The nice thing is that it seems to work for the desktop, iOS, Android and BlackBerry.

When it comes I will try and wire up support. With the "extra" pipes it should be simple to integrate support for the OUYA gamepad as well smiling

Posted on February 06, 2013 at 9:09 AM

nme.io is now open for editing

Hey,

If you are registered as a user, you now have editing rights for both the "Documentation" and "Tutorials" sections.

Edit a page, make a new page... create lots of new pages... you have the power to improve the documentation and tutorial sections with your own content.

Edits must be approved by an administrator before it is visible to guests, but it will be visible to other logged in users.

I look forward to what we will create together! Please feel free to take advantage of this new ability, with respect for the responsibility that goes along with it smiling

Posted on February 05, 2013 at 4:34 PM

Re: 3.5.5 Broke windows target?

HXCPP is currently behind on haxelib, though I hope that will be remedied soon.

They are released in tandem with the NME installer, though. Glad to hear the dev build is working! Cheers smiling

Posted on February 05, 2013 at 1:09 PM

Re: 3.5.5 Broke windows target?

Ah, set it to HXCPP 2.10.3 -- haxelib set hxcpp 2.10.3

If you do not have HXCPP 2.10.3, try installing NME using the Windows installer, which has it included

Posted on February 05, 2013 at 1:01 PM

Re: 3.5.5 Broke windows target?

I've been building here using Visual Studio 2012 for Windows Desktop, on Windows 8

Posted on February 05, 2013 at 12:44 PM

Re: 3.5.5 Broke windows target?

What version of HXCPP do you have installed? (haxelib list)

Posted on February 05, 2013 at 12:42 PM

Re: 3.5.5 Broke windows target?

Does it work if you perform a clean build? (nme test windows -clean)

Posted on February 05, 2013 at 12:25 PM

Re: Inconsistency in Flash and CPP deploy speed

Sorry about the forum formatting.

When you get an Event.ENTER_FRAME event, you can calculate the elapsed time since the previous frame. Then when you do your movement calculations, make it based on time. Instead of 2 pixels per frame, for example, do 120 pixels per second... then you can multiply it by the elapsed time to figure out how much you are to add on this one frame.

This helps ride out bumps when a device begins to drop frames, or especially for old devices which may have trouble keeping your desired frame rate.

Posted on February 05, 2013 at 10:38 AM

Re: Inconsistency in Flash and CPP deploy speed

I would recommend using a combination of Event.ENTER_FRAME and time to control the updates in your game. For example:

package;


import nme.display.Sprite;
import nme.events.Event;
import nme.Lib;


class Test extends Sprite {


private var cacheTime:Int;
private var gameObjects:Array <GameObject>;


public function new () {

super ();

cacheTime = Lib.getTimer ();
gameObjects = new Array <GameObject> ();

Lib.current.stage.addEventListener (Event.ENTER_FRAME, this_onEnterFrame);

}




// Event Handlers




private function this_onEnterFrame (event:Event):Void {

var currentTime = Lib.getTimer ();
var deltaTime = currentTime - cacheTime;
cacheTime = currentTime;

for (gameObject in gameObjects) {

gameObject.update (deltaTime);

}

}


}

Posted on February 05, 2013 at 10:35 AM

Re: Failed Android PiratePig build... win8 pro

It sounds like there may have been a problem with a file being locked, or file permissions?

Can you try and change the target from "android" to "android -clean" and try again (or just delete your output directory)?

Posted on February 05, 2013 at 9:40 AM

Re: multiple swfs to .exe

Do you want the EXE to accept multiple separate binaries, as a loader, or are you alright with them being fused together?

If that is the case, perhaps there could try something like...

<include path="to/your/subproject.nmml" if="windows" />

(before you define your own <meta /> and <app /> tags, etc)

Then you could similarly bridge in your source code to create a harder link to the other content, if necessary. When you compile to Flash, they will be independent projects. When you compile to Windows, it will import all the assets and dependencies of all the projects, then compile them together as one project.

If you have ideas for ways NME could accommodate your workflow better, or if you think this won't work, let me know smiling

Posted on February 05, 2013 at 9:22 AM

Re: Add an option to use gravatar

Oh, it looked like it was working.

I think the add-on I was using is no longer compatible, but the CMS appears to have added the feature internally. I just turned it on.

It looks like it is working for real this time smiling

The way it works is that you can upload an image here. If you do not, then it uses Gravatar as a fall-back

Posted on February 05, 2013 at 8:59 AM

Re: bug: things are confusing. a request to clean house (issue trackers, source repos)

Hey, I just sent an email. Let's follow up

Posted on February 04, 2013 at 9:51 PM