Jump to content
Search Community

Cloud Media Lab last won the day on December 4 2012

Cloud Media Lab had the most liked content!

Cloud Media Lab

Business
  • Posts

    9
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Cloud Media Lab

  1. Hello all,

     

    Does anyone know a relatively easy way to transition from one tween to another? Sort of a soft / blended overwrite? That's a bad way of saying it, so I'll give an example.

     

    Assume the OverwriteManager is running in a default mode for TweenMax.

    I run a tween that sends a box from x:100 to x:500 over 3 seconds

     

    TweenMax.fromTo(box, 3, {x:100}, {x:500});

    2 seconds in, I send the box back to x:100. Maybe in real life this trigger by a user interaction that could happen at any time during the run of the tween above.

     

    TweenMax.to(box, 1, {x:100, delay:2});
    

     

    On screen, this will result in the box abruptly changing direction.

     

    Is there a generalized way to transition it dynamically, instead of the abrupt reversal? The box would travel to the right for 2 seconds, then when the new tween on x kicks in, it would decelerate, reverse direction, and arrive back at x:100 in the specified 1 second.

     

    I was thinking ThrowPropsPlugin, maybe. Any advice?

     

    -- Josh

     

     

  2. Hello GreenSock,

     

    Lately, I've been getting into some projects that combine the Flash display list, the Starling framework, and the Away3D framework.

     

    What a crazy mixed up world -- especially when it comes to rotation properties. As a Flash-based Stage3D framework, Away3D "sensibly" defaults to degrees (despite what some of my Unity guys might think of that). However, Starling kinda gums up the proverbial works by hopping to radians for expressions of rotation.

     

    Granted, if an AS3 developer is using matrix transforms on a regular basis, radians are going to make some sense.

     

    But for most Flash (and GreenSock) users migrating to Starling, this can be a challenge.

     

    Perhaps we could register a new plugin that provides "useRadians:true" at the level of simple rotation tweens. I've enjoyed the convenience of "useRadians" on both the ShortRotationPlugin and the BezierPlugin, but when it comes to simple rotations (especially where ShortRotation is not applicable), the only solution I found has been to create custom unit-converting "myRotation" getter/setter on the custom class.

     

    What is your suggestion? Maybe I'm missing something obvious, if so please rap my knuckle. Otherwise, might this call for a new plugin?

     

    such as...

    TweenMax.to(myStarlingSprite, 10, {radianRotation:{rotation:Math.PI*2}, repeat:-1, ease:Linear.easeNone}); // rotate the starling sprite '360 degrees' every 10 seconds

     

     

  3. Hello,

     

    I am using VideoLoader to load and play back MP4 files from an HTTP source. No big deal, used it many times in the past.

     

    My primary HTTP source (a custom CMS) fails to load in VideoLoader, but does work in the browser. VideoLoader gives an error:

     

    ----
    Error on VideoLoader 'video_1988_0' (http://______REDACTED_______/video/GetVideo?filename=1988_Majors_Video.mp4): NetStream.Play.StreamNotFound
    ----
    

     

    The other HTTP source, a simple web server, a temporary backup so I could show the client playback, works fine with both VideoLoader and the browser. No errors, playback is fine.

     

    A copy of the same MP4 file is in both places.

     

    I'm using the Member's v12 beta SWC from a couple days ago, trace LoaderMax version 1.931

     

    I need some direction on what might be different about these two sources, particularly in the context of error NetStream.Play.StreamNotFound

     

    I do not want to post the two URLs to the public, please PM me if you can offer any assistance and I will send both URLs.

     

     

    Thanks again...

  4. Great suggestion, it appears to be working well.

     

    Thanks! Snippets of code...

     

     

     

    video1buffer = new NativeSignal(video1, VideoLoader.VIDEO_BUFFER_FULL, LoaderEvent);
    video2buffer = new NativeSignal(video2, VideoLoader.VIDEO_BUFFER_FULL, LoaderEvent);
    video1buffered = false;
    video2buffered = false;
    
    video1.addEventListener(VideoLoader.VIDEO_COMPLETE, function(event:LoaderEvent):void {
    videoSeek(0);
    });
    
    videoSeek(0);
    
    
    
    public function videoSeek(time:Number):void {
    //Cc.info( "videoSeek("+time+")" );
    video1buffered = false;
    video2buffered = false;
    video1.pause();
    video2.pause();
    video1buffer.addOnce(videoBuffered);
    video2buffer.addOnce(videoBuffered);
    video1.gotoVideoTime(time);
    video2.gotoVideoTime(time);
    }
    
    public function videoBuffered(event:LoaderEvent):void {
    if (event.target == video1) video1buffered = true;
    if (event.target == video2) video2buffered = true;
    if (video1buffered && video2buffered) {
    video1.playVideo();
    video2.playVideo();
    }
    }

    • Like 1
  5. I have two videos of identical length that I need to play in sync.

     

    Occasionally they do loop in sync but are most often offset by some small amount. Unfortunately this is very noticeable in my application.

     

    example:

    video1.addEventListener(VideoLoader.VIDEO_COMPLETE, function():void {
    video1.gotoVideoTime(0, true);
    video2.gotoVideoTime(0, true);
    });
    

     

    Any suggestions, please?

×
×
  • Create New...