Jump to content
Search Community

Nickbee

Members
  • Posts

    68
  • Joined

  • Last visited

Everything posted by Nickbee

  1. I have the motion blur plug in working great in a standalone SWF. Icons fly in from both sides of the stage with motion blur. When I use that same SWF in a flex SWF loader the motionblur is not working. The icons just appear and don’t even tween in. If I remove the motionblur the icons do tween in fine without the blur applied. And if it makes a difference I am using Flex3... Any ideas? Thanks!
  2. in case anyone is interested this is how I displayed the time left in 00:00 format function progressHandler(evt:LoaderEvent):void { //percentage loaded var pcent:Number = Math.ceil((evt.target.progress)*100); preLoader_mc.loading_txt.text = "loading photos - " + pcent + "%"; //time left if(myLoaderMax.progress != 0) { var secondsLeft:uint = Math.ceil(((1 / myLoaderMax.progress) - 1) * myLoaderMax.loadTime); var minsLeft:uint = secondsLeft/60 var mins:String; if (minsLeft < 10) { mins = "0" + minsLeft.toString(); }else{ mins = minsLeft.toString(); } secondsLeft %= 60; var secs:String; if (secondsLeft < 10) { secs = "0" + secondsLeft.toString(); }else { secs = secondsLeft.toString(); } preLoader_mc.time_txt.text = "time left - " + mins + ":" + secs; } } see it in action here... http://www.nickbee.com/LoaderMax
  3. it must have been a glitch in the matrix because the final version is working perfectly. Check it out here.... http://www.nickbee.com/LoaderMax PS, motionBlur ROCKS!!!!!
  4. Thanks guys!!! I will be giving TimelineLite a try soon!!!!
  5. When I look at properties on Windows 7 I see Size and Size on Disk..... I'm assuming I should use Size on disk for estimatedBytes? Thanks!!!!
  6. That is awesome!!!! But I don't think it will work in this case since each "icon" has it's own destination x and y value.
  7. When I use a for loop to tween a bunch of stuff and want to call a function on the complete of the least tween I’ve been using a conditional like so: private function initTweenIcons():void { for (var i:int=0 ; i<_numIcons ; i++) { var temp:MovieClip = iconName[tweenOrder[i]]; if (i != _numIcons-1) { TweenMax.to(temp, tweenSpeed, {x:finalIconX[tweenOrder[i]], y:finalIconY[tweenOrder[i]], scaleX:.8, scaleY:.8, alpha:1, delay:i*.1, motionBlur:true, ease:Cubic.easeInOut}); } else { TweenMax.to(temp, tweenSpeed, {x:finalIconX[tweenOrder[i]], y:finalIconY[tweenOrder[i]], scaleX:.8, scaleY:.8, alpha:1, delay:i*.1, motionBlur:true, ease:Cubic.easeInOut, onComplete:addListeners}); } } } This works perfect but I’m wondering if there is an easier, more efficient way to do this. I know a timer could be used, aka delayedCall, but I figured this is more reliable just in case things don’t sync up perfectly. Thanks!
  8. Just wondering if someone has some code using tweenLite/Max for an auto-scroller simular to this.... http://www.nickbee.com/XMLGallery/ thanks!!!!
  9. Higher as in close to 100%. The number and % disappears from my text box. But it traces perfect.... Here's the test FLA I've been working on Thanks!!!!
  10. I tried this code and my trace seems to be displaying the total time.... Am I doing something wrong? function progressHandler(event:LoaderEvent):void { if(queue.progress != 0) { var secondsLeft:Number = (1 /queue.progress) * queue.loadTime; trace(int(secondsLeft)); } } trace result 4 5 5 5 5 5 5 5 5 5 5 THANKS!!!!!!!
  11. I know this is more of an action script question but here it is…. When I use the following: function progressHandler(event:LoaderEvent):void { trace("progress: " + event.target.progress); var pcent:Number = Math.ceil((event.target.progress)*100); loading_txt.text = "loading portfolio " + pcent.toString() + “%”; } Is displays fine until it gets to a higher number then I get just loading portfolio in my text box with no number or % If I drop the “%” from the end of my text like so function progressHandler(event:LoaderEvent):void { trace("progress: " + event.target.progress); var pcent:Number = Math.ceil((event.target.progress)*100); loading_txt.text = "loading portfolio " + pcent.toString() ; } I get up to loading portfolio 100 with no issues. What would be the proper way to display loading portfolio 100% ??????? Thanks!
  12. Found it!!!! TweenLite.to(this, 10, {y:-175, overwrite:0}); Just an FYI. Before I found this Made a flash tween for the y property. I was reminded how much I like TweenLite!!!!!!!
  13. I want to simulate a bubble rising in water. So I set up two TweenLite.to methods for side to side movement... like so: private function flip(evt:MouseEvent=null):void { TweenLite.to(this, 1, {x:200, onComplete:flipAgain}); } private function flipAgain(evt:MouseEvent=null):void { TweenLite.to(this, 1, {x:100, onComplete:flip}); } When I add another TweenLite.to method for the up moment but the above gets forgotten since the object is now tweening to a new spot. So can I do this another way? Or do I need a nested container to separate the two motions (left/right & up). Thanks!!!!!
  14. worked like a champ. And things are much smoother then the original code. Here is the code in actions (each button animation).... http://www.nickbee.com/XMLGallery
  15. Thanks a ton! The first example of your code is exactly what I was looking to accomplish. I think I have one error though. In my movieclip I have this code: stop(); import com.greensock.*; import com.greensock.plugins.*; TweenPlugin.activate([FramePlugin]); //just do this once to activate the "frame" feature in TweenLite. btn.buttonMode = true; btn.addEventListener(MouseEvent.ROLL_OVER, onOver); btn.addEventListener(MouseEvent.ROLL_OUT, onOut); var frameTween:TweenLite = new TweenLite(this, this.totalFrames, {frame:this.totalFrames, ease:Linear.easeNone, useFrames:true, paused:true}); function onOver(e:MouseEvent):void { frameTween.play(); } function onOut(e:MouseEvent):void { frameTween.reverse(); } and I get this error when publishing... 1120: Access of undefined property Linear. any ideas? THANKS AGAIN!
  16. I'm trying to figure out how to use tweenlite to replace the code I use for animated buttons: stop(); btn.buttonMode = true; btn.addEventListener(MouseEvent.MOUSE_OVER, onOver); btn.addEventListener(MouseEvent.MOUSE_OUT, onOut); var overBtn:Boolean = false; function onOver(e:MouseEvent):void { overBtn = true; } function onOut(e:MouseEvent):void { overBtn = false; } addEventListener(Event.ENTER_FRAME, onEnter); function onEnter (e:Event):void { if(overBtn){ this.nextFrame(); }else { this.prevFrame(); } } I figured if I used the tween to a frame label to mimic this effect without having to use Event.ENTER_FRAME). but.... from what I understand I have to enter a time for the tweening to a frame label. Is there a work around for this? I'd like it to tween to a frame label from what ever point it is in the MC timeline. Thanks
×
×
  • Create New...