I’m using VS2012. It’s solved now, I changed LWF class to LWFCore.
good to hear.
I got another question, is there convenient way to support batching with texture atlas generated from Texturepacker? I tried this code :
Yeah,
Do “Publish for LWF” on Flash CS6 or Flash CC, for example, the filename is “sample.fla”. It generates “sample.bitmap” folder which includes all bitmaps in the fla file.
Generate texture sheet using TexturePacker from the PNG files in “sample.bitmap” and publish the texture sheet with “JSON Hash”, for example, “sample_atlas.json” and “sample_atlas.png”. (You can do it in command line, like “$ texturepacker —format json —shape-padding 0 —border-padding 0 —padding 0 —inner-padding 0 —no-trim —maxrects-heuristics best —disable-auto-alias —reduce-border-artifacts —scale 1 —data sample_atlas.json —sheet sample_atlas.png sample.bitmap/*png”)
Put the texture sheet json and png into LWFS_work project folder. For example LWFS_work/sample/sample.fla, LWFS_work/sample/sample.swf, LWFS_work/sample/sample_atlas.json, LWFS_work/sample/sample_atlas.png
That’s it. You can use LWFNode using “sample.lwf” and “sample_atlas.png” with SpriteBatchNode.
Hi, everything works perfectly, thanks… Batch is done automatically also, nice
good to hear and thanks
Is there documentation on how to implement button event handler? there is documentation only for unity and cocos2d-html5
Objective-C API document is also available, however no document for C++ implementation… You can use LWF::AddButtonEventHandler API, but more easy way is LWF::AddEventHandler API like this .
In Flash, put
fscommand("event", "done");
into button action as the following.
on (release) {
fscommand("event", "done");
}
The first argument should be “event”, the second argument is event name.
And then use AddEventHandler with the event name “done”.
I still have performance issue on my android phone. I already batched the rendering using SpriteBatchNode ( since I’m switching back to alpha1 ). I just get 20-40 FPS on my phone with only 2 draws. The LWF itself just contains 3 bitmaps and 2 buttons ( 800x480 resolution).
While my game with 16 draws can run 60fps on the same phone.
I still have performance issue on my android phone. I already batched the rendering using SpriteBatchNode ( since I’m switching back to alpha1 ). I just get 20-40 FPS on my phone with only 2 draws. The LWF itself just contains 3 bitmaps and 2 buttons ( 800x480 resolution).
Hmm, could you share the content (fla file) with me?
Herman To wrote:
> problem solved, it’s because i was using publish to lwf, should be just using file-publish.
>
We found and fixed a problem in the converter with using “Publish for LWF”, we’ll release it soon. Thank you for the report!
Thanks… It’s because “Publish for LWF” automatically changing flash player version to 8, which then break the actionscript
Herman To wrote:
> I still have performance issue on my android phone. I already batched the rendering using SpriteBatchNode ( since I’m switching back to alpha1 ). I just get 20-40 FPS on my phone with only 2 draws. The LWF itself just contains 3 bitmaps and 2 buttons ( 800x480 resolution).
>
Hmm, could you share the content (fla file) with me?
I tried with the demo animated_building.lwf from LWFS work examples, is the same, FPS can’t reach more than 40 FPS. I’m using HTC One V with Android OS 4.0.3.
I tried the latest Commands-Publish For LWFS.jsfl. Got “NG” on daemon’s status.
This is the message : http://pastebin.com/WPL6rEbE
eh, thank you for the report. we noticed that Flash CS6 exports another shape tag if we created rectangle shape with line color (creating rectangle shape without line color is no problem with the current LWFS). we’ll fix and release LWFS soon.
There is still problem, while the status says “OK” on the daemon, but actionscript is not exported. My tellTarget script seems to be not working. But it’s working on publish setting with flash player version 7.
Oh, thank you for your report! We have fixed the problem. Would you check the latest LWFS https://github.com/gree/lwfs again? We really appreciate your cooperation
Still not working, but daemon says “OK”… I don’t know why, is it merely because flash player version issue? If I change to flash player 7 and publish it without “Publish with LWF”, it works