Flash animation doesn't play in krpano if i use as3 code to control it...

  • Hello,

    I can create flash plugin for kr pano.
    Actions and buttons work.

    When i create an animation on the time line, it plays in krpano in loop. Ok, everything is normal.

    But when i had a simple as3 code on the last frame of my animation :

    Code
    stop();

    It doesn't play anymore in krpano. But when published in flash, it plays normally and the animation stops at the end.

    I miss something ? Why my animation doesn't play in krpano if i add simple as3 code like "stop();" ? The "stop" is of course on last frame *wink*

    krpano 1.08 beta
    plugin : Flash 9 project

    Thank you...

  • hello vinyl...

    im not as expert as Klaus and many other coders here... hehe.. but then my suggestion is made a movieclips that contain ur animation, with action stop(); at the last timeline.

    and import it into firstframe..

    cheers..

  • Hello Bulp,

    Quote

    but then my suggestion is made a movieclips that contain ur animation, with action stop(); at the last timeline.

    Yes, it works this way :

    First, i create a swf file which will be the plugin called in krpano. Nothing on the scene. Just as3 code which loads a new swf. On the scene in the new swf, a movie clip with animation and a stop(); at the end.

    I tried to import dynamically my movie clip from the library but it didn't work in krpano (my animation is ok in loop but doesn't work with a stop(); at the end..

    I've look in the krpano as3 forum but i didn't see messages about this.

    Maybe animation has to be created only in as3 and not on the timeline ?

  • maybe i found a solutions for you....


    var ldr:Loader = new Loader();
    var urlReq:URLRequest = new URLRequest("swfs/balls.swf");
    ldr.load(urlReq);

    function loadHandler (event:Event)
    {
    var myClip:MovieClip = event.target.content;
    addChild(myClip);

    myClip.myBlueBalls.addEventListener(MouseEvent.ROLL_OVER, myClipOver);
    function myClipOver(event:MouseEvent):void
    {
    myClip.myBlueBalls.stop();
    }

    myClip.myBlueBalls.addEventListener(MouseEvent.ROLL_OUT, myClipOut);
    function myClipOut(event:MouseEvent):void
    {
    myClip.myBlueBalls.play();
    }

    myClip._click.addEventListener(MouseEvent.MOUSE_DOWN, MINmainbar);

    myClip._click.addEventListener(MouseEvent.ROLL_OUT, Out);
    function Out(event:MouseEvent):void
    {
    removeChild(myClip);
    }
    }
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loadHandler);

    id already try this.. and it works...

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!