Jump to content
Search Community

biyibird

Members
  • Posts

    6
  • Joined

  • Last visited

biyibird's Achievements

0

Reputation

  1. Hi,greensock: I have a question about "SWFLoader.unload()". The "main.swf" have loaded "rect.swf",and I want to click the stage, to unload rect.swf (after play a tweemMax). The code works well now. ///////////////main.as var _current; public function testUnload(){ var loader:SWFLoader = new SWFLoader("rect.swf", {name: "mainSWF", container: this, onComplete: completeH}); loader.load(); stage.addEventListener(MouseEvent.CLICK, click); } private function completeH(e:LoaderEvent):void { _current = e.target.rawContent; _current.addEventListener("unload", function() { e.target.unload(); } ); } private function click(e:Event):void { _current.tweenAndDispatch(); } /////////////rect.as public function rect() {} public function tweenAndDispatch() { TweenMax.to(this, 1.5, { height: 10, onComplete:function() { dispatchEvent(new Event("unload")); }}); } but if there's some method ,to write the code of “......unload()....”into the class of "rect.as",to let the class of rect.as to unload ITSELF?
  2. YES! your reply is helpful to me!thank you!
  3. var _arr:Array = []; public function test_allto() { _arr.push( TweenMax.to(mc1,1,{rotation:180,scaleX:0.1,scaleY:0.1,delay:0,onComplete:onCompleteH, paused:true})); _arr.push( TweenMax.to(mc2,1,{rotation:180,scaleX:0.1,scaleY:0.1,delay:0,onComplete:onCompleteH, paused:true})); _arr.push( TweenMax.to(mc3,1,{rotation:180,scaleX:0.1,scaleY:0.1,delay:0.5,onComplete:onCompleteH, paused:true})); ............... public function onCompleteH() { /////////////////////my question:how to get the target of THIS tweenMax ? if there's no "mytween="...... //thisTarget.currentProgress = 0; //thisTarget.pause(); }
  4. hi,greensock! i am from china and my english is poor. this is my test code. i want Increasing the myTween.delay,and let the mc to rotate more and more late. but now it is seems not to be hoped of mine. var myTween:TweenMax; var _delay:Number = 0; public function test_mcCut() { myTween = TweenMax.to(mc,1.8,{rotation:180,scaleX:0.1,scaleY:0.1,delay:_delay,onComplete:onCompleteH,paused:true}); btn.addEventListener(MouseEvent.CLICK,clickH); } public function clickH(e:MouseEvent) { myTween.play(); } public function onCompleteH() { myTween.currentProgress = 0;///////return to start myTween.pause(); _delay += 3; myTween.delay = _delay;/////////this is my question----the Increasing of myTween.delay just=3,not to Increasing more biger trace(myTween.delay); }
  5. I am from china and my english is poor.I'm a newbie to TweenMax and would LOVE help! Please open the zip file of attachment.for_help.zip I am going to control the rotation of the mc1 -- "a truck".I have creat a tween like this. var timeline:TimelineMax = new TimelineMax({onComplete:handler_timeline_onComplete,onReverseComplete:handler_reverse_onComplete,onUpdate:handler_timeline_onUpdate,paused:true}); timeline.append(TweenMax.to(mc1,_time,{frame:mc1.totalFrames,ease:Linear.easeNone})); but how can I "speed up " In different directions(Clockwise and Counterclockwise)---and when I click the "btn3",it will play faster and faster. when i click the "btn4",it speed up In different directions. Thanks for your answers.
×
×
  • Create New...