Jump to content
Search Community

lanawylma

Members
  • Posts

    10
  • Joined

  • Last visited

Posts posted by lanawylma

  1. Hi All,

     

    I have simple movie that plays a video per press of the button, than upon completion has replay and close options. Everything works fine. My only question is - how do I add a skin (SkinOverPlaySeekStop.swf) to the player? I know how to do that with regular FLV playback syntax - however, don't know how to do that with loaderMax? any help would be super appreciated!! Below is the code:

     

     

    import com.greensock.*;

    import com.greensock.loading.VideoLoader;

    import flash.display.SimpleButton;

    import flash.events.MouseEvent;

     

    // Close Button cross

    var ButtonCloseCross:Close_cross_btn = new Close_cross_btn();

     

    // last buttons

    var close_btn:Close_btn = new Close_btn();

    var replay_btn:Replay_btn = new Replay_btn();

     

    // Video Loader

    var Video_test:VideoLoader = new VideoLoader("video.f4v", {container:this, x:0, y:0});

     

    // Video Complete Event Listeners

    Video_test.addEventListener(VideoLoader.VIDEO_COMPLETE, donePlaying);

     

    // Button Close Cross EVent listner

    ButtonCloseCross.addEventListener(MouseEvent.MOUSE_DOWN, closeVideo);

     

    // Play Video Event Listener

    play_video_btn.addEventListener(MouseEvent.MOUSE_DOWN, playVideo);

     

    // Play Video

    function playVideo(event:MouseEvent):void {

    Video_test.load();

    this.addChild(Video_test.content);

    Video_test.playVideo();

    addChild(ButtonCloseCross);

    ButtonCloseCross.x = 753;

    ButtonCloseCross.y = 4;

    }

     

    function donePlaying(e:Event):void {

    addChild(close_btn);

    addChild(replay_btn);

    close_btn.x = 389.5;

    close_btn.y = 164.85;

    replay_btn.x = 213.5;

    replay_btn.y = 164.85;

    }

     

    // Close Video

    function closeVideo(event:MouseEvent):void {

    Video_test.unload();

    removeChild(ButtonCloseCross);

    if(contains(close_btn)) removeChild(close_btn);

    if(contains(replay_btn)) removeChild(replay_btn);

    }

     

    Thanks a bunch ahead of time!

     

    Lana

  2. Hi All,

     

    I'm very new to Greensock and would really appreciate your help on the following... In my animation, I'm adding the following timeLine:

     

    timeline.appendMultiple([

    TweenLite.to(breathe_mc, 1, {alpha:1,y:117,ease:CustomEase.byName("myCustomEase2")}),

    TweenLite.to(live_mc, 1, {alpha:1,y:117, y:37, ease:CustomEase.byName("myCustomEase2")}),

    TweenLite.to(sleep_mc, 1, {alpha:1,y:77, ease:CustomEase.byName("myCustomEase2")}),

    TweenLite.to(feel_mc, 1, {alpha:1,y:77, ease:CustomEase.byName("myCustomEase2")})],1,TweenAlign.START, .2);

     

    What I need to do is have the whole sequence delayed... however, I don't know where to insert it... Any help would be super appreciated!!

     

    Thanks in advance!

  3. Hi All,

     

     

    I'm working on an animation that utilizes TweenLite and LoaderMax, It plays 4 videos, depending on which button is pressed. Button 1 plays Video 2, Button 2 plays Video2 and so on.

     

    the issue that I'm running into is that once a particular video has played, I can navigate with breathe_mc.video_btn, live_mc.video_btn and so on, and play other videos, however, if I click to play the same video again, the whole movie freezes. So - it doesn't play the video 2nd time or even allow me do anyting else. So basically, The Video Buttons load and play the video once clicked, but if, after the video played and unloaded, I want to play the same video - the whole movie freezes.. Hope this makes sense... Thanks a bunch ahead of time!! Below is the Code:

     

    import com.greensock.*;

    import com.greensock.easing.*;

    import com.greensock.easing.CustomEase;

    import com.greensock.loading.VideoLoader;

    import flash.display.Sprite;

    import com.greensock.events.LoaderEvent;

    import flash.display.MovieClip;

    import flash.display.SimpleButton;

    import flash.events.MouseEvent;

     

     

    //Last Buttons Variables

    var close_btn:Button_close = new Button_close();

    var learn_more_btn:Button_learn_more = new Button_learn_more();

    var replay_btn:Button_replay = new Button_replay();

     

     

     

    // Video Variables

    var Video_Breathe:VideoLoader = new VideoLoader("Breathe_Video.f4v",{container:this,

    x:0, y:0});

    var Video_Live:VideoLoader = new VideoLoader("Live_Video.f4v",{conainer:this,

    x:0, y:0});

    var Video_Sleep:VideoLoader = new VideoLoader("Sleep_Video.f4v",{conainer:this,

    x:0, y:0});

    var Video_Feel:VideoLoader = new VideoLoader("Feel_Video.f4v",{conainer:this,

    x:0, y:0});

     

     

    // Video complete Event Listeners

    Video_Breathe.addEventListener(VideoLoader.VIDEO_COMPLETE, donePlaying_breathe);

    Video_Live.addEventListener(VideoLoader.VIDEO_COMPLETE, donePlaying_live);

    Video_Sleep.addEventListener(VideoLoader.VIDEO_COMPLETE, donePlaying_sleep);

    Video_Feel.addEventListener(VideoLoader.VIDEO_COMPLETE, donePlaying_feel);

     

    OverwriteManager.init(OverwriteManager.AUTO);

     

     

    //Buttons Invisible

    breathe_mc.learn_btn.visible = false;

    breathe_mc.video_btn.visible = false;

    live_mc.learn_btn.visible = false;

    live_mc.video_btn.visible = false;

    sleep_mc.learn_btn.visible = false;

    sleep_mc.video_btn.visible = false;

    feel_mc.learn_btn.visible = false;

    feel_mc.video_btn.visible = false;

     

     

     

    //Custom Eases

    CustomEase.create("myCustomEase", [{s:0,cp:1.14999,e:1.4},{s:1.4,cp:1.65,e:1}]);

    CustomEase.create("myCustomEase2",[{s:0,cp:0.97,e:1.22},{s:1.22,cp:1.4 7,e:1}]);

     

     

    var timeline:TimelineLite = new TimelineLite({onComplete:showBreathe});

    addChild(removeChild(better_mc));

     

     

    TweenLite.to(better_mc,2,{alpha:1, y:186.6,ease:Bounce.easeOut});

     

     

    timeline.appendMultiple([

    TweenLite.to(breathe_mc, 1, {alpha:1,y:117,ease:CustomEase.byName("myCustomEase2")}),

    TweenLite.to(live_mc, 1, {alpha:1,y:117, y:37, ease:CustomEase.byName("myCustomEase2")}),

    TweenLite.to(sleep_mc, 1, {alpha:1,y:77, ease:CustomEase.byName("myCustomEase2")}),

    TweenLite.to(feel_mc, 1, {alpha:1,y:77, ease:CustomEase.byName("myCustomEase2")})],1,TweenAlign.START, .2);

     

     

    function showBreathe():void

    {

     

    breathe_mc.learn_btn.visible = true;

    breathe_mc.video_btn.visible = true;

    TweenLite.to(breathe_mc.learn_btn, .5, {alpha:1});

    TweenLite.to(breathe_mc.video_btn, .5, {alpha:1});

     

     

    TweenLite.to(breathe_mc, 1, {y:77, ease:CustomEase.byName("myCustomEase")});

     

    //Show Text

    TweenLite.to(breathe_txt_mc, 1,{alpha:1});

    }

     

     

    //Event Listeners

    breathe_mc.addEventListener(MouseEvent.MOUSE_OVER, breatheOpen);

    live_mc.addEventListener(MouseEvent.MOUSE_OVER, liveOpen);

    sleep_mc.addEventListener(MouseEvent.MOUSE_OVER, sleepOpen);

    feel_mc.addEventListener(MouseEvent.MOUSE_OVER, feelOpen);

     

     

     

    //Event Listeners for Playing Video

    breathe_mc.video_btn.addEventListener(MouseEvent.MOUSE_DOWN, breathe_play_video);

    live_mc.video_btn.addEventListener(MouseEvent.MOUSE_DOWN, live_play_video);

    sleep_mc.video_btn.addEventListener(MouseEvent.MOUSE_DOWN, sleep_play_video);

    feel_mc.video_btn.addEventListener(MouseEvent.MOUSE_DOWN, feel_play_video);

     

     

    // Event Listener for Close Video

    close_btn.addEventListener(MouseEvent.MOUSE_DOWN, closeVideo);

     

     

    //Functions for VIDEO and LEARN MORE buttons

    function breathe_play_video(event:MouseEvent):void {

    Video_Breathe.load();

    this.addChild(Video_Breathe.content);

    }

     

     

    function live_play_video(event:MouseEvent):void {

    Video_Live.load();

    this.addChild(Video_Live.content);

    }

     

    function sleep_play_video(event:MouseEvent):void {

    Video_Sleep.load();

    this.addChild(Video_Sleep.content);

    }

     

    function feel_play_video(event:MouseEvent):void {

    Video_Feel.load();

    addChild(Video_Feel.content);

    }

     

     

     

    function closeVideo(event:MouseEvent):void {

    Video_Breathe.unload();

    Video_Sleep.unload();

    Video_Feel.unload();

    Video_Live.unload();

    removeChild(close_btn);

    removeChild(learn_more_btn);

    removeChild(replay_btn);

     

     

    }

     

    // Last Breathe Buttons Added to Stage

    function donePlaying_breathe(e:Event):void {

     

    addChild(close_btn);

    addChild(learn_more_btn);

    addChild(replay_btn)

    close_btn.x = 313;

    close_btn.y = 183;

    learn_more_btn.x = 434;

    learn_more_btn.y = 183;

    replay_btn.x = 554;

    replay_btn.y = 183;

    }

     

     

    // Last Live Buttons

    function donePlaying_live(e:Event):void {

     

    addChild(close_btn);

    addChild(learn_more_btn);

    addChild(replay_btn)

    close_btn.x = 43;

    close_btn.y = 183;

    learn_more_btn.x = 164;

    learn_more_btn.y = 183;

    replay_btn.x = 284;

    replay_btn.y = 183;

    }

     

     

    // Last Sleep Buttons

    function donePlaying_sleep(e:Event):void {

     

    addChild(close_btn);

    addChild(learn_more_btn);

    addChild(replay_btn)

    close_btn.x = 43;

    close_btn.y = 183;

    learn_more_btn.x = 164;

    learn_more_btn.y = 183;

    replay_btn.x = 284;

    replay_btn.y = 183;

    }

     

     

    //Last Feel Buttons

    function donePlaying_feel(e:Event):void {

     

    addChild(close_btn);

    addChild(learn_more_btn);

    addChild(replay_btn)

    close_btn.x = 83;

    close_btn.y = 183;

    learn_more_btn.x = 204;

    learn_more_btn.y = 183;

    replay_btn.x = 324;

    replay_btn.y = 183;

    }

     

     

     

     

     

    // Functions Breathe

    function breatheOpen(event:MouseEvent):void

    {

    TweenLite.to(breathe_mc, 1, {y:77, ease:Elastic.easeOut});

     

    TweenLite.to(breathe_mc.learn_btn, .5, {alpha:1});

    TweenLite.to(breathe_mc.video_btn, .5, {alpha:1});

     

    //Close Live

    TweenLite.to(live_mc, 1, {y:117, ease:Elastic.easeOut});

    TweenLite.to(live_mc.learn_btn, .5, {alpha:0});

    TweenLite.to(live_mc.video_btn, .5, {alpha:0});

     

    //Close Sleep

    TweenLite.to(sleep_mc, 1, {y:77, ease:Elastic.easeOut});

    TweenLite.to(sleep_mc.learn_btn, .5, {alpha:0});

    TweenLite.to(sleep_mc.video_btn, .5, {alpha:0});

     

    //Close Feel

    TweenLite.to(feel_mc, 1, {y:77, ease:Elastic.easeOut});

    TweenLite.to(feel_mc.learn_btn, .5, {alpha:0});

    TweenLite.to(feel_mc.video_btn, .5, {alpha:0});

     

    //Show Pic

    TweenLite.to(pic_breathe_mc, .5, {alpha:1});

     

    //Hide Other Pics

    TweenLite.to(pic_live_mc, .5, {alpha:0});

    TweenLite.to(pic_sleep_mc, .5, {alpha:0});

    TweenLite.to(pic_feel_mc, .5, {alpha:0});

     

    //Show Text

    TweenLite.to(breathe_txt_mc, 1,{alpha:1});

     

    //Hide Other Text

    TweenLite.to(live_txt_mc, 1,{alpha:0});

    TweenLite.to(sleep_txt_mc, 1,{alpha:0});

    TweenLite.to(feel_txt_mc, 1,{alpha:0});

    }

     

     

    // Functions live

    function liveOpen(event:MouseEvent):void

    {

    TweenLite.to(live_mc, 1, {y:77, ease:Elastic.easeOut});

     

    live_mc.learn_btn.visible = true;

    live_mc.video_btn.visible = true;

    TweenLite.to(live_mc.learn_btn, .5, {alpha:1});

    TweenLite.to(live_mc.video_btn, .5, {alpha:1});

     

    //Close Breathe

    TweenLite.to(breathe_mc, 1, {y:117, ease:Elastic.easeOut});

    TweenLite.to(breathe_mc.learn_btn, .5, {alpha:0});

    TweenLite.to(breathe_mc.video_btn, .5, {alpha:0});

     

    //Close Sleep

    TweenLite.to(sleep_mc, 1, {y:77, ease:Elastic.easeOut});

    TweenLite.to(sleep_mc.learn_btn, .5, {alpha:0});

    TweenLite.to(sleep_mc.video_btn, .5, {alpha:0});

     

    //Close Feel

    TweenLite.to(feel_mc, 1, {y:77, ease:Elastic.easeOut});

    TweenLite.to(feel_mc.learn_btn, .5, {alpha:0});

    TweenLite.to(feel_mc.video_btn, .5, {alpha:0});

     

    //Show Pic

    TweenLite.to(pic_live_mc, .5, {alpha:1});

     

    //Hide Other Pics

    TweenLite.to(pic_sleep_mc, .5, {alpha:0});

    TweenLite.to(pic_feel_mc, .5, {alpha:0});

     

    //Show Text

    TweenLite.to(live_txt_mc, 1,{alpha:1});

     

    //Hide Other Text

    TweenLite.to(breathe_txt_mc, 1,{alpha:0});

    TweenLite.to(sleep_txt_mc, 1,{alpha:0});

    TweenLite.to(feel_txt_mc, 1,{alpha:0});

    }

     

     

     

    // Functions sleep

    function sleepOpen(event:MouseEvent):void

    {

    TweenLite.to(sleep_mc, 1, {y:37, ease:Elastic.easeOut});

     

    sleep_mc.learn_btn.visible = true;

    sleep_mc.video_btn.visible = true;

    TweenLite.to(sleep_mc.learn_btn, .5, {alpha:1});

    TweenLite.to(sleep_mc.video_btn, .5, {alpha:1});

     

    //Close Breathe

    TweenLite.to(breathe_mc, 1, {y:117, ease:Elastic.easeOut});

    TweenLite.to(breathe_mc.learn_btn, .5, {alpha:0});

    TweenLite.to(breathe_mc.video_btn, .5, {alpha:0});

     

    //Close Live

    TweenLite.to(live_mc, 1, {y:117, ease:Elastic.easeOut});

    TweenLite.to(live_mc.learn_btn, .5, {alpha:0});

    TweenLite.to(live_mc.video_btn, .5, {alpha:0});

     

    //Close Feel

    TweenLite.to(feel_mc, 1, {y:77, ease:Elastic.easeOut});

    TweenLite.to(feel_mc.learn_btn, .5, {alpha:0});

    TweenLite.to(feel_mc.video_btn, .5, {alpha:0});

     

    //Show Pic

    TweenLite.to(pic_sleep_mc, .5, {alpha:1});

     

    //Hide Other Pics

    TweenLite.to(pic_feel_mc, .5, {alpha:0});

     

    //Show Text

    TweenLite.to(sleep_txt_mc, 1,{alpha:1});

     

    //Hide Other Text

    TweenLite.to(live_txt_mc, 1,{alpha:0});

    TweenLite.to(breathe_txt_mc, 1,{alpha:0});

    TweenLite.to(feel_txt_mc, 1,{alpha:0});

    }

     

     

    // Functions feel

    function feelOpen(event:MouseEvent):void

    {

    TweenLite.to(feel_mc, 1, {y:37, ease:Elastic.easeOut});

     

    feel_mc.learn_btn.visible = true;

    feel_mc.video_btn.visible = true;

    TweenLite.to(feel_mc.learn_btn, .5, {alpha:1});

    TweenLite.to(feel_mc.video_btn, .5, {alpha:1});

     

     

     

    //Close Breathe

    TweenLite.to(breathe_mc, 1, {y:117, ease:Elastic.easeOut});

    TweenLite.to(breathe_mc.learn_btn, .5, {alpha:0});

    TweenLite.to(breathe_mc.video_btn, .5, {alpha:0});

     

    //Close Live

    TweenLite.to(live_mc, 1, {y:117, ease:Elastic.easeOut});

    TweenLite.to(live_mc.learn_btn, .5, {alpha:0});

    TweenLite.to(live_mc.video_btn, .5, {alpha:0});

     

    //Close Sleep

    TweenLite.to(sleep_mc, 1, {y:77, ease:Elastic.easeOut});

    TweenLite.to(sleep_mc.learn_btn, .5, {alpha:0});

    TweenLite.to(sleep_mc.video_btn, .5, {alpha:0});

     

    //Show Pic

    TweenLite.to(pic_feel_mc, .5, {alpha:1});

     

    //Show Text

    TweenLite.to(feel_txt_mc, 1,{alpha:1});

     

    //Hide Other Text

    TweenLite.to(live_txt_mc, 1,{alpha:0});

    TweenLite.to(sleep_txt_mc, 1,{alpha:0});

    TweenLite.to(breathe_txt_mc, 1,{alpha:0});

     

    }

  4. Hi All,

     

    I loaded a Video on Button click with Loader Max, what I would like to do, is place a replay button when the video is done playing.. but I'm not sure where to insert it.. any help would be very appreciated!! Here's the code:

     

    var videoTest:VideoLoader = new VideoLoader("Breathe_Video.f4v",{container:this,

    x:0, y:0});

     

    function breathe_play_video(event:MouseEvent):void {

     

    videoTest.load();

    this.addChild(videoTest.content);

    addChild(close_btn);

    close_btn.x = 930;

    close_btn.y = 0;

     

    }

     

    Thank you!

  5. Hi..

     

    I'm having a problem with onComplete at the end of the array. It gives me the following error: 1084: Syntax error: expecting rightparen before colon.

     

    import com.greensock.*;

    import com.greensock.easing.*;

    import com.greensock.easing.CustomEase;

     

    CustomEase.create("myCustomEase", [{s:0,cp:1.14999,e:1.4},{s:1.4,cp:1.65,e:1}]);

     

    var timeline:TimelineLite = new TimelineLite();

    addChild(removeChild(better_mc));

     

    TweenLite.to(better_mc,2,{alpha:1, y:156.6,ease:Bounce.easeOut});

     

    timeline.appendMultiple([

    TweenLite.to(breathe_mc, 1, {alpha:1,y:117,ease:CustomEase.byName("myCustomEase")}),

    TweenLite.to(live_mc, 1, {alpha:1,y:117, y:37, ease:CustomEase.byName("myCustomEase")}),

    TweenLite.to(sleep_mc, 1, {alpha:1,y:77, ease:CustomEase.byName("myCustomEase")}),

    TweenLite.to(feel_mc, 1, {alpha:1,y:77, ease:CustomEase.byName("myCustomEase")})],1,TweenAlign.START, .2, onComplete: testFunction);

     

    function testFunction():void

    {

    trace("test");

    }

     

     

    Thanks a bunch ahead of time!

  6. Hi All,

     

    I'm super new to TweenLite, used for first time yest..

     

    I have a simple animation array where my MCs show up one at a time.. but what I would like to do is for them to go Higher than drop back down, making like a wave effect and after they all showed up with that effect, have one of them go back up..

     

    the problem I"m having is that with TweenLite I can only have them go to one direction.. do I need to write a 2nd code onComplete for the MCs to go back down or is there and easeing technique I can use? Also, my onComplete function doesn't work.. gives me a Syntax error: expecting rightparen before colon.. Thanks a bunch for your help ahead of time! Here's the code:

     

    import com.greensock.*;

    import com.greensock.easing.*;

    import flash.events.MouseEvent;

     

    var timeline:TimelineLite = new TimelineLite();

    addChild(removeChild(better_mc));

     

    TweenLite.to(better_mc,2,{alpha:1, y:156.6,ease:Bounce.easeOut});

     

    timeline.appendMultiple([TweenLite.to(breathe_mc, 1, {alpha:1,y:77,ease:Bounce.easeInOut}),

    TweenLite.to(live_mc, 1, {alpha:1,y:77, ease:Bounce.easeInOut}),

    TweenLite.to(sleep_mc, 1, {alpha:1,y:37, ease:Bounce.easeInOut}),

    TweenLite.to(feel_mc, 1, {alpha:1,y:37, ease:Bounce.easeInOut})],1,TweenAlign.START, .2, onComplete:doThis);

     

    function doThis():void

    {

    trace("test");

    }

     

     

     

×
×
  • Create New...