Git Product home page Git Product logo

Comments (8)

splhack avatar splhack commented on September 3, 2024

How about this?

lwfObject.AddMovieEventHandler(/* movie instance name */ "foo", enterFrame:(movie) => {
    if (movie.currentFrame == movie.totalFrames || !movie.playing) {
        UnityEngine.Debug.Log(movie.GetFullName() + ": done");
    }
});

from lwf.

cy-zhang-yekai avatar cy-zhang-yekai commented on September 3, 2024

thax,but in my case have err...can you tell me more detail.

from lwf.

cy-zhang-yekai avatar cy-zhang-yekai commented on September 3, 2024

void Start()
{
string dir = string.Format("{0}/", file_name);
string path = dir + file_name;
Load(path:path, texturePrefix:dir);
attached_movie = lwf.rootMovie.AttachMovie("test","test");
AddMovieEventHandler("test", enterFrame:(movie) => {
UnityEngine.Debug.Log("test");
});
}

IT's not err but Console display nothing...AddMovieEventHandler not work....i think..

from lwf.

splhack avatar splhack commented on September 3, 2024

Could you use the latest version of lwf (222ad0e)? Older versions might have such kind of bugs.

from lwf.

cy-zhang-yekai avatar cy-zhang-yekai commented on September 3, 2024

i think i used lastest version lwf for unity....

from lwf.

HiroyukiHaga avatar HiroyukiHaga commented on September 3, 2024

I've updated one of the lwf demo projects to demonstrate splhack's solution.
Please take a look following example.

Source

Build

LWF.Movie attached_movie = 
    lwf.rootMovie.AttachMovie(
        linkage_name, // Symbol's linkage name in library
        instance_name,  // Attached movie name.
        enterFrame: enterFrameCallback // Callback that called every frame.
    );
void enterFrameCallback( LWF.Movie movie )
{
    if (movie.currentFrame == movie.totalFrames
        || !movie.playing) {

        message += movie.GetFullName() + " is done \n";
        lwf.rootMovie.DetachMovie( movie );
    }
}

13 06 13 18 38

from lwf.

cy-zhang-yekai avatar cy-zhang-yekai commented on September 3, 2024

thank you so much.it works!^^

from lwf.

HiroyukiHaga avatar HiroyukiHaga commented on September 3, 2024

I'm happy to hear that.
Closed.

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.