1 Reply Latest reply on Jun 5, 2011 8:22 AM by robdillon

    I desperatly need help!


      I'll start off by saying I am not a native English speaker, thus I might have some trouble explaining my problem.


      Anyway, here goes:


      I have to make an interface as an assignment for school to show off all our projects we made during the year.
      It has to be made entirely in Flash and has to have a lot of AS3 scripting. Also, I have to hand it in tomorrow...


      My problem is with my navigation.


      This is a piece of my script (it might be disorganised..)


      ASbalk.alpha = 0;
      ASwerkjes.alpha = 0;
      ASmin.alpha = 0;
      ASknop2.visible = false;
      ASknop.addEventListener(MouseEvent.MOUSE_UP, ASverbreden);
      function ASverbreden(evt:MouseEvent):void {
      TweenLite.to(ASbalk, 1, {alpha:1, ease:Sine.easeOut,onComplete:onFinishTweenAS});
      function onFinishTweenAS():void{
      TweenLite.to(ASbalk, 0.8, {scaleX:0.95, ease:Quart.easeIn,onComplete:fadeinASwerkjes});
      function fadeinASwerkjes():void{
      TweenLite.to(ASwerkjes, 1, {alpha:1, ease:Sine.easeOut,onComplete:fadeinASmin});
      function fadeinASmin():void{
      TweenLite.to(ASmin, 0.5, {alpha:1, ease:Sine.easeOut,onComplete:toonASknop2});
      function toonASknop2():void{
      ASknop2.visible = true;
      ASknop2.addEventListener(MouseEvent.MOUSE_DOWN, versmallenAS);
      function versmallenAS(evt:MouseEvent):void{
      TweenLite.to(ASbalk, 0.8, {scaleX:0.02, ease:Quart.easeIn,onComplete:fadeoutASbalk});;
      function fadeoutASbalk():void{
      ASbalk.alpha = 0;
      ASwerkjes.alpha = 0;


      "ASplus" is a movieclip with a white + on it, showing off that something needs to be showed.
      "ASmin" is a movieclip with a white - on it, showing off that something needs to be closed.


      What this does is, I have a button "ASknop" (a movieclip) positioned with alpha = 0 over another movieclip "ASplus"
      If I click on the "ASknop" another movieclip appears "ASbalk" which fades in and scales. Another thing that happens is that some text appears on top of it "ASwerkjes"


      If this is completely finished, another button takes over "ASknop2" (this movieclip is visible = false) that one then goes on top of "ASknop" through ASknop2.visible = true
      and the movieclip "ASplus" changes into a movieclip called "ASmin"
      "ASknop2" makes that movieclip "ASbalk" that faded in and scaled, do the exact opposite. It now fades out and scales back down, also that "ASwerkjes" text dissapears.


      My problem now is, making that sort of loop. I have to be able to keep clicking it, making the movieclip scale and fade in and afterwards scale down and fade out again.


      Thanks in advance and I hope to hear from you soon!

        • 1. Re: I desperatly need help!
          robdillon Most Valuable Participant

          From your description it sounds like you want a new movieClip to appear when the user clicks on a particular movieClip. Then you want this new movieClip to react to a user click and show another movieClip, or possibly the first movieClip, all at the same position on the stage. If this description is even close to what you want to achieve, then it may be simpler to just have one movieClip that the user clicks on.


          That one movieClip shows frame 1, for example, on the click event, the movieClip either plays, or uses a tween to hide one object in the movieClip and display a different object. This will simplify the event heirarchy since the user is always clicking on the same movieClip. One the click you are simply "playing" the clip to show different content. This is sort of the way that button objects work, only with more options.