Making things visible one at a time

Hi I am hoping someone can help me out here!
I have one button, that when clicked should display several images, one at a time. At the minute they are all just coming on together, how do i seperate the functions so they come on individually, for example like bullet points, e.g click once and image1 appears, click again and image2 appears etc... so eventually all of the images are on screen, but they don't all just appear together, if that makes sense!
Thanks for reading

hey here is the code for ur task
import flash.events.MouseEvent;
var imageUrl:Array = new Array("images/image1.jpg",
   "images/image2.jpg",
   "images/image3.jpg",
   "images/image4.jpg");
var imageLoaded:Number = 0;
var loader:Loader;
var xPos:Number=50;
var yPos:Number=30;
clickButton.addEventListener(MouseEvent.CLICK,onClick);
function onClick(event):void{
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onCom);
loader.addEventListener(IOErrorEvent.IO_ERROR,onErr);
loader.load(new URLRequest(imageUrl[imageLoaded]));
function onCom(event):void{
loader.content.x=xPos;
loader.content.y=yPos;
loader.content.width=100;
loader.content.height=100;
addChild(loader.content);
xPos+=110;
imageLoaded+=1;
if(imageLoaded>(imageUrl.length-1)){
clickButton.removeEventListener(MouseEvent.CLICK,onClick);
function onErr(event):void{
trace(event);
U can find the complete fla and the working swf here
http://www.4shared.com/file/1bu8Vjfx/clickImage.html

Similar Messages

  • Eight hidden rows made visible one at a time with one button.

    I have a table with eight (8) hidden rows. I want to make one row visible each time I click a button. Each button click makes the next row visible until all eight are showing. Is there a way to do this? I am using this script to delete individual rows.
    FRM-MEG-02-NoRev.Action.Table1.MoreActions.Delete::click - (JavaScript, client)
    // Prompt the user
    var nResponse = xfa.host.messageBox("You are about to delete this row. \n\nDo you want to continue?", "Deleting a row", 1, 2)
    // Test the response: Yes = 4
    if (nResponse == 4) {_MoreActions.removeInstance(this.parent.index);
         // You deletion script
    // Invoke the Instance Manager to remove the current instance of the detail subform.

    Hi,
    Are the rows populated with data when they are hidden? Would it be better to start off with no rows and then add a new row?
    It should be possible to test the presence of the row in a loop and then take appropriate action. But I think the add/delete would be better than presence/delete.
    Niall

  • HT3209 every time i try to buy anything an error box pops up that says my apple ID has expired and i try making a new one but it keeps telling me the same thing. what do i do?

    every time i try to buy anything an error box pops up that says my apple ID has expired and i try making a new one but it keeps telling me the same thing. i cant find an answer to my problem no mater what i do.

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • TS1368 I want to delete a lot of things childrens stories, albums which are not used which that are on my ipad. However when I go through Itunes it wont show me most of the stuff in my library. it takes ages to delete one at a time.

    I want to delete a lot of things childrens stories, albums which are not used which that are on my ipad. However when I go through Itunes it wont show me most of the stuff in my library. it takes ages to delete one at a time.
    Can you help please?

    Thanks King_Penguin for taking time to read and reply. 
    I just purchased this movie on Thursday, May 15, so just a few days ago.  I have never had any trouble whatsoever since I have been in Vietnam.  I have downloaded several movies and even music and they have all synced to my respected Apple products except for this purchase. 
    Sorry, I don't quite understand what you mean by studios and different versions.  Could you please explain? 
    I checked my purchased list in my purchase history under my account and there are no hidden items. 

  • "all my music is unchecked.  I can not check whole playlists by using the top checkmark to select all.  I went to all my playlists, same thing.  I can only press them ONE at a time, which will take about a day to check all of them." Please help.Windows7

    "While in MY MUSIC on itunes, all my music is unchecked.  I can not check whole playlists by using the top checkmark to select all.  I went to all my playlists, same thing.  I can only press them ONE at a time, which will take about a day to check all of them.
    any ideas?  anyone have same problem?  This just happened since last update." I have windows7

    Thanks A Lot! I should have clicked: "This solved my question" But Thanks all the same!

  • HT201441 i am the first owner of my iphone i erase all data and i am trying to open the phone but its does the same thing like the first photo and i cant find my first apple id because i have deleted the email i used for it because i maked a new one pleas

    i am the first owner of my iphone i erase all data and i am trying to open the phone but its does the same thing like the first photo and i cant find my first apple id because i have deleted the email i used for it because i maked a new one please help

    Why do you need to access your email?  To reset the password?
    If you're trying to change the password, you don't need to go to your email.  If you know the answers to your security questions, you can reset it without using an email, as explained in the first section of this article: http://support.apple.com/kb/HT5787.  If you don't, you can contact Apple for assistance by going to https://expresslane.apple.com, then click More Products and Services>Apple ID>Other Apple ID Topics>Lost or forgotten Apple ID password.

  • I somehow set my toolbar to disappear after a few seconds, making the screen jump, very annoying, how do I set it back so it stays visible all of the time?

    I can't remember where I found the option to make the toolbar invisible until I moved my cursor to where the toolbar usually shows. If I move the cursor again, after a few seconds the toolbar disappears causing the screen to jump up and fill in the space where it was. It is so irritating and I can't find out how to make it visible all of the time.

    You can try to check the '''Options''' for the different '''Extensions''' in '''Tools''' ('''Alt''' + '''T''') > '''Add-ons'''. Starting Firefox temporarily in [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode] may also help determine if an installed add-on is causing the change.

  • I have created a new partition on the Mac HD for Lion as I would like to dual boot. Do I need to install Snow Leopard on that partition before installing Lion? If so, can I use one of my Time Machine backups to do this?

    I have created a new partition on the Mac HD for Lion as I would like to dual boot. Do I need to install Snow Leopard on that partition before installing Lion? If so, can I use one of my Time Machine backups to do this?

    zoominnana wrote:
    Can I set up 2 different time capsule backups? one for the lion partition and one for the snow leopard partition?
    No, you can't partition a Time Capsule's internal HD.  Both partitions will back up to the same sparse bundle. keeping the backups for each partition separate.
    Time Machine will not take the two OSX partitions as two different computers, but for best results, exclude the Snow Leopard drive from backups on the Lion partition, and exclude the Lion partition from backups on the Snow Leopard partition.
    There may be some files on the Lion partition that Time Machine on Snow Leopard won't like, among other things.  See #10 in  Time Machine - Frequently Asked Questions for details.

  • I recently purchased the new nano (7th generation) and I love it except for one issue.  On my old 2nd generation nano, when I played podcasts, it would play podcasts one at a time. So if I had 20 episodes of a podcast on the device, it would stop at the e

    I recently purchased the new nano (7th generation) and I love it except for one issue.  On my old 2nd generation nano, when I played podcasts, it would play podcasts one at a time. So if I had 20 episodes of a podcast on the device, it would stop at the end of each one.
    With the new nano, I can select and play a podcast, but when it’s over, it goes straight to the next one without prompting.  It keeps on playing all of the episodes of any podcast until you stop it manually.  Setting the repeat function differently does not prevent episodes from being played automatically.
    This can be very irritating when I only want to listen to one podcast.  I’ve often fallen asleep listening to one episode of a podcast, only to be woken up hours later by the iPod working its way through all subsequent episodes.  It is also annoying that any podcast which has started automatically in this way is marked as ‘played’ – even if you stop it within a few seconds.  This makes it hard to keep track of what you have actually listened to.
    Is there any way to set the iPod to play all the podcasts individually? I have read the User Guide from cover to cover, and can’t find a way of doing this.
    MD

    Dude or hot-spur,
    Not fishy at all!!!! You really think I would have taken any more of my time to post a bogus rant? We'll no, it is unfortunately all true. I want to hear from anyone who is experiencing such problems not anyone else that wants to put there two cents in. I really don't need anymore hate or negativity. Just people's experiences because I feel like I am the only one having so many problems. Thank you
    Yes, I have had some unfortunate bad luck to have so many problems at the same time, but some of them are just things you cannot do on the new OS.
    Thank you again

  • Windows Update on VMs seems to only work one at a time

    I have a handful of Win 2012 R2 VMs (running on ESXi) I've inherited. I've tried 3 or 4 times to update them now since taking them
    over, and noticed the strangest thing - only one of them will download updates at a time. If I start the update on all of them, the others will just hang at 0%. A little while after one finishes, another one will finally start to download. I'm completely stumped
    as to why/how this could be happening. Is this even possible, or just an incredibly strange coincidence? Is there anything I can check to prove one way or the other? I'm wondering if it's something odd like they were all cloned from one base VM in some odd
    way such that WU is seeing them as the same server when they try to connect or something... Other computers can connect to WU while this is happening; it's just this little cluster of VMs that were all built together.

    Hi Allison,
    Just addition. Did you check if those problematic VMs can access internet at the same time? For example, can
    those VMs browser any webpage successfully at the same time, not just download updates? Meanwhile, please check if there has policies on router ports to limit the number of MAC addresses per port.
    Hope this helps.
    Best regards,
    Justin Gu

  • ICloud keeps duplicating my contacts, any of which I need to delete anyways.  Is there a way to delete multiple contacts at once? I  have been deleting them one at a time, but they keep reappearing.

    ICloud keeps duplicating my contacts, any of which I need to delete anyways.  Is there a way to delete multiple contacts at once? I  have been deleting them one at a time, but they keep reappearing.

    I have exactly the same problem!  I have Outlook 2010 and it does the same thing with my contacts, and calender enteries!! Really frustrating

  • Opening JFrames as objects one at a time

    I have created a program that generates numbers puts them on a JFrame via labels and buttons and closing on the click of the correct answer.
    Example of output
    ......................... *3*
    1 + 2 + = ........ *2*
    .........................*5*
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class QuestionFrame implements ActionListener
         JFrame jf;
         JButton [] but = new JButton[3];
         int randomPlace = (int)(Math.random()*3);
         QuestionFrame (char level, String picNum)
              Numbers N = new Numbers(level);
              jf = new JFrame ("Question");
              jf.setLayout(null);
              jf.setBounds (50, 200, 700,240);
              jf.setResizable(true);
                   JLabel [] lbl = new JLabel[5];     
                   lbl[0] = new JLabel (N.num1());
                     lbl[1] = new JLabel ("+");
                     lbl[2] = new JLabel (N.num2());
                     lbl[3] = new JLabel ("=");
                     for(int h = 0; h < 4; h++)
                          lbl[h].setBounds (70*(h+1), 80, 30, 30);
                     String  [] txt = new String [3];
                     txt[0] = N.falseAns1();
                     txt[1] = N.falseAns2();
                     txt[2] = N.falseAns3();
                     txt[randomPlace] = N.answer();
                     for(int i = 0; i < 3; i++)
                        but= new JButton (txt[i]);
                   for(int j = 0; j < 3; j++)
                        int Y = ((j*60)+20);
                        but[j].setBounds(400, Y, 70, 40);
                   for(int l = 0; l < 3; l++)
                        but[l].addActionListener(this);
                   Container con = jf.getContentPane ();
                   con.setLayout(null);
                   for(int k = 0; k < 3; k++)
                        con.add(but[k]);
                   for(int l = 0; l < 4; l++)
                        con.add(lbl[l]);
                   jf.setVisible(true);
         public void actionPerformed (ActionEvent check)
              if (check.getSource () == but[randomPlace])
                   jf.dispose();
         public static void main (String[]args)
              char level = (JOptionPane.showInputDialog("Type")).charAt(0);
              QuestionFrame [] qf = new QuestionFrame[10];
              for(int i = 0; i < 10; i++)
                   qf[i] = new r(level, i+1+"");
    }Just in case you need it here's the Numbers and ImproveNumbers classes I've madepublic class Numbers
         int sumNum1,      sumNum2,      Answer;
         int falseAns1,      falseAns2,      falseAns3;
         public Numbers(char givenLevel)
              int SumNum1 = 0;
              int SumNum2 = 0;
                   switch(givenLevel)
                   case '1':
                             SumNum1 = (int)(Math.random()*(10+1));
                             SumNum2 = (int)(Math.random()*(9+1));
                             break;
                   case '2':
                             SumNum1 = (int)(Math.random()*(40+1));
                             SumNum2 = ((int)(Math.random()*(5+1))+5);
                             break;
                   case '3':
                             SumNum1 = (int)(Math.random()*(100+1));
                             SumNum2 = ((int)(Math.random()*(15+1))+5);
                             break;
              int trueAnswer = SumNum1+SumNum2;
              int[] falseAnswer = new int[3];
              for(int j = 0; j <3; j++)
                   falseAnswer[j] = ((int)(Math.random()*(15))+trueAnswer)-7;
                   if(falseAnswer[j] < 0)
                        falseAnswer[j] = falseAnswer[j]*(-1);
                   ImproveNumbers IN = new ImproveNumbers(trueAnswer, falseAnswer[0], falseAnswer[1], falseAnswer[2]);
                   falseAnswer[0] = IN.fixNum1();
                   falseAnswer[1] = IN.fixNum2();
                   falseAnswer[2] = IN.fixNum3();
                   sumNum1 = SumNum1;
                   sumNum2 = SumNum2;
                   Answer = trueAnswer;
                   falseAns1 = falseAnswer[0];
                   falseAns2 = falseAnswer[1];
                   falseAns3 = falseAnswer[2];
         String num1()
                   return ""+sumNum1;
         String num2()
                   return ""+sumNum2;
         String answer()
                   return ""+Answer;
         String falseAns1()
                   return ""+falseAns1;
         String falseAns2()
                   return ""+falseAns2;
         String falseAns3()
                   return ""+falseAns3;
    public class ImproveNumbers
         int improvedNum1;
         int improvedNum2;
         int improvedNum3;
         ImproveNumbers(int Answer, int receivedNum1, int receivedNum2, int receivedNum3)
              if(Answer == receivedNum1)
                   receivedNum1 = receivedNum1+1;
              for(int p = 0; p < 2; p++)
                   if(Answer == receivedNum2)
                        receivedNum2 = receivedNum2+1;
                   if (receivedNum1 == receivedNum2)
                        receivedNum2 = receivedNum2+1;
              for(int p = 0; p < 10; p++)
                   if(Answer == receivedNum3)
                        receivedNum3 = receivedNum3+1;
                   if (receivedNum1 == receivedNum3)
                        receivedNum3 = receivedNum3+1;
                   if (receivedNum2 == receivedNum3)
                        receivedNum3 = receivedNum3+1;
              improvedNum1 = receivedNum1;
              improvedNum2 = receivedNum2;
              improvedNum3 = receivedNum3;
         int fixNum1()
                   return improvedNum1;
         int fixNum2()
                   return improvedNum2;
         int fixNum3()
                   return improvedNum3;
    I want each questionFrame to open one at a time, as the
    preceding one is answered correctly and disposes of itself.
    I've search for answers and tried hundreds of combination but I
    don't seem to click it.
    code should run if copied, but
    please don't change too much
    or give too complicated code!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Got the hint the first time. But I don't have much time and I'm not too familiar with JDialogs. I am still working on the whole program's appearance and using frames, buttons and labels are easy.
    I know I'm nagging, but I also need advice on making a thread sleep.
    I have a JFrame with multiple buttons. Certain of them don't work yet. (Not done with them)
    If I click on a buttton a frame of warning should appear, but disappear after a Thread.sleep(2000) by using my own void for the warning frame.
    I think the problem is my try/catch. The sleep happens but the closing void takes place first?
    Here are bits:
    public void actionPerformed (ActionEvent close)
              if(close.getSource () == closeBtn)
                   ExitVerify EV = new ExitVerify();
              if(close.getSource () == but[0])
                        Unavailable     msg = new Unavailable();
              try
                        Thread.sleep(4000);
                        msg.closeNotice();          
                   catch(InterruptedException e)
    public void closeNotice()
              jf.dispose();
         }

  • Why do threads run one at a time?

    [Newbie] Couldn't get help in another forum, so here goes. Tried this in Netbeans 3.5 then at home later in BlueJ, same thing. Thanks in advance!
    I have written a small application to play with threads. I create 3 instances of a class and shoot each one off in a thread, but they all seem to run one at a time, not at the same time. I have posted the code below. The output I expect is something like this:
    0T1
    0T2
    0T3
    1T1
    1T2
    1T3
    2T1
    2T2
    2T3
    498T1
    498T2
    498T3
    499T1
    499T2
    499T3
    500T1
    500T2
    500T3
    The T1 means threadstart1 wrote that line, the T3, means threadstart3 wrote the line, etc. I would expect to see these slightly out of order, too, knowing that the threads will process what they can, when they can. Instead, I see this:
    0T1
    1T1
    2T1
    500T1
    0T2
    1T2
    2T2
    500T2
    0T3
    1T3
    2T3
    500T3
    It's in perfect numeric order, each completing before the next starts. What am I doing wrong?
    //-------------dostuff.java
    package delme2;
    public class dostuff implements Runnable {
    private String mtext;
    public dostuff(String atext) {
    mtext = atext;
    public void run() {
    int j;
    String s;
    //display 500 numbers
    for (j=0; j<500; j++) {
    //build the string
    s = String.valueOf(j) + mtext;
    //show the string
    System.out.println(s);
    //wait a bit before doing this again.
    try {
    Thread.sleep(10);
    } catch (InterruptedException e) {
    //--------------- delme2.java
    package delme2;
    public class delme2 {
    public delme2() {
    System.out.println("Thread demo:");
    Runnable threadstart1 = new dostuff("T1");
    Runnable threadstart2 = new dostuff("T2");
    Runnable threadstart3 = new dostuff("T3");
    Thread t1 = new Thread( threadstart1 );
    Thread t2 = new Thread( threadstart2 );
    Thread t3 = new Thread( threadstart3 );
    t1.run();
    t2.run();
    t3.run();
    public static void main(String[] args) {
    delme2 mydelme2 = new delme2();
    }

    Okay, I'll play along. Having written a task scheduler in C (under tutorial, I admit), I think I qualify. A task scheduler has three jobs at all times.
    1) Execute the code at hand.
    2) Figure out when to stop executing the code at hand.
    3) When stopped, figure out what code to execute next.
    When executing a piece of code, there are different paradigms for determining when to stop and move on. Ideally, a cooperative multitasking system would have threads that relinquish timeslices or have some other method sprinkled throughout their code that indicates to the task scheduler that it's okay to move on to another piece of code. In my experience, that indicator is a Thread.Sleep() or equiavalent. when the thread.sleep() is encountered. The task scheduler has nothing to do for a whopping 10 MS. It could even take 15 or 20 ms if the next process in line takes that long. So what is it doing for 10 ms? It's not executing those other threads, which should be queued for their turn on step #3 as soon as I fire them off with a .run().
    Now, I hope you can see that I've given this some thought and read about it, but I'm missing something. I can get a very similar project to work as I expect it to in .NET and in Delphi. The Java environment has something different about it that I haven't figured out. Here's the c# code that does EXACTLY what I want it to. All threads run at a same time, and I get 0,0,0,1,1,1,2,2,2,3,3,3,4,4,4, etc.. See the similarities?
              private void button1_Click(object sender, System.EventArgs e)
                   lst.Items.Clear();
                   ThreadStart start1 = new ThreadStart(runner);
                   ThreadStart start2 = new ThreadStart(runner);
                   ThreadStart start3 = new ThreadStart(runner);
                   Thread t1 = new Thread(start1);
                   Thread t2 = new Thread(start2);
                   Thread t3 = new Thread(start3);
                   t1.Start();
                   t2.Start();
                   t3.Start();
              private void runner()
                   string s;
                   for (int j=0; j<500; j++)
                        s = j.ToString();
                        lst.Items.Add(s);
                        Thread.Sleep(10);
              }

  • Whenever I launch a new Google window, Google immediately re-opens all other windows I happen to have open but minimized. I then have to either close or re-minimize each window, one at a time. What a pain!!

    Whenever I launch a new Google window, Google immediately re-opens all other windows I happen to have open but minimized. I then have to either close or re-minimize each window, one at a time. What a pain!!

    Just to address the last point: check your History menu to see whether you have the Restore Previous Session option and use that if you can. If that is grayed out or doesn't restore everything, check the Recently Closed Windows and Recently Closed Tabs lists for other pages.
    The unwanted window may be generated by an add-on. Try disabling ALL nonessential or unrecognized extensions on the Add-ons page. Either:
    * Ctrl+Shift+a
    * "3-bar" menu button (or Tools menu) > Add-ons
    In the left column, click Extensions. Then, if in doubt, disable.
    Usually a link will appear above at least one disabled extension to restart Firefox. You can complete your work on the tab and click one of the links as the last step.
    Any improvement?
    Here are some other things to check:
    (1) user.js file that changes Firefox startup behavior and overrides your preferences. This article describes how to track that down and delete it if you have one: [[How to fix preferences that won't save]].
    (2) Possible hijacked shortcut. Check the "target" of the desktop icon you use to start Firefox to see whether it lists the unwanted page. To do that:
    right-click the icon > Properties > Shortcut tab
    For 64-bit Windows 7, the Target should be no more and no less than this:
    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
    (3) Possible undisclosed bundle items. If you have installed any free software recently, check your Windows Control Panel, Uninstall a program for surprises. If you click the "Installed on" column head to group by date, it is easier to spot bundled junk. Remove everything suspicious or unrecognized.
    (4) Supplemental clean up scans. Our support article lists tools other Firefox users have found helpful: [[Troubleshoot Firefox issues caused by malware]].
    Hopefully that cures it.

  • Unable to check mark whole playlists to play since last update.  ONly allows me to check one at a time.  How do I fix?

    While in MY MUSIC on itunes, all my music is unchecked.  I can not check whole playlists by using the top checkmark to select all.  I went to all my playlists, same thing.  I can only press them ONE at a time, which will take about a day to check all of them. 
    any ideas?  anyone have same problem?  This just happened since last update.

    I exactly have the same problem as this "Unable to check mark whole playlists to play since last update.  ONly allows me to check one at a time.  How do I fix?" I have a windows7. Please help.

Maybe you are looking for