Jump to content
Search Community

eco_bach

Members
  • Posts

    30
  • Joined

  • Last visited

Everything posted by eco_bach

  1. Using the VideoLoader class since I see it has support for stage video https://greensock.com/asdocs/com/greensock/loading/VideoLoader.html Is there any way to play 2 simultaneous stage videos so that there is no 'blank' space in between?
  2. I need to tween a MovieClip that is inside another already tweening MovieClip. I assume something to do with Overwrite functionality? Can anyone help?
  3. I have a TimeLineMax sequence defined thus var tl=new TimelineMax({paused: true}); tl.append(TweenMax.to(f, _flipSpeed, {rotationY: 90 + _offset, visible: false, onComplete:doneRotateF,ease:Linear.easeNone})) tl.append(TweenMax.to(b, 0, {alpha: 1, immediateRender: false})) tl.append(TweenMax.to(b, _flipSpeed, {rotationY: 0, onComplete:doneRotateB, ease:Linear.easeNone})); When I call it using tl.tweenTo(_tl.duration()); the callbacks work, are called, but when I try to reverse it tl.tweenTo(0); the tweens work fine but the callbacks are NOT called. What gives?
  4. I'd like to apply the SplitTextField effect to characters in a textfield but instead of the effect being applied in a sequential manner, I want the characters to be chosen at random. Can anyone show me how I would do this?
  5. Why can't I tween a simple div? In my javascript the following works so I KNOW I have a proper refrence to my div infoDiv.style.visibility="hidden"; but this doesn't(no errors, just fails!!) TweenLite.to( infoDiv,1,{alpha:0}); The div has absolute positioning applied but obviously this is not the value I am changing. I am also using TweenLite elsewhere in the same javascript file so I know I am referencing it properly.
  6. Is there a way to easily get the percentage complete of a tween on an object?
  7. I suspect there is actually something else going on here that only Adobe engineers can answer. After a lot of testing what I've discovered is that the full screen executable ALWAYS performs better with buttery smooth tweens when the Flash IDE is open. If I close the IDE, relaunch the executable, there is noticeable stutter.
  8. Any Actionscript work I do is either AIR for mobile or AIR for Desktop (standalone installations, kiosks) etc. For ease of setup I usually must target full frame for any desktop applications. Performance optimization is critical regardless. When publishing AIR to the desktop, you have the option of 3 different rendering modes, DIRECT, CPU, and AUTO. From experimentation on a typical PC I've discovered that using AUTO give the best performance.(DIRECT mode seems better on my iMac, I assume this has to do with different GPU-CPU configurations) A recent application uses Blitmask on a dozen horizontally scrolling Textfields. With a 120 fps targeted frame rate and HD (1920x1080) stage size I easily average over 100fps. But, the moment I set the application as being fullscreen, which represents a roughly 10% increase in overall pixel area, the application frame rate dropped to less than 24fps!! Apparent speed of actual tweening seems even slower, less than 12fps. I am perplexed as to why this is so. I also tried the fullscreen rect trick which works well for full screen video but this had no effect. Can anyone suggest how I might improve fullscreen animations using TweenMax-Lite? if (stage.displayState == StageDisplayState.NORMAL) { stage.fullScreenSourceRect=new Rectangle(0, 0, 1920, 1080); stage.displayState=StageDisplayState.FULL_SCREEN_INTERACTIVE; } else { stage.displayState=StageDisplayState.NORMAL; }
  9. TweenMax.staggerTo(_rows, .1, {glowFilter:{color:0xFFFFFF, blurX:16, blurY:16, strength:2.9, immediateRender:true, alpha:1},stagger:.1,onComplete:removeGlow}); Trying to use the new TweenMax staggerTo with latest v12 but keep getting the following error In the above code sample _rows is an array of textFields. ReferenceError: Error #1069: Property stagger not found on flash.text.TextField and there is no default value. at com.greensock.core::PropTween()[/Active/_Flash/_AS3_v12/src/com/greensock/core/PropTween.as:58] at com.greensock::TweenLite/_initProps()[/Active/_Flash/_AS3_v12/src/com/greensock/TweenLite.as:604] at com.greensock::TweenLite/_init()[/Active/_Flash/_AS3_v12/src/com/greensock/TweenLite.as:555] at com.greensock::TweenMax/render()[/Active/_Flash/_AS3_v12/src/com/greensock/TweenMax.as:970] at com.greensock.core::SimpleTimeline/render()[/Active/_Flash/_AS3_v12/src/com/greensock/core/SimpleTimeline.as:166] at com.greensock.core::Animation$/_updateRoot()[/Active/_Flash/_AS3_v12/src/com/greensock/core/Animation.as:570]
  10. Can't seem to find it although there is documentation for it
  11. yeah, makes sense. Can't have my cake and eat it too I guess:)
  12. I know it's simple to animate the amount of any given filter, but lets say you have a filter on a specific region(Rectangle) of the stage. How would you animate(tween) the position of this filtered area?
  13. Trying something that pushes the limits of what I think is possible using just the default plugins I am animating a dynamic textfield with a BlitMask and also updating the text at the same time So far so good. What I would like to do is incorporate the splitTextField effect similar to the ending in this video http://www.youtube.com/watch?v=qZqGZERqlqg but without pausing the animated text at all. Does anyone know of a way to do this?
  14. This is a simple BlitMask example WITHOUT updating a dynamic TextField that works as it is supposed to. How do I update the text AND keep the BlitMask functionality? We are using a BlitMask to optimize performance and provide the autowrap functionality */ import flash.events.*; import flash.utils.Timer; import com.greensock.*; import com.greensock.easing.* import flash.text.TextField; var _blitMask:BlitMask; var tf:TextField; _blitMask=new BlitMask(tf, tf.x, tf.y, 1920, 50, true, true, 0x000000, true); TweenMax.to(tf, 20, {x: 1920, repeat: -1, onUpdate: _blitMask.update, ease: Linear.easeNone});
  15. Panic deadline and I am trying to get something to work using BlitMask in conjunction with a dynamic Textfield that I am appending text to. In order to add (append) text I need to disableBitmapMode and dispose of the old Blitmask, add my text, then create a new Blitmask The issue is that the Blitmask is NOT auto wrapping properly. The following will work if you drop in an fla. I've also attached an fla with identical code. /* We are simply updating a dynamic textfield that is also endlesslly looping left to right We are also using a BlitMask to optimize performance and provide the autowrap functionality */ import flash.events.*; import flash.utils.Timer; import com.greensock.*; import com.greensock.easing.* import flash.text.TextField; var _debugTxt:String='Jack and Jill went up the hill to fetch a pail of water. Jack fell down and broke his crown and Jill came tumbling after This is at the end!!'; var _debugPool:Array=_debugTxt.split(" "); var _blitMask:BlitMask var tf:TextField; var pollTimer=new Timer(2000, 0); pollTimer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true); var count:int=0; function timerHandler(event:TimerEvent):void { if (_blitMask != null) { _blitMask.disableBitmapMode(); _blitMask.dispose(); } var tagTxt:String=_debugPool[count]; count=int(count + 1); trace('tagTxt ='+tagTxt); trace('getMetrics(tf).width ='+getMetrics(tf).width); if (getMetrics(tf).width < 1920) { tf.appendText(tagTxt.toUpperCase()); } if (_blitMask == null) { _blitMask=new BlitMask(tf, tf.x, tf.y, 1920, 50, true, true, 0x000000, true); } //NB only tween once for repeating tween if (TweenMax.isTweening(tf) == false) { //this['_blitMask'+j] = new BlitMask(tf, tf.x, tf.y, 1920, _bannerH, true, true, 0x000000, true); TweenMax.to(tf, 20, {x: 1920, repeat: -1, onUpdate: _blitMask.update, ease: Linear.easeNone}); //onUpdate:this['_blitMask'+j].update, } } function getMetrics(tf:TextField):TextLineMetrics { var tm:TextLineMetrics=tf.getLineMetrics(0); //trace('getMetrics and metrics. ='+tm.width); return tm; } //start everything! pollTimer.start();
  16. Let's say in a class I define a private var '_tween' and instantiate a new TweenLite or Tweenmax instance in a method like so. _tween = new TweenLite( What happens if I call this 1000's of times? Do I need to concern myself with memory leaks? Or does TweenLite automatically take care of garbage collection. If I need to call a tween 1000's of times am I always better to use the static variation instead? Tweenlite.to(
  17. I have a 1920x1080 bitmap which I have scaled to fit in a much smaller 'thumbnail' MovieClip. I then have scaled up this MovieClip to the bitmap's original 1920x1080 size. Problem is the bitmap appears quite blurry. Is there a way to preserve the original resolution of a nested bitmap when you scale this way?
  18. The following code ALMOST works. The problem is that there isn't a smooth transition from one tween to the next. Cany anyone help? import com.greensock.TweenLite; import com.greensock.easing.*; import com.greensock.plugins.TweenPlugin; import com.greensock.plugins.*; TweenPlugin.activate([BezierPlugin,BezierThroughPlugin]); var dp3D:Array=[{x:0, y:0,z:1080},{x:1920, y:1080,z:0},{x:0, y:0,z:0},{x:1920, y:0,z:1080},{x:0, y:1080,z:0},{x:1920, y:1080,z:1080}] _bezierIndex=0; function doBezier():void{ TweenLite.to(mc, 3, {bezierThrough:[{x:960, y:540,z:540}, dp3D[_bezierIndex]],onUpdate:tracePosition, ease:Linear.easeNone,onUpdateParams:[mc],onComplete:loopBezier}); _bezierIndex++ if(_bezierIndex==6)_bezierIndex=0; } function loopBezier(){ //if condition doBezier(); } function tracePosition(obj:DisplayObject):void { trace("x: " + obj.x + " y:" + obj.y+ " z:" + obj.z); } doBezier();
  19. A fairly common and VERY time consuming debugging chore on complex flash apps using Tweenlite is often spent doing hours of detective work, trying to locate which objects are returning null ie this error TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.greensock.plugins::VolumePlugin/onInitTween() at com.greensock::TweenLite/init() at com.greensock::TweenLite/renderTime() at com.greensock.core::SimpleTimeline/renderTime() at com.greensock::TweenLite$/updateAll() Is anyone aware of any debugging hooks within TweenliteTweenMax that might help in determining the actual instance name of null objects?
  20. Thanks, slowly making sense. What has me a bit befuddled is the actual implementation of the getter setters. When are we setting scrollX and when are we getting scrollX? The only reference I see is in the TweenMax instance scrollX:change. So we're tweening the scrollX property (the setter) but we need to pass an argument of type Number. Once I get past this hurdle I think it will all make sense..
  21. This is really helpful and the getter setter method a lot more advanced than I'm accustomed to when using with TweenLite. Is there a basic walkthru tutorial that explains what is happening?
  22. Thanks Jack! Almost there. I now tween PERFECTLY when scrolling right and NO error creeps in. yeah! But scrolling left still needs work. The main issue is that the scrolling when using a negative relative seems to introduce a little bit of 'stutter' to the tween. The tween is not as buttery smooth as when tweening to the right. And as a result of this stutter I assume, some error again creeps in when scrolling left. Any idea why a relative tween using a negative value would not be as smooth? In the code below when scrolling left _dist ="-100" and when right "100"; My pseudo code> private function onUpdateHandler():void { if (MOVERIGHT) { if (x >= 980) { TweenLite.killTweensOf(this); //x = -980//OLD BAD x -= 980 * 2;///NEW GOOD doScroll(); } } if (MOVELEFT) { if (x <= -490) { TweenLite.killTweensOf(this); x += 980 * 2;//NEW GOOD?? doScroll(); } } } private function doScroll():void { var t:TweenMax = TweenMax.to(this, 0.25, {x:_dist, ease:Linear.easeNone,onUpdate:onUpdateHandler, onComplete:resetTween}); var tl:TimelineMax = new TimelineMax({repeat:-1}); //repeats indefinitely tl.append(t); function resetTween():void { t.invalidate(); } }
  23. Thanks jack tried TweenMax, same issue I've uploaded an fla with stripped down class files. The relevant code is in the class ItemBase. In particular the doScroll() method. The only thing I've done is add an onUpdate handler to get a continuous scroll. In the fla there are 4 MovieClip Items Clicking on the left arrow repeatedly and you can see that the green rectangles representing the outlines of the MovieClips no longer stay aligned. There is a bug currently and the right arrow doesn't work but you should get the idea once you've compiled and viewed in Flash. Note I've commented out my previous code using TweenLite and absolute, constant speed tweens. Any help appreciated!
×
×
  • Create New...