Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1011789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T09:50:48+00:00 2026-05-16T09:50:48+00:00

I been trying to create a gallery in Flash with different movie clips. Timeline

  • 0

I been trying to create a gallery in Flash with different movie clips.

Timeline
-back button
-next button
-stop button
-play button 
-Main Movie
 (these are inside Main Movie)
 --Animation 1
 --Animation 2
 --Animation 3

I have the animations set up in Main Movie with instance name and frame names like “Animation 1”. I got it to play and stop, but I can’t go back and forth through each animations with the back and next buttons. What’s the right way I can pull this off?

—Update 8-20-2010

I got it to work, but with a tiny bug. Whenever I click the next or back buttons it goes to the first frame name then the other. I did a trace and I found it counting “ad-1, ad-2, ad-3, etc..” or “ad1, ad2, ad3, etc..”

var currentAnimationIndex:int;
var currentAnimation:int;
var animeOstart:Number = 1;
var animeOend:Number = 3;

function playAnimation(frameIndex:int):void 
{ 
   var frameName:String = "ad" + frameIndex.toString();
   trace(frameName)
   ads.gotoAndPlay(frameName);
   ads.movie.gotoAndPlay(1);

   currentAnimationIndex = frameIndex; 
} 

function playBack(event:MouseEvent):void 
{ 
   --currentAnimationIndex; 

   if(currentAnimationIndex < animeOstart) 
      currentAnimation == 1; 

  playAnimation(currentAnimationIndex); 
} 

function playNext(event:MouseEvent):void 
{ 
   ++currentAnimationIndex; 

   if(currentAnimationIndex > animeOend) 
      currentAnimation == 3; 

  playAnimation(currentAnimationIndex); 
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T09:50:48+00:00Added an answer on May 16, 2026 at 9:50 am

    Found out how to do it in AS3!!!!

    b_back.addEventListener(MouseEvent.CLICK, prevSection);
    b_next.addEventListener(MouseEvent.CLICK, nextSection);
    
    function nextSection(event:MouseEvent):void {
    
        var thisLabel:String = ads.currentLabel; // gets current frame label as string
        var thisLabelNum:String = thisLabel.replace("ad", ""); // cuts the leading letters off of the number
        var curNumber:Number = Number(thisLabelNum); // converts that string number to a real number
        if (curNumber < 3) {
            var nextNum:Number = curNumber + 1; // adds 1 to the number so we can go to next frame label
            ads.gotoAndPlay("ad" + nextNum); // This allows us to go to the next frame label
        }else if(curNumber >= 3){
            ads.gotoAndPlay("ad" + 1); // This allows us to go to the next frame label
        }
    }
    
    function prevSection(event:MouseEvent):void {
    
        var thisLabel:String = ads.currentLabel; // gets current frame label as string
        var thisLabelNum:String = thisLabel.replace("ad", ""); // cuts the leading letters off of the number
        var curNumber:Number = Number(thisLabelNum); // converts that string number to a real number
        var prevNum:Number = curNumber - 1; // subtracts 1 from the number so we can go to next frame label
        ads.gotoAndPlay("ad" + prevNum); // This allows us to go to the previous frame label*/
        if (curNumber == 1) {
            ads.gotoAndPlay("ad" + 3); // This allows us to go to the next frame label
        }
    
    }
    

    found it from this site. http://www.developphp.com/Flash_tutorials/show_tutorial.php?tid=161

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to create a navigation bar back button. Here is my
I've been trying to create a Web Service with play framework. I've searched some
I've been trying to create a non-flash upload panel which also shows a progress
I have been trying to create a Main program that calls another program, sending
I've been trying to create a color LinearLayout object (1) within another LinearLayout object
I have been trying to create a menu panel with jQuery that can be
I've been trying to create a dynamically named JSON property but I keep hitting
I've been trying to create a list definition based on the SharePoint Discussion Board
I've been trying to create a stable web service application for the last 2-3
I've been trying to create a client side editor which allows the end user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.