Jump to content
Search Community

Luigi Vercotti

Members
  • Posts

    45
  • Joined

  • Last visited

Everything posted by Luigi Vercotti

  1. Thank you for the tips. I fixed the nested functions. OK, I've got several buttons, when you click one of them the tweening shows up on the stage. When you click next, the last one disappear and new one shows up and so on. Of course when you click the last button the previous tweening shows from begging. My problem is in only one button that when you click the button the tweening shows up, but when you return to it later from another button the tweening shows up at the end of the tweening like there was no tweening. Hmm...what do you thing?
  2. Hello I've got button Gallery and when I clic on it then few tween goes on and then this...onComplete:galleryDownload polaroid.visible=false; downLinks.visible=false; function polaroidPic(e:Event):void { //contact contactMain.visible=false; contactRadekPic.visible=false; //SPONSOR logoAB.visible=false; logoFerrit.visible=false; logoSkv.visible=false; logoPharmax.visible=false; logoMladez2.visible=false; logoGR.visible=false; logoZTPM.visible=false; //RACERS racerNameTomecek.visible=false; racerNameSasa.visible=false; racerNameMacik.visible=false; racerNameSpacil.visible=false; racerLiveScore.visible=false; racerSpacil.visible=false; racerMacik.visible=false; racerSasa.visible=false; polaroid.visible=true; var timelinePolaroid:TimelineMax = new TimelineMax(); timelinePolaroid.insert(TweenMax.fromTo(polaroid, 1, {alpha:0, rotationX:90}, {alpha:1, rotationX:-45})); timelinePolaroid.append(TweenMax.to(polaroid, 1.5, {rotationX:30, onComplete:galleryDownload})); timelinePolaroid.append(TweenMax.to(polaroid, 2, {rotationX:0,ease:Bounce.easeOut})); } here is the function galleryDownload function galleryDownload():void { downLinks.visible=true; TweenLite.to(downLinks.downloadTitle,2,{alpha:1}); var a:Array=[downLinks.btnPiskovna,downLinks.btnVideo,downLinks.btnVylet,downLinks.btnSouteze,downLinks.btnSouteze2,downLinks.btnExkurze,downLinks.btnJizdy,downLinks.btnBym,downLinks.btnPrvni1,downLinks.btnPrvni2]; var links:Array=["http://www.seznam.cz","http://www.google.com","http://www.centrum.cz","http://www.hendikemp.cz","http://www.hendikemp.cz","http://www.hendikemp.cz","http://www.hendikemp.cz","http://www.hendikemp.cz",]; for (var i:int = 0; i < a.length; i++) { a[i].id=i; a[i].alpha=0; a[i].buttonMode=true; a[i].useHandCursor=true; a[i].mouseChildren=false; //a[i].addEventListener(MouseEvent.MOUSE_OVER, mouseOverButton); a[i].addEventListener(MouseEvent.CLICK, buttonClicked); } TweenLite.to(downLinks.maskMc,3,{y:48}); TweenLite.to(downLinks.maskMcRight,3,{y:48, delay:2.0}); downLinks.textDownloadMc.mask=downLinks.maskMc; downLinks.textDownloadMcRight.mask=downLinks.maskMcRight; function buttonClicked(e:MouseEvent):void { var id:int=e.target.id; var request:URLRequest=new URLRequest(links[id]); navigateToURL(request,"blank"); } } well there is no problem and everything works pretty fine. But, when I click another button and then I go back clicking the Gallery button the function "polaroidPic" shows up tweening fine but the tweening in function galleryDownload it just appear as a picture... What do you think where the problem could be?
  3. Thank you very much Greensock I will have to read you reply few times over so I can fully understand it. Generally I think I understand you. I know mostly my problem is that I am working with frames which lots of people say to me don't you use it. Probably they are right. I will start working on it later today. Thanks
  4. Thank you I tried with the trace() but I don't.... I posted the problem code fla in rar. If you can please take a look. I really don't know what is wrong. I just think that might be something going the play head backward...?? Thanks...
  5. Ok, I managed to something, but now it does only with one tweening logoAB.alpha=0; logoFerrit.alpha=0; logoSkv.alpha=0; logoPharmax.alpha=0; logoMladez2.alpha=0; logoGR.alpha=0; logoZTPM.alpha=0; function sponsorPic(e:Event):void { logoAB.alpha=1; logoFerrit.alpha=1; logoSkv.alpha=1; logoPharmax.alpha=1; logoMladez2.alpha=1; logoGR.alpha=1; logoZTPM.alpha=1; var timeline:TimelineLite = new TimelineLite(); var logoPics:Array=[logoAB,logoFerrit,logoSkv,logoPharmax,logoMladez2,logoGR,logoZTPM]; var i:Number=Pics.length; while (i--) { timeline.insert( TweenLite.from(logoPics[i], 1, {x:460,y:360, rotationZ:Math.random() * 360, rotationY:Math.random() * 360, rotationX:Math.random() * 360, alpha:0}), i * 0.1); } } I click a button and it goes to this frame and here is the code at that frame contactRadekPic.visible=false; function contactPic(e:Event):void { contactRadekPic.visible=true; var timeline:TimelineLite = new TimelineLite(); var Pics:Array=[contactRadekPic.radekContact01,contactRadekPic.radekContact02,contactRadekPic.radekContact10,contactRadekPic.radekContact16,contactRadekPic.radekContact08,contactRadekPic.radekContact13,contactRadekPic.radekContact05,contactRadekPic.radekContact055,contactRadekPic.radekContact15,contactRadekPic.radekContact04,contactRadekPic.radekContact14,contactRadekPic.radekContact12,contactRadekPic.radekContact06,contactRadekPic.radekContact09,contactRadekPic.radekContact03,contactRadekPic.radekContact11,contactRadekPic.radekContact07]; var i:Number=Pics.length; while (i--) { timeline.insert( TweenLite.from(Pics[i], 1, {y:10, rotationZ:Math.random() * 360, rotationY:Math.random() * 360, rotationX:Math.random() * 360, alpha:0, onComplete:contactFrame}), i * 0.1); } } contactMain.alpha=0; function contactFrame() { //contactMain.visible=true; var contactTxtMc:TimelineLite = new TimelineLite(); contactTxtMc.insert(TweenMax.fromTo(contactMain, .8, {alpha:0, scaleX:0, scaleY:0},{alpha:1, scaleX:1, scaleY:.09})); contactTxtMc.append(TweenMax.to(contactMain, .8, {scaleY:1, ease:Elastic.easeOut})); } This works perfect....BUT...when I click the button (with the code above, function sponsorPic()) before the tweening finish (this code here) the tweening above just freeze here is the Error code TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.greensock::TweenLite/init() at com.greensock::TweenMax/init() at com.greensock::TweenMax/renderTime() at com.greensock::TimelineLite/forceChildrenToEnd() at com.greensock::TimelineLite/renderTime() at com.greensock.core::SimpleTimeline/renderTime() at com.greensock::TweenLite$/updateAll() What do you thing? What am I doing wrong? Please
  6. Hello What do you thing could be the problem. I've got on different frames buttons when I click one of them the tweening the tweening shows up. The problem is: when I click button tweening shows up pretty fine but when I click another button DURING the tweening the next tweening crash/freeze. When I wait for tweening to finish it works fine, the problem is only during the tweening... ???
  7. Hello Greensock Your code from earlier works pretty fine. Later I am trying to use it on some another picture/movie clip and I don't know why it never stop at the correct position (rotated position), even if I use rotation X/Y/Z without Math.random(), only with 360. So, it supposed to just turn around, isn't it? I am guessing it has something to do with height: and width: ...but I don't know why.... Do you have any idea? var patron_mc:TimelineLite = new TimelineLite(); patron_mc.insert(TweenLite.to(patron, 2, {alpha:1, x:175.6, y:185, width:310, height:110, rotationY:Math.random() * 360, rotationX:Math.random() * 360, ease:Strong.easeIn}));
  8. I want to add onComplete:onFinishMainPic timeline.insert( TweenLite.from(Pics[i], 1, {y:0, rotationZ:Math.random() * 360, rotationY:Math.random() * 360, rotationX:Math.random() * 360, alpha:0, onComplete:onFinishMainPic}), i * 1); } but it doesn't work. What do you think? Please
  9. Fantastic, I just finished with all of 35 of them and it's working pretty cool. Thanks again.
  10. Thanks, something like you did. Excellent I will try it with all of them. Thank you very much
  11. I'm sorry for my English OK, finally there will be 5 rows and 7 columns (35 pictures/movie clips) and yes, they can start from one position, but if they can randomly begin rotationX/rotationY/rotationZ, but they must stop at the correct position, because they are pictures.
  12. Hello var timeline:TimelineLite = new TimelineLite(); var Pics:Array = [testRot05, testRot02, testRot06, testRot04, testRot, testRot03]; var i:Number= Pics.length; while (i--) { timeline.insert( TweenLite.from(Pics[i], 1, {y:0, rotationZ:180, rotationY:180, rotationX:360, alpha:0}), i * 1); } The code above works, no problem. If you can please advice me how to do like each picture goes from different rotationZ/Y/X and stop at the correct position (pictures). I probably could do each picture separate, but that's gonna take me some time as I will have 35 of them (5rows and 7colloms). Please
  13. Man you are the Flash God! You are absolutely right. It is working now. It was a problem with my function. The right option was GOOD: function loadtheLupu():void { ... If I may ask I know it is about Tweening here... why the function was working before...because I used var dataTween:Tween = new Tween (titlePageMc.data_mc, "x", Elastic.easeOut, 1000, 556.7, 5, true); var dataAlpha:Tween = new Tween (titlePageMc.data_mc, "alpha",None.easeIn, 0.5, 1, 2, true); dataAlpha.addEventListener(TweenEvent.MOTION_STOP, loadtheLupu); // TweenEvent??? function loadtheLupu(evnt:Event):void //evnt:Event??? { } anyway Thank you very much Greensock
  14. Thank you , now it shows perfectly...smooth... PS: because my English is not my native language, I sort of still don't understand it or better doesn't make sense to me. I gotta read it few more time.
  15. My bad..I am sorry I copied and wrote wrong....no idea why.... here is the function that doesn't work....well this what's happening...nothing and the output says: "Argument count mismatch on index_v22_21_02_2010_Title_fla::MainTimeline/loadtheLupu()." function titleData (evnt:Event):void { titlePageMc.data_mc.visible = true; TweenMax.fromTo (titlePageMc.data_mc, 4, {alpha:0, x:1000}, {alpha:1, x:556.7, ease:Elastic.easeOut, onComplete:loadtheLupu}); } This one is my original and it works...calls the function "loadtheLupu" and it works. I'd like to use your TweenMax function titleData (evnt:Event):void { titlePageMc.data_mc.visible = true; var dataAlpha:Tween = new Tween (titlePageMc.data_mc, "alpha",None.easeIn, 0.5, 1, 2, true); var dataTween:Tween = new Tween (titlePageMc.data_mc, "x", Elastic.easeOut, 1000, 556.7, 5, true); dataAlpha.addEventListener(TweenEvent.MOTION_STOP, loadtheLupu); }
  16. Hello again function titleData (evnt:Event):void { titlePageMc.data_mc.visible = true; var dataAlpha:Tween = new Tween (titlePageMc.data_mc, "alpha",None.easeIn, 0.5, 1, 2, true); var dataTween:Tween = new Tween (titlePageMc.data_mc, "x", Elastic.easeOut, 1000, 556.7, 5, true); dataAlpha.addEventListener(TweenEvent.MOTION_STOP, loadtheLupu); } I've changed to this: function titleData (evnt:Event):void { titlePageMc.data_mc.visible = true; TweenMax.fromTo (titlePageMc.data_mc, 4, {alpha:0, x:1000},{alpha:1,x:556.7, ease:Elastic.easeOut, onComplete:loadthelupu}); } and it is not working... I tried also this var myTweenMax:TweenMax = new TweenMax.fromTo(titlePageMc.data_mc, 4, {alpha:0, x:1000},{alpha:1,x:556.7, ease:Elastic.easeOut, onComplete:loadthelupu}); Do you have any idea why? Please
  17. Hello Wondering why is that happenning? When I use this code... time_txt.visible = true; TweenMax.fromTo(time_txt, 1,{alpha:0},{alpha:1}); in preview mode the mc "time_text" will flick...show first then goes from alpha 0 to 1 but when I use this code... time_txt.visible = true; time_txt.alpha = 0; TweenLite.to (time_txt, 2, {alpha:1}); it is working fine, but what it is interesting that somewhere else when I use the first option mentioned above it works fine but in this case...not...why...any idea please?
  18. I've tried that minute ago and it is working. Man! Your Tweens are super cool. I am sort of a newbie and I use lots of Tweening and I found out your stuff just yesterday and man...I'm glad... ...fantastic...
  19. Thank you very much Greensock I will try it what you wrote.
  20. Hello Why can I make it work? TweenLite.to(zlate_z, 3, {x:-185.7, y:0, rotationX:100, rotationZ:50, ease:Bounce.easeOut}); TweenLite.to(zlate_z, 1, {rotationX:0, rotationZ:0, delay:2, overwrite:false}); First line is working but not the second one. Second Q: Can I set the start and end like in Tween? Thanks
×
×
  • Create New...