Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

seddass

Members
  • Posts

    2
  • Joined

  • Last visited

seddass's Achievements

0

Reputation

  1. [sOLVED] IMPORTANT: When using GS with require.js dont override the GS variables like that: define(['ScrollToPlugin', 'TweenLite', 'TimelineLite'], function(ScrollToPlugin, TweenLite, TimelineLite) { // your code here }) Hello, I am doing something weird probably because I cant add Tween to Timeline. var tw = TweenLite.to(window, 0.7, {scrollTo:{y: 300}, ease:Power3.easeInOut}); console.log(tw); var tl = new TimelineLite(); tl.add( tw ); and the same when testing this way: var tl = new TimelineLite(); tl.add( TweenLite.to(window, 0.7, {scrollTo:{y: 300}, ease:Power3.easeInOut}) ); Both ways I see the error: Uncaught Cannot add [object Object] into the timeline; it is not a tween, timeline, function, or string. The output from console.log(tw) begins with: Object {vars: Object, _totalDuration: 0.7, _duration: 0.7, _delay:0, _timeScale: 1…} _active: false _delay: 0 _duration: 0.7 _ease: Object _easePower: 3 _easeType: 3 _firstPT: Object It looks like a tween anyway.. What I am doing wrong? Same code in jsFiddle is working fine. Pls. help with a hint. EDIT: I am loading all .js files with require.js (AMD loader). What is the correct way of loading GS plugins with require.js shim?
  2. Hello guys, I have searched a lot in the forum and I have spend hours but I still cant find the answer. The question is.. How to remove/kill/unload/dispose/erase VideoLoader when the video is buffering? My problem is when I load a video in VideoLoader and while the video is still buffering and i call video unload() and/or dispose(true) the sound of the video start playing after all. Below is my code I am using. If I call disposeVideo() WHILE the video is buffering.. the sound of the video starts to play in a background after the video is buffered. Probably it is not only the sound that is played. Hope for help. Thanks. function loadVideo():void { var videoConfig : Object = {name:"HomeVideo", width:506, height:285, scaleMode:"stretch", bgColor:0x000000, autoPlay:false, volume:0}; _video = new VideoLoader("myVideo.flv", videoConfig); _video.load(); _video.gotoVideoTime(0, true); ... added some listeners... } function disposeVideo() : void { if (_video.videoPaused) reinitPlayPause(); TweenMax.to(preloader_mc, 0.2, {autoAlpha:0, onComplete:preloader_mc.stop}); TweenMax.to(_video.content, 0.2, {autoAlpha:0}); _video.removeEventListener(VideoLoader.VIDEO_BUFFER_FULL, bufferFullHandler); _video.removeEventListener(NetStatusEvent.NET_STATUS, onNetStatusChange); videoContainer_mc.removeChild(_video.content); TweenMax.to(_video, 0.2, {volume:0, onComplete: function():void { _video.pauseVideo(); _video.unload(); _video.dispose(true); }}); }
×