Can I use the "same" button multiple times for multiple galleries?

OK so I am extremely untrained in CS4 and Actionscript. However I have managed to get along fairly well until I started to dynamically upload images as a gallery. This works great if I have one gallery, but for my site I have 9 galleries!!! I have a back and next button, but I want to be able to use those same buttons for all of the galleries so they look the same. I have split them up and renamed them, but I am clueless on how to script the buttons to work. Please help...and don't laugh at my poor scripting. This is what I have now because I do not know where to put the other button names without getting errors.
stop();
next_btn .addEventListener(MouseEvent.CLICK, nextImage);
var imageNumber: Number=1;
function checkNumber(): void{
    next_btn.visible=true;
    back_btn.visible=true;
    if(imageNumber==15){
        trace(imageNumber);
    next_btn.visible=false;
    if(imageNumber==1){
        trace(imageNumber);
    back_btn.visible=false;
function nextImage(evtObj:MouseEvent):void {
    imageNumber++;
    mc_engagement.source= "photo/engagement/en0"+imageNumber+".jpg";
    mc_amish.source= "photo/amish/Amish"+imageNumber+".jpg";
    mc_chicago.source= "photo/chicago/ch"+imageNumber+".jpg";
    mc_landscapes.source= "photo/landscapes/land"+imageNumber+".jpg";
    mc_goodvsevil.source= "photo/goodvsevil/ge"+imageNumber+".png";
    mc_animals.source= "design/animals/an"+imageNumber+".png";
    mc_icons.source= "design/icons/icon0"+imageNumber+".png";
    mc_objects.source= "design/objects/pc"+imageNumber+".png";
    mc_typography.source= "design/typography/type"+imageNumber+".png";
    checkNumber();
back_btn .addEventListener(MouseEvent.CLICK, backImage);
function backImage(evtObj:MouseEvent):void {
    imageNumber--;
    mc_engagement.source= "photo/engagement/en0"+imageNumber+".jpg";
    mc_amish.source= "photo/amish/Amish"+imageNumber+".jpg";
    mc_chicago.source= "photo/chicago/ch"+imageNumber+".jpg";
    mc_landscapes.source= "photo/landscapes/land"+imageNumber+".jpg";
    mc_goodvsevil.source= "photo/goodvsevil/ge"+imageNumber+".png";
    mc_animals.source= "design/animals/an"+imageNumber+".png";
    mc_icons.source= "design/icons/icon0"+imageNumber+".png";
    mc_objects.source= "design/objects/pc"+imageNumber+".png";
    mc_typography.source= "design/typography/type"+imageNumber+".png";
    checkNumber();

I'm still a novice with Flash myself, but I have two comments.
First, at this point, won't your buttons control all galleries at the same time? Which means, if I go to image 5 in one gallery, then move to another gallery, I'll start at image 5, because the actions are all connected.
Second, you can definitely use the same buttons for multiple galleries. It seems to me that as long as you've assigned the buttons an instance name, these actions should already work to control all the galleries (see the note above). I guess I would need to understand a bit more about how your project is built.

Similar Messages

  • How can you use the same e-mail address for multiple ipads?

    I have two iPads.. an iPad and an ipad 2.  I registared my new ipad 2 and now my old ipad is will not let me log on and is telling me that my e-mail address is already in use.  how can you use the same e-mail address for multiple ipads?

    And by using the same Apple ID you can also share purchases.  If you have a different Apple ID for each iPhone then you can't share purchases.

  • Multiple iphones each with an apple id - can i use the same laptop and itunes for back up, restore and updates?

    We have two iphones each with a different apple id - can i use the same laptop and itunes for back up, restore and updates without risking having my apps overwritten.  Basically does itunes keep the two iphones as two separate entities ?  Does iTunes differentiate between the two devices and keep two different SYNCs ?

    Yes, you can use the same computer for BACK UPS, RESTORING AND UPDATING. But that is it.
    You cannot, however, use it to sync the different devices. iTunes will only recognize one device to sync with and if you sync any other devices with that iTunes library, it will replace what is on the phone with whatever is in the library. It cannot differentiate between devices. At most, it will jsut recognize that the phone has been synced with a different iTunes library.
    So if you would like to use the same computer for backing up, restoring and updating, just make sure to turn of Automatic Syncing in your iTunes Preferences.

  • I have a Ipod Nano and want to get another one , and use both. Can I use the same computer and library for both?

    I have a Ipod Nano and want to get another one , and use both. Can I use the same computer and library for both?

    Yes

  • Can you use the same external hard drive for Time Machine backups and as an additional storage drive?

    I have an external HD that I've been using exclusively for Time Machine backups. I need to clear space on my hard drive, so I was thinking to move music & photos to an external drive.  Wondering if I can use the same one I have (which I'll aslo keep using for Time Machine) or if I need to get another drive. 

    Hi Jossydtaylor,
    Time Machine can use either an entire external disk or a partition of that disk:
    OS X Mountain Lion: Disks you can use with Time Machine
    http://support.apple.com/kb/PH11171
    You can use Time Machine with a Time Capsule, and with USB, FireWire, and Thunderbolt disks. The backup disk can be directly connected to your computer or be on a network. If the backup disk has been divided into partitions, you can use one of the partitions.
    If the disk is partitioned using the Master Boot Record (MBR) partition type, some partitions may not be available for use with Time Machine. The GUID Partition Table (GPT) partition type is recommended.
    For more info on partitioning, see this article:
    Disk Utility 12.x: Partition a disk
    http://support.apple.com/kb/PH5845
    Cheers!
    - Ari

  • My husband and I share an e-mail account.  Can we use the same e-mail account for two different iphone account i.d.'s?

    My husband and I do not have separate e-mail addresses.  Before he purchased an IPhone this was not a problem.  Does we need two separate e-mail addresses to create two separate Apple ID's and register, maintain two separate IPhones?

    And by using the same Apple ID you can also share purchases.  If you have a different Apple ID for each iPhone then you can't share purchases.

  • Can i use the same card to pay for apps as i used on an account i dont longer use?

    i made an update on my iphone. had to change my apple-id and also the account for buying music on i-tunes and apps on app-store. i could enter the numbers on my visacard. does that have to do anything with me changing the account? is it not possible to use the same card as i was using on my last account?

    i COULD'T enter the numbers

  • Can I use the same external hard drive for time machine and storing other files

    I have a 640GB external hard drive that I have been using for over a year for time machine backups.  My mac hard drive is now starting to fill up and I am looking to move audio, video and picture files to my external hard drive.  How do I do this without messing up my time machine backups?  Can I do both on the same external hard drive?  Do I just make new folders on the external hard drive to move the files I want?  Thanks for the help.

    If you move the files you will need to get another disk to back the files up to. You don't want to have only one copy of certain files (personal, professional etc.).

  • How can I use the same thread pool implementation for different tasks?

    Dear java programmers,
    I have written a class which submits Callable tasks to a thread pool while illustrating the progress of the overall procedure in a JFrame with a progress bar and text area. I want to use this class for several applications in which the process and consequently the Callable object varies. I simplified my code and looks like this:
            threadPoolSize = 4;
            String[] chainArray = predock.PrepareDockEnvironment();
            int chainArrayLength = chainArray.length;
            String score = "null";
            ExecutorService executor = Executors.newFixedThreadPool(threadPoolSize);
            CompletionService<String> referee = new ExecutorCompletionService<String>(executor);
            for (int i = 0; i < threadPoolSize - 1; i++) {
                System.out.println("Submiting new thread for chain " + chainArray);
    referee.submit(new Parser(chainArray[i]));
    for (int chainIndex = threadPoolSize; chainIndex < chainArrayLength; chainIndex++) {
    try {
    System.out.println("Submiting new thread for chain " + chainArray[chainIndex]);
    referee.submit(new Parser(chainArray[i]));
    score = referee.poll(10, TimeUnit.MINUTES).get();
    System.out.println("The next score is " + score);
    executor.shutdown();
    int index = chainArrayLength - threadPoolSize;
    score = "null";
    while (!executor.isTerminated()) {
    score = referee.poll(10, TimeUnit.MINUTES).get();
    System.out.println("The next score is " + score);
    index++;
    My question is how can I replace Parser object with something changeable, so that I can set it accordingly whenever I call this method to conduct a different task?
    thanks,
    Tom                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    OK lets's start from the beginning with more details. I have that class called ProgressGUI which opens a small window with 2 buttons ("start" and "stop"), a progress bar and a text area. It also implements a thread pool to conducts the analysis of multiple files.
    My main GUI, which is much bigger that the latter, is in a class named GUI. There are 3 types of operations which implement the thread pool, each one encapsulated in a different class (SMAP, Dock, EP). The user can set the necessary parameters and when clicking on a button, opens the ProgressGUI window which depicts the progress of the respective operation at each time step.
    The code I posted is taken from ProgressGui.class and at the moment, in order to conduct one of the supported operations, I replace "new Parser(chainArray)" with either "new SMAP(chainArray[i])", "new Dock(chainArray[i])", "new EP(chainArray[i])". It would be redundant to have exactly the same thread pool implementation (shown in my first post) written 3 different times, when the only thing that needs to be changed is "new Parser(chainArray[i])".
    What I though at first was defining an abstract method named MainOperation and replace "new Parser(chainArray[i])" with:
    new Callable() {
      public void call() {
        MainOperation();
    });For instance when one wants to use SMAP.class, he would initialize MainOperation as:
    public abstract String MainOperation(){
        return new SMAP(chainArray));
    That's the most reasonable explanation I can give, but apparently an abstract method cannot be called anywhere else in the abstract class (ProgressGUI.class in my case).
    Firstly it should be Callable not Runnable.Can you explain why? You are just running a method and ignoring any result or exception. However, it makes little difference.ExecutorCompletionService takes Future objects as input, that's why it should be Callable and not Runnable. The returned value is a score (String).
    Secondly how can I change that runMyNewMethod() on demand, can I do it by defining it as abstract?How do you want to determine which method to run?The user will click on the appropriate button and the GUI will initialize (perhaps implicitly) the body of the abstract method MainOperation accordingly. Don't worry about that, this is not the point.
    Edited by: tevang2 on Dec 28, 2008 7:18 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Can v use the same Client for setting the ALE ??

    Can i use the same client like 080 for my ALE configuaration ?

    Configuring is a Cross-Client(Client Independent) activity.
    Check whether you have necessary access/authorizations to Configure.
    This should be always done in Development client.
    Hope this helps.
    Regards
    Vinayak

  • I recently bought iphone6, My imessage and face time is not working and still it charged me for normal text message multiple times and still not able to authorise the usage. Let me know how I can start using the same.

    I recently bought iphone6, My imessage and face time is not working and still it charged me for normal text message multiple times and still not able to authorise the usage. Let me know how I can start using the same.

    Hello vinay34,
    If you are having issues with activating your Apple ID for FaceTime and iMessage, then take a look at the article below to get it sorted out. Make sure that you have the Date and Time set to Automatic as well as any other steps listed in the article. 
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/en-us/ts4268
    Regards,
    -Norm G. 

  • How many times can you install Lightroom 5? My problem is that I have saved my programs on C. To I have more space, I want to save my programs now on E. Can I now uninstall Lightroom and reinstall from C to E? Can I use the same license code as the first

    Please help!!
    How many times can you install Lightroom 5? My problem is that I have saved my programs on C. To I have more space, I want to save my programs now on E. Can I now uninstall Lightroom and reinstall from C to E? Can I use the same license code as the first installation?

    Thank you for your answers, it helps me a lot.
    But sorry for my ignorance. I understand how you mean it, but I don't know how to do it. I'm scared to lose the settings/edits of the images.

  • Can I use the same Apple ID for multiple devices

    Can I use the same Apple ID for multiple devices?

    Yes. Up to five devices can be authorized on a single computer using the same Apple ID. You can also use the same Apple ID on multiple devices is they are all going to use the same iTunes Library by the same user. But it's ill-advised if multiple users are involved who wish to keep their devices separate from the devices belonging to other users.
    How to use multiple iPhone, iPad, or iPod devices with one computer
    Using More than One iDevice on the Same Computer
    This applies mainly to couples who are adding another device and do not want their email, messages, etc. being duplicated on both devices. To begin read: How to use multiple iPhone, iPad, or iPod devices with one computer. You need to establish a separate Apple ID and password for whomever will use the new iDevice. See Apple - My Apple ID and Frequently asked questions about Apple ID. The easiest way is to do this on the computer using iTunes: iTunes- How to set up an Apple ID within iTunes.
    On the computer create a new user account for the person with the new iDevice. This will be the user account that person will always use. He/She will no longer use the other user account. This way that person will have a separate iTunes Library
    Start by transferring the new device(s) to a new account along with all your data.  Save any photo stream photos that you want to keep to your camera roll (unless they are already in the camera roll) by opening your Photos app, tap on Albums icon at the bottom. Now, tap on My Photo Stream album; tap Select; tap on the photos you want to select;, tap the share icon (box with upward facing arrow) in the lower left corner; then tap Save to Camera Roll.
    If you are syncing notes with iCloud that you want to keep then you need to open each of your notes and email them to yourself. Later you can copy and paste the text into new notes created in your new account.
    Tap on Settings > iCloud > Delete Account (only deletes it from this device, not from iCloud; the person keeping the current account will not be affected,) provide the password to turn off Find My Phone and choose Keep on My iDevice when prompted.  Sign in with a different Apple ID to create your new account. Choose Merge to upload your data.
    Once you are on separate accounts, you can each go to icloud.com and delete the other person's data from your account.
    Note: The essence of the above was created by user, randers4. I
    have made substantial changes to improve readability and syntax.

  • Can I use the same email address for multiple seats in Creative Cloud for Teams?

    Can I use the same email address for multiple seats in Creative Cloud for Teams?

    No. http://www.adobe.com/products/creativecloud/faq.html
    Can I buy more than one membership to an individual offering of Creative Cloud? 
    No, Adobe has moved to identity-based licensing with a technology that will not support multiple same-product licenses, so you can buy only one membership per Adobe ID. If you need two Creative Cloud memberships, you will need to purchase each with a unique Adobe ID. You can also purchase a Creative Cloud for teams membership, which allows you to purchase and manage multiple seats under one account.

  • Can I use the same administrator password on multiple devices

    Can I use the same administrator password on multiple devices?  (ie) MacBook Pro and Powerbook G 4

    Hello,
    I use the same password on all my Macs. Provided you have set the user accounts with the same password, you will be fine.

Maybe you are looking for

  • Windows 8.1 Boot Camp Setup App Error

    Hello All FINALLY managed to get Win8.1 installed on boot camp, but came across a familiar issue (when I tried with Win7): driver setup isn't working in Win8.1 Win8.1 boots up fine, but i have 5 device drivers that didn't install properly: Bluetooth

  • Dvd player and screen caps..

    im posting this here because its basically a tiger app, but is there a way to get screen capture or small video clips from movies played in dvd player? not idvd

  • How do I get Itunes to show up after deauthorizing main computer

    I wanted to switch which computer I listen to Itunes on...can it be done? i have deauthorized the computer the library was on and authorized the one i want them to be on but no luck. And I cant sync my Iphone4 that the library IS on for fear of losin

  • Can not search through 1003 results

    1. Firefox Help 2. Search Found 1003 results for "where are my posts" I can not search through 1003 results to find my solution. I want to see what I have posted, to what threads I'm subscribed and responses to all. How?

  • Online tutorial,documentation to get simple servlet

    Hi, I am new to servlet. I have J2EE 1.4 SDK in my pc. I want to develop simple servlet,deploy and run. will you please give me some websites ,link of tutorial,documentation to write a simple servlet and deploy in j2EE 1.4? Thank you so much