Jump to content
GreenSock

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

jimmyneutron

Members
  • Posts

    10
  • Joined

  • Last visited

jimmyneutron's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Yes. See Class SWFLoader in API Documentation http://www.greensock.com/as/docs/tween/ You can use getSWFChild to control the content of loader, your SWF
  2. Hello, i'm using the latest version of GreenSock as3 (11/11/11) and VideoLoader class : ScaleMode don't work. Videos are always "STRETCH". For example : var videoloader:VideoLoader = new VideoLoader( "video.mp4", { container:this, width:300, height:500, scaleMode:"proportionalInside", name:"video", bgColor:0xff0000, bgAlpha:1 } ); I tried with mp4, flv, f4v. Same results. Thanks for help.
  3. Hello GreenSock community I wish to know why to use ContentDisplay with DisplayObject properties but not with methods, in particular addChild(). In fact, I'm doing a Coverflow with TimelineMax, TweenLite and with the LoaderMax, I wish to add a MovieClip into the ContentDisplay (a Sprite) who was created by ImageLoader. And use this MovieClip to check progression of loader. For this time i put ImageLoaders into a new Sprite()... I think it'll be more quickly if we could use directly ContentDisplay for this. Thanks for answers.
  4. I had think well It's good. I choose this option. I think it's a good idea ... perhaps just for me if I forget it // Oh, you have read my mail about an error in the example code of PathFollower ... you write Circle2D, but the class is CirclePath2D
  5. Don't be sorry. Could you explain the process? I didn't see anything about this subject in AS Doc or Trip & Tricks. If child of timelineLite is append/prepend on the same level, it play. But if child is declared in an other function or after ... timelineLite is paused ? Or there is a delay before it be paused. Again ... sorry for bad level in english
  6. Ok ... i solved my trouble by using {paused:true} for TimelineLite and play() when i used appendMultiple() ... it's allright My source ... (...) var imgToLoad:XMLList = new XMLList(); var imgToLoadNum:uint = new uint(); var t:Array = new Array(); addChild(fond); fond.addChild(bg); bg.alpha = 0; var timeline:TimelineLite = new TimelineLite( { paused:true, onComplete:timeLineComplete } ); function timeLineComplete():void { if ( imgToLoadNum == 0 ) { timeline.restart(); } } var loaderMax:LoaderMax = new LoaderMax( { name:"loader", maxConnections:1 } ); loaderMax.append( new XMLLoader( "config.php", { name:"xmlConfig", onComplete:xmlConfigComplete } ) ); loaderMax.load(); function xmlConfigComplete( e:LoaderEvent ):void { imgToLoad = e.target.content.background.image; imgToLoadNum = imgToLoad.length(); for each ( var url in imgToLoad ) { loaderMax.append( new ImageLoader( url, { centerRegistration:true, onComplete:imgComplete } ) ); } loaderMax.load(); } function imgComplete( e:LoaderEvent ):void { if ( timeline.getChildren().length ) { timeline.append( TweenLite.to( bg, 2, { alpha:0, ease:Cubic.easeOut } ) ); } t = timeline.appendMultiple([ TweenLite.to( bg, 2, { alpha:1, ease:Cubic.easeOut, onStart:onStartTween, onStartParams:[e.target.name] } ), TweenLite.to( bg, 4, { scaleX:1.05, scaleY:1.05, ease:Cubic.easeOut } ), TweenLite.to( bg, 5, { x:randomInRange( 10, 50 ), ease:Cubic.easeOut } ) ]); imgToLoadNum--; if ( imgToLoadNum == 0 ) { timeline.append( TweenLite.to( bg, 2, { alpha:0, ease:Cubic.easeOut } ) ); } timeline.play(); } function onStartTween( imageLoaderName ):void { bg.x = 0; bg.scaleX = 1; bg.scaleY = 1; if( bg.numChildren > 0 ) bg.removeChildAt( 0 ); bg.addChild( loaderMax.getContent( imageLoaderName ) ); t[2] = TweenLite.to( bg, 5, { x:randomInRange( 10, 50 ), ease:Cubic.easeOut } ); } function randomInRange( start:int = 0, end:int = 10, useNegative:Boolean = true ):int { var r:int = Math.floor( Math.random() * ( 1 + start - end ) ) + end; if ( useNegative && Math.random() < 0.5 ) r = -r; return r; } if no Tween is added after Timeline's constructor ... must call play () method ?
  7. If I insert another TweenLite before the first Tween in appendMultiple's array, my tweens are functionnal... ???
  8. Hello, thanks for sources and docs... I'm using LoaderMax, ImageLoader, TweenLite and TimelineLite ... But for the first image, the first tweenlite in my timelineLite don't work !? I used onInit to set properties like alpha, x, ... and onStart to change image on my sprite because i wish restart the timeline onComplete... May be you could help me ... Thanks var bg:Sprite = new Sprite(); addChild(bg); var timeline:TimelineLite = new TimelineLite( { onComplete:timeLineComplete } ); function timeLineComplete():void { timeline.restart(); } var loaderMax:LoaderMax = new LoaderMax( { name:"loader", maxConnections:1 } ); loaderMax.append( new XMLLoader( "config.php", { name:"xmlConfig", onComplete:xmlConfigComplete } ) ); loaderMax.load(); function xmlConfigComplete( e:LoaderEvent ):void { imgToLoad = e.target.content.background.image; for each ( var url in imgToLoad ) { loaderMax.append( new ImageLoader( url, { onComplete:imgComplete } ) ); } loaderMax.load(); } function imgComplete(e:LoaderEvent):void { (...) timeline.appendMultiple ([ [b]TweenLite.to(bg, 5, {alpha:1, ease:Cubic.easeOut, onInit:onInitTween, onStart:onStartTween, onStartParams:[e.target.name]}),[/b] TweenLite.to(bg, 5, {x:50, ease:Cubic.easeOut}), TweenLite.to(bg, 4, {scaleX:1.05, scaleY:1.05, ease:Cubic.easeOut}) ]); (...) } function onInitTween( ):void { (...) bg.alpha = 0; bg.x = 0; bg.scaleX = 1; bg.scaleY = 1; } function onStartTween( imageLoaderName ):void { (...) bg.addChild( loaderMax.getContent( imageLoaderName ) ); }
×