en en en en en en en en en en en en en en en en fa en en fr hbs_lat en en en es en en en ms en de en fr en en en ca en en en en en en en en en en en fr en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en fr en en en en fr en en en en fr en en en en fr en en en en en en en en hu en en en en en it en nl en it en en en hu en eu en en en en en en en fr cv es tr es en en en en ms en en en en en en fr en hbs_lat en en en en en en en fr cv es tr es en en en en de en en en ca en en en en en
vmedium replied to vmedium's topic in TransformManager (Flash)
vmedium posted a topic in TransformManager (Flash)
vmedium replied to vmedium's topic in TransformManager (Flash)
var t:TimelineMax = new TimelineMax({onComplete:transitionInComplete}); t.append(TweenMax.from(bottom, 0.5, {y:"400", onComplete:pinTheNav})); t.appendMultiple(TweenMax.allFrom([logo, nav, consoles], 0.5, {y:"400", ease:Strong.easeOut}, 0.1)); function pinTheNav() { pin = new DynamicPinPoint(bottom, getBottomCenter); pin.attach(logo); pin.attach(nav); function getBottomCenter():Point { var bounds:Rectangle = bottom.getBounds(bottom); return new Point(bounds.x + bounds.width / 2, bounds.y + 50); } } is this the best way to work with tweening and pins?
DynamicPinPoint and an allFrom
vmedium replied to vmedium's topic in TransformManager (Flash)
I've figured out that by tweening something, that I'm dynamically pinning - it changes where that pin is. ie: im tweening bottom, and trying to pin to bottom. I just want to be able to 1) put things in their right place 2) do a from tween 3) and have them pinned
DynamicPinPoint and an allFrom
vmedium posted a topic in TransformManager (Flash)
var ls:LiquidStage = new LiquidStage(this.stage, 1920, 1080, 853, 480); var area:LiquidArea = new LiquidArea(this, 0, 0, 1920, 1080, 0x0000ff); area.attach(bottom, ScaleMode.PROPORTIONAL_INSIDE, AlignMode.CENTER, AlignMode.BOTTOM); var pin:DynamicPinPoint = new DynamicPinPoint(bottom, getLocation); pin.attach(logo); pin.attach(nav); function getLocation():Point { var bounds:Rectangle = bottom.getBounds(bottom); return new Point(bounds.x + bounds.width / 2, bounds.y + 50); } var p:Point = pin.toLocal(logo.parent); logo.x = nav.x = p.x; logo.y = nav.y = p.y; var t:TimelineMax = new TimelineMax({onComplete:transitionInComplete}); t.appendMultiple(TweenMax.allFrom([bottom, logo, nav], 0.5, {y:"400", ease:Strong.easeOut}, 0.1)); The tween works and doesn't break the 'bottom' clip... but the 'logo' and the 'nav' clips both end up in the wrong place... what is the proper order for putting something in it's place, then tweening it from some relative value? Best, vmedium
Using Tween Nano like TimelineLite (usually for banners)
vmedium posted a topic in GSAP (Flash)
I devised this method of sequencing tweens in a 40k banner that had so much **** in it I couldn't use timelineLite or even tweenLite... so i thought I would share. Anyone else do anything like this to simulate the flexibility of the 'append' method? http://snipt.net/vmedium/using-tween-na ... melinelite (check my snipt for other things you may want to CMD+C,V) import com.greensock.TweenNano; import com.greensock.easing.*; //cloud setup TweenNano.from(bg, 0.2, {_alpha:0}); TweenNano.to(cFront, 14, {_x:-100, ease:Linear.easeNone}); TweenNano.to(cMid, 14, {_x:150, ease:Linear.easeNone}); TweenNano.to(cBack, 14, {_x:100, ease:Linear.easeNone}); //f1 TweenNano.from(can, 0.8, {_y:"-200", ease:Strong.easeOut}); TweenNano.from(t1, 0.5, {_alpha:0, delay:0.5}); var durA = 2.5; //f2 TweenNano.to(t1, 0.5, {_alpha:0, delay:durA-0.5}); TweenNano.from(t2, 0.5, {_xscale:0, _yscale:0, _y:"50", delay:durA}); TweenNano.from(shield, 0.4, {_xscale:0, _yscale:0, delay:durA+0.2}); TweenNano.from(ll, 0.4, {_x:"50", _alpha:0, delay:durA+0.2}); TweenNano.from(lr, 0.4, {_x:"-50", _alpha:0, delay:durA+0.2}); TweenNano.from(banner, 0.4, {_alpha:0, delay:durA+0.8}); TweenNano.from(thumb, 0.5, {_alpha:0, delay:durA+1.2}); var durB = durA + 2.5; //f1 out f3 in TweenNano.to(ll, 0.4, {_alpha:0, delay:durB}); TweenNano.to(lr, 0.4, {_alpha:0, delay:durB}); TweenNano.to(shield, 0.4, {_xscale:150, _yscale:150, _y:"10", delay:durB}); TweenNano.from(cl, 0.4, {_x:"50", _alpha:0, delay:durB+0.2}); TweenNano.from(cr, 0.4, {_x:"-50", _alpha:0, delay:durB+0.2}); TweenNano.from(t3, 0.5, {_alpha:0, delay:durB}); var durC = durB + 2.5; //f4 out TweenNano.to(t2, 0.5, {_xscale:0, _yscale:0, _y:"50", delay:durC}); TweenNano.to(shield, 0.4, {_xscale:0, _yscale:0, delay:durC+0.2}); TweenNano.to(cl, 0.4, {_x:"50", _alpha:0, delay:durC+0.2}); TweenNano.to(cr, 0.4, {_x:"-50", _alpha:0, delay:durC+0.2}); TweenNano.to(banner, 0.2, {_alpha:0, delay:durC+0.4}); TweenNano.to(thumb, 0.2, {_alpha:0, delay:durC+0.4}); TweenNano.to(can, 0.8, {_y:"-200", delay:durC+0.4, ease:Strong.easeOut}); TweenNano.to(t3, 0.5, {_alpha:0, delay:durC}); var durD = durC + 1; //f5 in TweenNano.from(logo, 0.8, {_alpha:0, delay:durD}); TweenNano.from(t4, 0.5, {_alpha:0, delay:durD+0.2}); TweenNano.from(hr, 0.5, {_alpha:0, delay:durD+1.2}); TweenNano.from(t6, 0.5, {_alpha:0, delay:durD+1.4}); var durE = durD + 3; //f5 out TweenNano.to(t4, 0.3, {_alpha:0, delay:durE}); TweenNano.to(t6, 0.3, {_alpha:0, delay:durE+0.2}); var durF = durE + 0.5; //f6 in TweenNano.from(t7, 0.5, {_alpha:0, delay:durF});
Tween Error #1069: Property cachedPauseTime
vmedium replied to vmedium's topic in GSAP (Flash)
Jack Replied this: "You must be using a stale version of the tweening platform in the subloaded or the parent swf. Republish them with the same version (I’d recommend the latest of course) and you should be fine. Either that or make sure you’re using a child or separate ApplicationDomain for your LoaderContext when you subload." Just posting for others. Thanks Jack
Tween Error #1069: Property cachedPauseTime
vmedium posted a topic in GSAP (Flash)
Warning: 'flash' has no property 'prototype' ReferenceError: Error #1069: Property cachedPauseTime not found on com.greensock.TweenMax and there is no default value. at com.greensock::TimelineLite/addChild() at com.greensock::TimelineLite/insert() at com.greensock::TimelineLite/append() at banner_game_demo/init() at banner_game_demo() When I have gotten around this error, I've ended up not knowing what I did. I'm not looking for a specific answer, just maybe a little theory as to what this is, and how to hunt down the error, or if it can be caused by several things. Thanks vmedium
LoaderMax Queue Images Array event.target.content
vmedium replied to vmedium's topic in Loading (Flash)
Grrrrrrrr... sorry, my fault. Hopefully I'll post something worthwhile to make up for it.
LoaderMax Queue Images Array event.target.content
vmedium replied to vmedium's topic in Loading (Flash)
Note: LoaderMax VERSION: 1.6 This trace statement trace("onImageLoad from _loader:" + event.target.name, event.target.content); Outputs: onImageLoad from _loader:theImage2 [object ContentDisplay] This line of code: _imageArray.push(event.target.name); and this: _imageArray.push(event.target); and this: _imageArray.push(event.target.content); Produces this error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at LoaderMax_Image_Queue/onImageLoad() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.greensock.loading.core::LoaderCore/_completeHandler() REDUCED CODE: package { import flash.display.*; import com.greensock.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.*; public class LoaderMax_Image_Queue extends MovieClip { private var _queue:LoaderMax; public var _imageArray:Array; public function LoaderMax_Image_Queue() { _queue = new LoaderMax({name:"mainQueue"}); _queue.append(new ImageLoader("assets/theImageBig2.jpg",{name:"theImage2",container:this,onComplete:onImageLoad,onProgress:onImageProgress, x:50})); _queue.append(new ImageLoader("assets/theImageBig3.jpg",{name:"theImage3",container:this,onComplete:onImageLoad,onProgress:onImageProgress, x:100})); _queue.append(new ImageLoader("assets/theImageBig4.jpg",{name:"theImage4",container:this,onComplete:onImageLoad,onProgress:onImageProgress, x:150})); _queue.load(); } private function onImageProgress(event:LoaderEvent):void { trace("onImageProgress from _loader: " + event.target.name, Math.round(event.target.progress*100)); } private function onImageLoad(event:LoaderEvent):void { trace("onImageLoad from _loader:" + event.target.name, event.target.content); _imageArray.push(event.target.name); } } }
LoaderMax Queue Images Array event.target.content
vmedium replied to vmedium's topic in Loading (Flash)
Yes this makes perfect sense. I think I'm just unsure about the storing of references to things like the ImageLoader directly. I'll post my working code soon just for reference. Thanks again Jack.
LoaderMax Queue Images Array event.target.content
vmedium posted a topic in Loading (Flash)
So my question is. How do I store the loaded images, so that I can do things with them later? My _imageArray.push(event.target.content) doesn't work (which is probably obvious to everyone but me).. But in the example that is what Jack tweens in the handler event (which I understand is a ContentDisplay) Where am I going wrong here? package { import flash.display.MovieClip; import com.greensock.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.*; public class LoaderMax_Image_Queue extends MovieClip { private var _loader:ImageLoader; private var _queue:LoaderMax; private var _imageArray:Array; public function LoaderMax_Image_Queue() { _queue = new LoaderMax({name:"mainQueue",onProgress:progressHandler,onComplete:completeHandler,onError:errorHandler}); _loader = new ImageLoader("assets/theImageBig.jpg",{name:"theImage",container:this,onComplete:onImageLoad,onProgress:onImageProgress,x:0}); //_loader.load(); _queue.append(_loader); _queue.append(new ImageLoader("assets/theImageBig2.jpg",{name:"theImage2",container:this,onComplete:onImageLoad,onProgress:onImageProgress, x:50})); _queue.append(new ImageLoader("assets/theImageBig3.jpg",{name:"theImage3",container:this,onComplete:onImageLoad,onProgress:onImageProgress, x:100})); _queue.append(new ImageLoader("assets/theImageBig4.jpg",{name:"theImage4",container:this,onComplete:onImageLoad,onProgress:onImageProgress, x:150})); //_queue.append( new XMLLoader("xml/doc.xml", {name:"xmlDoc", estimatedBytes:425})); //_queue.append( new SWFLoader("swf/main.swf", {name:"mainClip", container:this, autoPlay:false})); _queue.load(); } private function onImageProgress(event:LoaderEvent):void { trace("onImageProgress from _loader: " + event.target.name, Math.round(event.target.progress*100)); //trace("onImageLoad: _loader onComplete Handler: " + this.target.progress); } private function onImageLoad(event:LoaderEvent):void { trace("onImageLoad from _loader:" + event.target.name, event.target.content); //trace(_imageArray); // HOW DO I STORE WHAT HAS LOADED INTO SOME FORM OF ARRAY SO THAT I CAN DO THINGS WITH THE LOADED ITEMS? // OR AM I TOTALLY MISSING SOMETHING? _imageArray.push(event.target.content); } private function progressHandler(event:LoaderEvent):void { trace("progressHandler from _queue: " + Math.round(event.target.progress*100)); } private function completeHandler(event:LoaderEvent):void { trace("completeHandler from _queue: " + + event.target.content); trace("here are the images that loaded: " + _imageArray); } function errorHandler(event:LoaderEvent):void { trace("error occurred with " + event.target + ": " + event.text); } } }
“GSAP hosts what is in my experience, the most welcoming, patient and helpful support forum I've ever come across. I've yet to see a question flat out ignored and the patience you all have in putting people on the right track, if not flat out solve their p”
“I really need to commit to using GSAP more in my daily work & demos. I love pushing native CSS animation as far as I can but every time I use GSAP I’m just blown away. Keep up the great work!”
“If every library were as robust and reliable as GreenSock’s, the world would be a much better place for software engineers and their clients. I can't think of a better designed or better performing tool, and as a bonus, it's fun as heck to play with.”
“+1 to GreenSock. It’s just one of the deepest and most reliable javascript libraries I’ve ever used”
“GSAP has been absolutely the best experience for me as a newbie. The people in this community take serious time to help you with upcoming issues on real life projects like I've never experienced before.”
“The best thing about GSAP is that it just works, and it works well. On every single browser I’ve tested.”
“The depth of GSAP blows me away like all the time. It seems like I stumble on something new and amazing every time I peek at the docs.”
“It's so correct that GSAP's logo is a superhero. Every time I use GSAP it saves me heaps of time and frustration. Thank god for GSAP honestly.”
“Sincerely, the people behind GSAP are sorcerers”
Sign Up For Our Newsletter
Get the latest updates on GreenSock products, exclusive offers, and more right in your inbox.
Your information will always be kept confidential.
Thanks for signing up!
Now you'll begin receiving the latest GreenSock updates, exclusive offers, and more right in your inbox. Welcome aboard.