LWF for C++ with Cocos2d-x renderer

Herman To wrote:

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

Hmm, if you don’t mind could you please share your data with me?

sure, attached is the fla

actionscript (fscommand and tellTarget ) is still not working if I use “Publish for LWF”

And now using the newest version of lwfs, if I publish using swf player version 7, it will break the animations too :frowning:

Herman To wrote:

sure, attached is the fla

Thank you for your kind cooperation!

actionscript (fscommand and tellTarget ) is still not working if I use “Publish for LWF”

We found and fixed unexpected actionscript notation. Thank you for the report. Could you try the latest LWFS https://github.com/gree/lwfs ?

And your script includes “/* js” comment. It is one of the special feature of LWF, it means embedding JavaScript into LWF data for HTML5. https://github.com/gree/lwf/wiki/Blog-%231 . Sorry for our poor documentation, could you remove “js” from the comments?

And now using the newest version of lwfs, if I publish using swf player version 7, it will break the animations too :frowning:

Hmm…

sorry the animation was breaking because I mistakenly changed the type from movieclip to button which then not get rendered by LWF. It’s solved now. I will try the new version :slight_smile:

it’s all good now… thanks :slight_smile:

how is lwf handling multi resolution?

Herman To wrote:

it’s all good now… thanks :slight_smile:

Good to know! Thank you for your cooperation :slight_smile:

how is lwf handling multi resolution?

  • Bitmaps - LWF uses Sprite node for rendering bitmaps, thus you can use multi-resolution bitmaps for multi-resolution screens as usual.

  • Aspect ratio - Regardless of using LWF, you should decide a policy, how to support it. http://www.cocos2d-x.org/wiki/Multi_resolution_support

  • Scaling LWF Data - You can scale LWF animation to the screen size using LWF::FitForHeight or LWF::FitForWidth API as the following.

    // Fits the height of the Flash stage size to the height of specified size.
    lwfNode->lwf->FitForHeight(visibleSize.width, visibleSize.height);

    // Fits the width of the Flash stage size to the width of specified size.
    lwfNode->lwf->FitForWidth(visibleSize.width, visibleSize.height);

hi, Kazuki Sakamoto~
i wana change image. ex) https://github.com/gree/lwf/issues/19
how can i use in cocos2dx?

chris lim wrote:

hi, Kazuki Sakamoto~
i wana change image. ex) https://github.com/gree/lwf/issues/19
how can i use in cocos2dx?

Hi chris, ok, we’ll update LWF for supporting the feature like this.

thx~ Kazuki Sakamoto.
i’ll wait for update.

ps: please, i want to know that when is use it.

Updated.
https://github.com/gree/lwf/commit/c03cab133e2331600ec38f1239f7d4fe98c28f82

Example:

    std::regex re("card\\d+\\.png$");
    LWF::LWF::SetTextureLoadHandler([=](std::string fullPath, std::string basePath, std::string filename) {
        return regex_replace(fullPath, re, "card01.png");
    });

thx a lot. Kazuki Sakamoto~
(ありがとうございます.)

hi Kazuki Sakamoto~
i want use in win32 project but i get a many complier error(like as boost)
could you help me.
thank you

tsl3333 wrote:

hi Kazuki Sakamoto~
i want use in win32 project but i get a many complier error(like as boost)
could you help me.
thank you

Hi @tsl3333 , Could you check the patch? https://github.com/gree/lwf/pull/54/files

@splhack

thx~ Kazuki Sakamoto.

i have other question.

how can i use batch texutre for lwf??.

did use lwfs convert? or other solution.

thank you help.

hello.
how to add already builded Project?

i wanna add lwf lib to builded project (3.0 beta 2).

tsl3333 wrote:

@splhack

thx~ Kazuki Sakamoto.

i have other question.

how can i use batch texutre for lwf??.

did use lwfs convert? or other solution.

thank you help.

@tsl3333 Could you check these post? http://www.cocos2d-x.org/forums/18/topics/40551?r=42968#message-42968 http://www.cocos2d-x.org/forums/18/topics/40551?r=43203#message-43203

jamesYou wrote:

hello.
how to add already builded Project?

i wanna add lwf lib to builded project (3.0 beta 2).

@jamesYou Add lwf into external/lwf and add cpp and h files into your project file. For iOS, https://github.com/splhack/Hello-LWF-Cocos2d-x/tree/master/projects/Hello-LWF-Cocos2d-x/proj.ios_mac, for Android, https://github.com/splhack/Hello-LWF-Cocos2d-x/blob/6557bb0121cde718d17e9dd27fc361b7c51c9339/external/lwf/android/Android.mk .

need add liblwf?

i can’t find it and add my project.

jamesYou wrote:

need add liblwf?

i can’t find it and add my project.

@jamesYou eh, yeah, please take a look at https://github.com/splhack/Hello-LWF-Cocos2d-x/tree/master/build/cocos2d_libs.xcodeproj

@splhack
hi thank you very much.Kazuki Sakamoto.
i can use batch lwf file.
but i have a convert error(so i use lwf-demo file to convert) .
i want did “Publish for LWF” on Flash CC And Flash 6. and i get error is “TypeError: doc has no properties”
and doc is NULL. how can i fix that error. or i lose some extend lib for flash??

could you help me. thank you