Git Product home page Git Product logo

Comments (11)

splhack avatar splhack commented on September 3, 2024

Did you use "Publish for LWF"? LWFS automatically installs the command in Flash CS6 or CC, you can find "Publish for LWF" command in Flash "Commands" menu. Would you try it?

If you did use it, could you share your fla file?

from lwf.

misugijunz avatar misugijunz commented on September 3, 2024

I got this error even after using the publishing script

D:/LWFS/LWFS/.a/lwfs/lib/swf2lwf/swf2lwf.rb:1998:in parse_define_button2' D:/LWFS/LWFS/.a/lwfs/lib/swf2lwf/swf2lwf.rb:2684:inparse_tags'
D:/LWFS/LWFS/.a/lwfs/lib/swf2lwf/swf2lwf.rb:2733:in parse_swf' D:/LWFS/LWFS/.a/lwfs/lib/swf2lwf/swf2lwf.rb:3496:inswf2lwf'
D:/LWFS/LWFS/.a/lwfs/lib/swf2res.rb:71:in swf2res' D:/LWFS/LWFS/.a/lwfs/lwfs.rb:638:inblock in convert'
D:/LWFS/LWFS/.a/lwfs/lwfs.rb:617:in each' D:/LWFS/LWFS/.a/lwfs/lwfs.rb:617:inconvert'
D:/LWFS/LWFS/.a/lwfs/lwfs.rb:390:in block (3 levels) in ' D:/LWFS/LWFS/.a/lwfs/lwfs.rb:373:incatch'
D:/LWFS/LWFS/.a/lwfs/lwfs.rb:373:in `block (2 levels) in '

here is the FLA: https://www.dropbox.com/s/jvaw5ww94l2cd3m/test.fla

Also, I've questions regarding Cocos2d-x LWF API especially about
eventhandler:

  1. How to make the animation stop when it enters specific frame/the end.
  2. Similar to (1), how to pause and continue at later time.
  3. How to create 2 different animation from one LWF, I mean I'd like to
    divide into several parts. For example 1a is a part of animation 1 which is
    not looped (frame 1 - 10) while otherwise 1b is looped (10-end).

Thank you for your assistance.

On Thu, Feb 6, 2014 at 1:27 AM, Kazuki Sakamoto [email protected]:

Did you use "Publish for LWF"? LWFS automatically installs the command in
Flash CS6 or CC, you can find "Publish for LWF" command in Flash "Commands"
menu. Would you try it?

If you did use it, could you share your fla file?

Reply to this email directly or view it on GitHubhttps://github.com//issues/56#issuecomment-34220778
.

Regards,

Oscar Kurniawan
http://about.me/oscarkm

from lwf.

splhack avatar splhack commented on September 3, 2024

Flash CC displays an error message for your data.

Symbol=Tween 18, layer=Layer 1, frame=1:Images exported for runtime sharing are not supported in buttons

In the root movie, frame 102, layer "daun 2", the type of the graphic object is "button". It should be "graphic". Could you fix and republish it?

How to make the animation stop when it enters specific frame/the end.

Write stop() in the frame action panel of the movie. Or you can use an event for stopping. Please take a look at http://www.cocos2d-x.org/forums/18/topics/40551?r=43216#message-43216 .

In action panel,

fscommand("event", stop);

And then

lwfNode->lwf->AddEventHandler("stop", [=](LWF::Movie *, LWF::Button *){
    lwfObject->lwf->StopMovie("_root");    
});

Similar to (1), how to pause and continue at later time.

for continuing,

lwfNode->lwf->NextFrameMovie("_root");

How to create 2 different animation from one LWF, I mean I'd like to divide into several parts. For example 1a is a part of animation 1 which is not looped (frame 1 - 10) while otherwise 1b is looped (10-end).

Set a label in the start of 1b. For example, "loop". And then write an action as the following in the end of 1b.

gotoAndPlay("loop");

from lwf.

misugijunz avatar misugijunz commented on September 3, 2024

I got it working with slightly noticeable differences between the swf and
the produced lwf:

https://www.dropbox.com/s/jvaw5ww94l2cd3m/test.fla
https://www.dropbox.com/s/654wlrjoyib3w05/test.zip

with couple images part of spinning animation (frame by frame style) is not
rendered on LWF.

regarding the API

is there a way to capture Event.Enter_Frame (onEnterFrame) event in the API?

On Thu, Feb 6, 2014 at 4:24 AM, Kazuki Sakamoto [email protected]:

Flash CC displays an error message for your data.

Symbol=Tween 18, layer=Layer 1, frame=1:Images exported for runtime sharing are not supported in buttons

In the root movie, frame 102, layer "daun 2", the type of the graphic
object is "button". It should be "graphic". Could you fix and republish it?

How to make the animation stop when it enters specific frame/the end.

Write stop() in the frame action panel of the movie. Or you can use an
event for stopping. Please take a look at
http://www.cocos2d-x.org/forums/18/topics/40551?r=43216#message-43216 .

In action panel,

fscommand("event", stop);

And then

lwfNode->lwf->AddEventHandler("stop", [=](LWF::Movie *, LWF::Button *){
lwfObject->lwf->StopMovie("_root");
});

Similar to (1), how to pause and continue at later time.

for continuing,

lwfNode->lwf->NextFrameMovie("_root");

How to create 2 different animation from one LWF, I mean I'd like to
divide into several parts. For example 1a is a part of animation 1 which is
not looped (frame 1 - 10) while otherwise 1b is looped (10-end).

Set a label in the start of 1b. For example, "loop". And then write an
action as the following in the end of 1b.

gotoAndPlay("loop");

Reply to this email directly or view it on GitHubhttps://github.com//issues/56#issuecomment-34248586
.

Regards,

Oscar Kurniawan
http://about.me/oscarkm

from lwf.

misugijunz avatar misugijunz commented on September 3, 2024

the animation that is not rendered well is under "transisi" folder on the
fla. Thank you.

On Thu, Feb 6, 2014 at 9:44 AM, Oscar Kurniawan [email protected]:

I got it working with slightly noticeable differences between the swf and
the produced lwf:

https://www.dropbox.com/s/jvaw5ww94l2cd3m/test.fla
https://www.dropbox.com/s/654wlrjoyib3w05/test.zip

with couple images part of spinning animation (frame by frame style) is
not rendered on LWF.

regarding the API

is there a way to capture Event.Enter_Frame (onEnterFrame) event in the
API?

On Thu, Feb 6, 2014 at 4:24 AM, Kazuki Sakamoto [email protected]:

Flash CC displays an error message for your data.

Symbol=Tween 18, layer=Layer 1, frame=1:Images exported for runtime sharing are not supported in buttons

In the root movie, frame 102, layer "daun 2", the type of the graphic
object is "button". It should be "graphic". Could you fix and republish it?

How to make the animation stop when it enters specific frame/the end.

Write stop() in the frame action panel of the movie. Or you can use an
event for stopping. Please take a look at
http://www.cocos2d-x.org/forums/18/topics/40551?r=43216#message-43216 .

In action panel,

fscommand("event", stop);

And then

lwfNode->lwf->AddEventHandler("stop", [=](LWF::Movie *, LWF::Button *){
lwfObject->lwf->StopMovie("_root");
});

Similar to (1), how to pause and continue at later time.

for continuing,

lwfNode->lwf->NextFrameMovie("_root");

How to create 2 different animation from one LWF, I mean I'd like to
divide into several parts. For example 1a is a part of animation 1 which is
not looped (frame 1 - 10) while otherwise 1b is looped (10-end).

Set a label in the start of 1b. For example, "loop". And then write an
action as the following in the end of 1b.

gotoAndPlay("loop");

Reply to this email directly or view it on GitHubhttps://github.com//issues/56#issuecomment-34248586
.

Regards,

Oscar Kurniawan
http://about.me/oscarkm

Regards,

Oscar Kurniawan
http://about.me/oscarkm

from lwf.

misugijunz avatar misugijunz commented on September 3, 2024

and I already tried several times to get the event handler working but it
didn't work. What I did.

  1. Let's say I've satuC object in which it is a LWFNode. I added the event
    handler code:
    satuC->lwf->AddEventHandler("halt", [=](LWF::Movie *, LWF::Button *){
    log("halt");
    satuC->lwf->StopMovie("_root");
    });
    I hope that it will stop on a certain frame.
  2. I added a layer of actions then I added an actionscript to a keyframe in
    the frame that I'd like the animation to stop/pause.and even a stop() ~just
    to make sure. But, unfortunately, it didn't stop when I played on my app.
    On the swf, it just stopped. I attached the fla on my previous email.
    Arigatou.

fscommand("event", "halt");

On Thu, Feb 6, 2014 at 10:01 AM, Oscar Kurniawan [email protected]:

the animation that is not rendered well is under "transisi" folder on the
fla. Thank you.

On Thu, Feb 6, 2014 at 9:44 AM, Oscar Kurniawan [email protected]:

I got it working with slightly noticeable differences between the swf and
the produced lwf:

https://www.dropbox.com/s/jvaw5ww94l2cd3m/test.fla
https://www.dropbox.com/s/654wlrjoyib3w05/test.zip

with couple images part of spinning animation (frame by frame style) is
not rendered on LWF.

regarding the API

is there a way to capture Event.Enter_Frame (onEnterFrame) event in the
API?

On Thu, Feb 6, 2014 at 4:24 AM, Kazuki Sakamoto <[email protected]

wrote:

Flash CC displays an error message for your data.

Symbol=Tween 18, layer=Layer 1, frame=1:Images exported for runtime sharing are not supported in buttons

In the root movie, frame 102, layer "daun 2", the type of the graphic
object is "button". It should be "graphic". Could you fix and republish it?

How to make the animation stop when it enters specific frame/the end.

Write stop() in the frame action panel of the movie. Or you can use an
event for stopping. Please take a look at
http://www.cocos2d-x.org/forums/18/topics/40551?r=43216#message-43216 .

In action panel,

fscommand("event", stop);

And then

lwfNode->lwf->AddEventHandler("stop", [=](LWF::Movie *, LWF::Button *){
lwfObject->lwf->StopMovie("_root");
});

Similar to (1), how to pause and continue at later time.

for continuing,

lwfNode->lwf->NextFrameMovie("_root");

How to create 2 different animation from one LWF, I mean I'd like to
divide into several parts. For example 1a is a part of animation 1 which is
not looped (frame 1 - 10) while otherwise 1b is looped (10-end).

Set a label in the start of 1b. For example, "loop". And then write an
action as the following in the end of 1b.

gotoAndPlay("loop");

Reply to this email directly or view it on GitHubhttps://github.com//issues/56#issuecomment-34248586
.

Regards,

Oscar Kurniawan
http://about.me/oscarkm

Regards,

Oscar Kurniawan
http://about.me/oscarkm

Regards,

Oscar Kurniawan
http://about.me/oscarkm

from lwf.

splhack avatar splhack commented on September 3, 2024

the animation that is not rendered well is under "transisi" folder on the fla.

Because these objects are shape in transisi folder. You have to convert these shapes into bitmaps.
http://help.adobe.com/en_US/flash/cs/using/WSb03e830bd6f770ee1f9eac2b12da610f99a-7fff.html

is there a way to capture Event.Enter_Frame (onEnterFrame) event in the API?

Yes.

lwfNode->lwf->AddMovieEventHandler("movie_instance_name", {
    {"enterFrame", [=](LWF::Movie *m){
        log("enterFrame movie:%s currentFrame:%d", m->name.c_str(), m->currentFrame);
    }},
    // {"load", [=](LWF::Movie *m){ }},
    // {"unload", [=](LWF::Movie *m){ }},
});

from lwf.

splhack avatar splhack commented on September 3, 2024

I also converted your https://www.dropbox.com/s/jvaw5ww94l2cd3m/test.fla into lwf, it stops right frame which you added "stop();" action on.
screen shot 2014-02-06 at 10 50 41 am

And you can resume the animation as the following.

lwfNode->lwf->AddEventHandler("halt", [=](LWF::Movie *m, LWF::Button *){
    log("halt %d", m->currentFrame);
    lwfNode->lwf->NextFrameMovie("_root");
    lwfNode->lwf->PlayMovie("_root");
});

or

lwfNode->lwf->AddEventHandler("halt", [=](LWF::Movie *m, LWF::Button *){
    log("halt %d", m->currentFrame);
    m->NextFrame();
    m->Play();
});

You have to make sure the movie instance is exist if you are using LWF::Movie APIs (LWF::Movie::Play and so on). LWF::*Movie APIs (LWF::PlayMovie and so on) automatically uses movie load event for making sure the movie instance is exist.

But you should change the order of actions.

fscommand("event", "halt");
stop();

It means, the event occurred, the event handler executed, and then "stop()" action executed. Thus the movie will be stopped by "stop()" action even though the event handler execute Play() API for the movie.

stop();
fscommand("event", "halt");

It means, "stop()" action executed, the event occurred, and then the event handler executed.

from lwf.

misugijunz avatar misugijunz commented on September 3, 2024

I still can't get the event handler working. What is the LWFS version that
do you use? Can you send me link the LWF you converted. I'm suspecting that
the LWFS/LWF codes I used may be outdated.

On Fri, Feb 7, 2014 at 2:17 AM, Kazuki Sakamoto [email protected]:

I also converted your https://www.dropbox.com/s/jvaw5ww94l2cd3m/test.flainto lwf, it stops right frame which you added "stop();" action on.
[image: screen shot 2014-02-06 at 10 50 41 am]https://f.cloud.github.com/assets/81904/2102499/a1c8c8b2-8f5f-11e3-9c03-14c7533c8fad.png

And you can resume the animation as the following.

lwfNode->lwf->AddEventHandler("halt", [=](LWF::Movie *m, LWF::Button *){
log("halt %d", m->currentFrame);
lwfNode->lwf->NextFrameMovie("_root");
lwfNode->lwf->PlayMovie("_root");
});

or

lwfNode->lwf->AddEventHandler("halt", [=](LWF::Movie *m, LWF::Button *){
log("halt %d", m->currentFrame);
m->NextFrame();
m->Play();
});

You have to make sure the movie instance is exist if you are using
LWF::Movie APIs (LWF::Movie::Play and so on). LWF::*Movie APIs
(LWF::PlayMovie and so on) automatically uses movie load event for making
sure the movie instance is exist.

But you should change the order of actions.

fscommand("event", "halt");
stop();

It means, the event occurred, the event handler executed, and then
"stop()" action executed. Thus the movie will be stopped by "stop()" action
even though the event handler execute Play() API for the movie.

stop();
fscommand("event", "halt");

It means, "stop()" action executed, the event occurred, and then the event
handler executed.

Reply to this email directly or view it on GitHubhttps://github.com//issues/56#issuecomment-34359399
.

Regards,

Oscar Kurniawan
http://about.me/oscarkm

from lwf.

splhack avatar splhack commented on September 3, 2024

Ok, could you try the latest lwfs https://github.com/gree/lwfs ?

from lwf.

splhack avatar splhack commented on September 3, 2024

Any update?

from lwf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.