Discussion Area

ask questions, discuss topics, solve problems

This is a public Discussion Area  publicRSS

Thread

    • Gah, my actionscript is bad.
      Thread posted May 31 by pfortunato78
      154 Views, 1 Comment
      Title:
      Gah, my actionscript is bad.
      Content:

      Hello everyone!

      Thanks again Rob for a great AC3 class. I'm not sure if this is the right place to put a code help request, but here goes:

      I'm trying to make a rotating banner with buttons on it (check the uploaded FLA). It sorta does what I want it to do right now, but my code is really... REALLY awful.

      Basically, this is what I want it to do:

      1) banner consists of 3 different banners that rotate out with an animation in a continuous loop.

      2) little buttons in the lower right hand side will whisk you to the appropriate banner, but will NOT be clickable on its specific banner.

      3) rolling over the main banner img or the button will also pause the movie

      4) clicking on the main banner img will send you to a URL

      I have a very hard time finding a way to be able to call a function over and over again without remaking the function and renaming it. If you have some time, please take a look at the FLA and pass me some pointers. Thanks all!

      Regards,

      Paul

      File:

    Comments

    • Sorry for putting my entire project into your hands. Instead of throwing too much onto this forum, I'm going to try and break my problems into smaller pieces to see if someone can help. Here goes:

      Instead of trying to frankenstein it with timers, I have decided to create a separate document, create a RotatingBanner MovieClip, and tween all the banners together. Now, I copied that movie clip that hadd all the banners animated in it (RotatingBanner) to my main document and put it on a separate layer.

       

      MY PROBLEM: I can't figure out how to access a frame label within the movie clip RotatingBanner. Here is the code I tried:

       

      btn1_mc.addEventListener(MouseEvent.CLICK, buttonClick1);

       

      function buttonClick1(event:MouseEvent):void{
      RotatingBanner(MovieClip).gotoAndPlay("Go1Banner");
      }

       

      I also tried this

       

      function buttonClick1(event:MouseEvent):void{
      RotatingBanner.gotoAndPlay("Go1Banner");
      }

       

       

      but i get this error when I run it:

       

      1046: Type was not found or was not a compile-time constant: RotatingBanner.

       

      Thanks for any advice!