I need help with a simple task (PLEASE HELP)

hi, you know how you can make a button and link it to a
different site with the actionscript in this program? well I need
to know of a way like...to make a button and...link it to the next
frame. ok, heres what im trying to make happen...the user presses a
button in the flash program thing and a comment apperars. then they
press it another time and a new one come up...and so on...I could
make like 50 different frames with new comments on them and then
make the button on each frame link to the next frame. is there a
way to do that? if there is I REALLY need your help. please
thanks :)

no need to modify anything - look at the first code:
on (release) {
nextFrame();
that's all you need on the button.
If you want it to happen on click and not release:
on (press) {
nextFrame();
--> **Adobe Certified Expert**
--> www.mudbubble.com
--> www.keyframer.com
mybluehair wrote:
> thank you so much. this will really help me. and, is
there any way I can modify
> that script so that its when the mouse is click, and not
the arrow keys?
>
>
>
>
quote:
Originally posted by:
Newsgroup User
> on (release) {
> nextFrame();
> }
>
> from the help docs (F1):
>
> nextFrame function
> nextFrame() : Void
>
> Sends the playhead to the next frame.
>
> Availability: ActionScript 1.0; Flash Player 2
>
> Example
> In the following example, when the user presses the
Right or Down arrow key,
> the playhead goes to
> the next frame and stops. If the user presses the Left
or Up arrow key, the
> playhead goes to the
> previous frame and stops. The listener is initialized to
wait for the arrow
> key to be pressed, and
> the init variable is used to prevent the listener from
being redefined if the
> playhead returns to
> Frame 1.
>
> stop();
>
> if (init == undefined) {
> someListener = new Object();
> someListener.onKeyDown = function() {
> if (Key.isDown(Key.LEFT) || Key.isDown(Key.UP)) {
> _level0.prevFrame();
> } else if (Key.isDown(Key.RIGHT) ||
Key.isDown(Key.DOWN)) {
> _level0.nextFrame();
> }
> };
> Key.addListener(someListener);
> init = 1;
> }
>
>
>
> ******************************************
> --> **Adobe Certified Expert**
> --> www.mudbubble.com
> --> www.keyframer.com
>
>
>
>
> mybluehair wrote:
> > hi, you know how you can make a button and link it
to a different site with
> the
> > actionscript in this program? well I need to know
of a way like...to make a
> > button and...link it to the next frame. ok, heres
what im trying to make
> > happen...the user presses a button in the flash
program thing and a comment
> > apperars. then they press it another time and a new
one come up...and so
> on...I
> > could make like 50 different frames with new
comments on them and then make
> the
> > button on each frame link to the next frame. is
there a way to do that? if
> > there is I REALLY need your help. please
> >
> > thanks :)
> >
>
>
>
>

Similar Messages

  • Need Help with Rotating Banner ad(please help)

    I am currently working on a flash project that rotates banners out auto and with button control, got the buttons to work just cant figure out how to get it  auto play throgh my bannersThis is the code i have for my project I am working on:
    My Projects has 3 layers:
    ( layer3)Actions:(coded on first frame)     Movieclip.prototype.elasticMove =  function(target, accel, convert) {
         step = step * accel + (target - this._x) * convert;
         this._x += step;
    (layer 2) My movie clip(it is one long strip that has all the banners in a row)(coded on first frame):nClipEvent  (enterFrame) {
                                         elasticMove(_root.newX, 0.5, 0.3)
    onClipEvent(load){
    _root.newX= 1200;
    (layer1)(my buttons)(only code for one button all are the same code except the actual position they call):on(release){
    _root.newX=1200;
    Let me know if i need to be a little more clear or you want a snap shot of my work, Another individual suggested that I use this code in the action layer:
    var newXA:Array=[0,600,1200,1800];
    var index:Number=1;
    setInterval(newXF,9000);
    function newXF(){
    _root.newX = newXA[index%newXA.length];
    It seems to work in the sense after a little bit it does change the banner auto and after you stayed on a banner for a while, but it always changes to the same banner.
    PLEASE HELP SOMEONE!!!!!!

    Incognito mode is a Google Chrome setting when you open a new window (Cmd+Shift+N on a Mac Ctrl+Shift+N on Windows) It opens a "private" window with no cookies and no tracking. The problem with it is that when you disable cookies, your license files are not sent to the site (whetehr it's YouTube or xFinity or any other that uses license files for paid content)  and it treats you as if you're a first time visitor. Paid videos won't play wihtout the cookies sending the license file info.
    This isn't a Flash Player setting. It's in Chrome. I did some research and according to Google, "Incignito" mode is off by default, and can ONLY be activate by the keyboard shortcut. There IS a way to disable it from the registry http://dev.chromium.org/administrators/policy-list-3#IncognitoModeAvailability

  • Need help with merging contacts! Please help!!!

    Hey guys. I have a little problem with my iPhone 4 with iOS 7. I have recently synced all of my contacts with iCloud so that I will be able to export them to my pc, but this is not the problem. Since I was deleting some of the contacts I have noticed that there is a possibility (in the Edit Mode of the contact) to add a Facebook profile. So I tried to do this with a few contacts.
    I am attaching a photo of how my contact with Facebook profile linked to it looks like but it's in iCloud (I get the same thing on my iPhone).
    Sorry for all the black lines. So when I press the name Betyna ... under the Facebook option I get a new Facebook tab open which says - Page not found. Sorry, this page isn't available. The link you followed may be broken, or the page may have been removed.
    This is the same thing I get on my phone.
    Can someone help me with a solution to my problem, because I really want to link Facebook profiles to my phone contacts, but without the whole Settings/Facebook/Update Contacts and all?
    So please help!!!!!

    I'm creating an input source from the string, then i
    pass it to the parser. No, you don't. Look at the source again.
    byteStream = new
    new ByteArrayInputStream(string.getBytes());
    InputSource is = new InputSource(byteStream);
    parser.parse(byteStream, myParser);//the line that
    hat throws the exceptionYou aren't passing the InputSource to the parser at all.
    However, why are you using this roundabout way to pass the string to the parser? Why not justparser.parse(new InputSource(new StringReader(string)), myParser);?

  • Need help with a simple task

    I have just started with Flash and am very unfamiliar with
    the workings of it..On my web site I have a small Flash application
    that I want to also be a hyperlink to another page. But I can't
    figure this out. I actually want the application to be the link and
    not anything inside the application. I am including the code. Can
    someone tell me what I need to do?? Thanks.

    You can just place an invisible button on the top layer of
    the flash time line and code it to getURL. When you said "hyperlink
    to another page", are you referring to an html page or another swf
    file? To make an invisible button in Flash, you can hit Ctrl+F8 to
    bring up the dialog box to create a new symbol, name your button,
    make sure you select the type of button, hit ok, now you are inside
    the button and need to create a "hit" area. Click on the "hit"
    state and press F7 to create a blank key frame. Using the drawing
    tools, select the square, no stroke, and any fill color you want,
    draw a square shape, click on the shape and in your Info Panel,
    change the size of this shape to match the size of your stage,
    lastly, make sure the registration point is (0,0) by using the
    Align Panel. Go back to your main time line, add a layer on your
    time line and make sure it's at the top, drag your new button from
    the library to the stage and align it to (0,0).
    There are two ways to code the button, so to make it easier,
    click on the button once to select it, hit F9 to bring up the
    actions panel and type this
    on(release){
    getURL("
    http://www.someWebsite.com",
    "_blank");// you can also use "_self" //
    If some of this isn't new to you, disregard parts of it. If
    you have any buttons in your Flash application, this will cause
    problems because the invisible button will counter-act anything
    below it. Let me know if this works for you. Of course, this all
    assumes you have access to the flash file.

  • Help with a simple question-please

    Forgive me if this has been covered already, it seems like such a simple request but I can not find any simple answers...
    I am currently using the trial version of acrobat 9.. I am considering buying. I want to create fillable PDF forms(for personal use). When I fill them them out I want to be able to email the filled out form, and save a copy of the filled out form. Can I do this? If yes how?
    Basically, i want to take all my personal forms that I now send out via snail mail(some are order forms, some are claim forms that I send to my insurance co, etc...). I want to make them into fillable pdf's so i can fill them out on my computer and then email them to whoever I choose. Can I do this? How?

    Do you want them to be filled0in with Reader, or Acrobat? To create a form in the first place, you'll need Acrobat. Once you've added the fields and entered the form data, you just have to save it as a new document. You can then attach the document to an email as you would any other type of file. You can also set up a "submit" type button to partially automate the process of saving and attaching a document to an email.
    If you want to create a form that Reader users can fill-in and save, you will have to Reader-enable the document. In Acrobat 9, you do this by opening the document in Acrobat and selecting "Advanced > Extend Features in Adobe Reader...".
    Regarding locking the document, you cannot do it securely with Reader, but you can set up the form so that the fields are set to read-only after it is filled-in but before it is saved. This may require a bit of programming in JavaScript, but it's not too complicated.
    George

  • Need Help With Collection.binarySearch ! Please help me

    * TaxPayerRecord.java
    * Created on December 21, 2006, 11:42 AM
    public class TaxPayerRecord implements Comparable <TaxPayerRecord>
        private String nric;
        private String name;
        private String dateOfBirth;
        private String gender;
        private String blockNo;
        private String unitNo;
        private String streetName;
        private String bldgName;
        private String postalCode;
        private long totalIncome;
        private long totalDonation;
        private long totalPersonalRelief;
         * Creates a new instance of TaxPayerRecord
        public TaxPayerRecord(String nric, String name, String dateOfBirth, String gender,
                                 String blockNo, String unitNo, String streetName, String bldgName,
                                 String postalCode, long totalIncome, long totalDonation,
                                 long totalPersonalRelief)
            this.nric = nric;
            this.name = name;
            this.dateOfBirth = dateOfBirth;
            this.gender = gender;
            this.blockNo = blockNo;
            this.unitNo = unitNo;
            this.streetName = streetName;
            this.bldgName = bldgName;
            this.postalCode = postalCode;
            this.totalIncome = totalIncome;
            this.totalDonation = totalDonation;
            this.totalPersonalRelief = totalPersonalRelief;
        public String toString()
            return nric+"|"+name+"|"+dateOfBirth+"|"+gender+"|"+blockNo+"|"+unitNo+"|"+streetName+"|"+
                   bldgName+"|"+postalCode+"|"+totalIncome+"|"+totalDonation+"|"+
                   totalPersonalRelief;
        public long getTotalIncome()
            return totalIncome;
        public long getTotalDonation()
            return totalDonation;
        public long getTotalPersonalRelief()
            return totalPersonalRelief;
        public String getDateOfBirth()
            return dateOfBirth;
        public String getPostalCode()
            return postalCode;
        public int compareTo (TaxPayerRecord next)
              return this.nric.compareTo(next.nric);
    } //TaxPayerRecord
    import java.io.*;
    import java.util.*;
    public class TaxPayerProgramme
         public TaxPayerProgramme()
                             String menu = "Options: \n"
                                            + "1. Compute And Print List Of Tax Payers (Sorted by NRIC) \n"
                                            + "2. Compute And Summary Of Tax Revenue \n"
                                            + "3. Search for Tax Payer by NRIC \n"
                                            + "Enter option(1-2,0 to quit): ";
                             System.out.print(menu);
                             Scanner input = new Scanner( System.in );
                             int choice = input.nextInt();
                             System.out.println("");
                         // Declaration
                             ArrayList<TaxPayerRecord> list = new ArrayList<TaxPayerRecord>();
                             String inFile ="TaxPayer2005.txt";
                             String line = "";
                             String nric;
                             String name;
                             String dateOfBirth;
                             String gender;
                             String blockNo;
                             String unitNo;
                             String streetName;
                             String bldgName;
                             String postalCode;
                             long totalIncome;
                             long totalDonation;
                             long totalPersonalRelief;
                        try{
                             //Read from file
                             FileReader fr = new FileReader (inFile);
                             BufferedReader inFile1= new BufferedReader (fr);
                             line=inFile1.readLine();
                                       while (line!=null)
                                       StringTokenizer tokenizer = new StringTokenizer(line,"|");
                                       nric=tokenizer.nextToken();
                                       name=tokenizer.nextToken();
                                       dateOfBirth=tokenizer.nextToken();
                                       gender=tokenizer.nextToken();
                                       blockNo=tokenizer.nextToken();
                                       unitNo=tokenizer.nextToken();
                                       streetName=tokenizer.nextToken();
                                       bldgName=tokenizer.nextToken();
                                       postalCode=tokenizer.nextToken();
                                       totalIncome=Long.parseLong(tokenizer.nextToken());
                                       totalDonation=Long.parseLong(tokenizer.nextToken());
                                       totalPersonalRelief=Long.parseLong(tokenizer.nextToken());
                                       TaxPayerRecord person = new TaxPayerRecord(nric,name,dateOfBirth,gender,blockNo,unitNo,
                                                                                              streetName,bldgName,postalCode,totalIncome,
                                                                                              totalDonation,totalPersonalRelief);
                                       list.add(person);
                                       line=inFile1.readLine();
                                       }//end while
                              inFile1.close();
                             }// end try
                        catch (Exception e)
                              e.printStackTrace();
                        }//end catch
                        do{
                                  switch(choice)
                                       case 0:
                                       System.exit(0);
                                       break;
                                       case 1:
                                       // run list
                                       printList(list);
                                       break;
                                       case 2:
                                       printSummary(list);
                                       break;
                                       case 3:
                                       search(list,input);
                                       break;
                                  }//end switch
                             System.out.print(menu);
                             choice = input.nextInt();
                             System.out.println("");
                             }// end do
                             while(choice !=0);
                             Collections.sort(list);
         }//end TaxPayerProgramme()
         private void total(ArrayList<TaxPayerRecord> list)
              // Declaration
              double total=0;
              // calculate total
                   for (int i=0; i<list.size(); i++)
                   total=+ tax(i,list);
              //print msg
              System.out.println("Total revenue collectable for year 2006 (S$): "+total+"\n");
         private double tax(int i,ArrayList<TaxPayerRecord> list)
              // Declaration
              double income;
              double tax;
              // calculate income
              income =list.get(i).getTotalIncome()-list.get(i).getTotalDonation()
                        -list.get(i).getTotalPersonalRelief();
              // calculate tax
                   if (income>320000)
                        tax=(((income-320000)*0.21)+44850);
                   else if (income>160000)
                        tax=(((income-160000)*0.18)+16050);
                   else if (income>80000)
                        tax=(((income-80000)*0.145)+4450);
                   else if (income>40000)
                        tax=(((income-40000)*0.0875)+950);
                   else if (income>30000)
                        tax=(((income-30000)*0.0577)+375);
                   else
                        tax=((income-20000)*0.0577);
              return tax;
         private void totalAge(ArrayList<TaxPayerRecord> list)
                   // Declaration
                   String msg;
                   int i,age;
                   double grp1=0;
                   double grp2=0;
                   double grp3=0;
                   double grp4=0;
                   // calculate revenue by age
                        for (i=0; i<list.size(); i++)
                        age= 2006- Integer.parseInt(list.get(i).getDateOfBirth().substring(6,list.get(i).getDateOfBirth().length()));
                        if (age>55)
                             grp4 =+ tax(i,list);
                        else if (age>35)
                             grp3 =+ tax(i,list);
                        else if (age>17)
                             grp2 =+ tax(i,list);
                        else
                             grp1 =+ tax(i,list);
                   //print msg
                   msg="Total revenue by age range (S$) \n"+
                        "\t"+"(1 to 17)"+"\t"+ grp1 +"\n"     +
                        "\t"+"(18 to 35)"+"\t"+ grp2 +"\n"     +
                        "\t"+"(36 to 55)"+"\t"+ grp3 +"\n"     +
                        "\t"+"(above 55)"+"\t"+ grp4 +"\n";
                   System.out.println(msg);
        private void totalDistrict(ArrayList<TaxPayerRecord> list)
                   int count=1;
                   double temp=0;
                   double [][] array = new double [list.size()][2];
                        for (int i=0; i<list.size(); i++)
                        array[0]=Double.parseDouble(list.get(i).getPostalCode().substring(0,2));
                        array[i][1]=tax(i,list);
                   System.out.println("Total revenue by district (S$) ");
                        do{
                                  for (int a=0; a<list.size(); a++)
                                       if (count == array[a][0] )
                                       temp=array[a][1];
                                  }//end for loop
                             System.out.print("\t"+"(district "+count+")"+"\t"+ temp +"\n");
                             temp=0;
                             count++;
                        }while(count!= 80);// end of do_while loop
              System.out.print("\n");
         private void printList(ArrayList<TaxPayerRecord> list)
              System.out.println("List of Tax Payers fpr Year 2006");
                   for (int i=0; i<list.size(); i++)
                   System.out.println((i+1)+") "+list.get(i)+"|"+tax(i,list)+"\n");
         private void printSummary(ArrayList<TaxPayerRecord> list)
                   total(list);
                   totalAge(list);
                   totalDistrict(list);
         private void search(ArrayList<TaxPayerRecord> list,Scanner input)
                   int value;
                   System.out.print("Enter NRIC Number: ");
                   String nric = input.next();
                   Collections.sort(list);
                   value = Collections.binarySearch(list,nric);
         public static void main(String [] args)
                   new TaxPayerProgramme();
    Can someone help me with this?
    I can't find the error.
    The error msg display:
    C:\Documents and Settings\Xiong\Desktop\TaxPayerProgramme.java:285: cannot find symbol
    symbol : method binarySearch(java.util.ArrayList<TaxPayerRecord>,java.lang.String)
    location: class java.util.Collections
                   value = Collections.binarySearch(list,nric);
                   ^
    1 error
    Tool completed with exit code 1

    Well, this is the error, Java6 gives me on your code:The method binarySearch(List< ? extends Comparable<? super T> >, T) in the type Collections
    is not applicable for the arguments (ArrayList<TaxPayerRecord>, String)     The method expects the first parameter, to be a List whose children are Comparable to the second parameter. Your second parameter is String, so the List should be on String not on TaxPayerRecord, or, your second parameter should be a TaxPayerRecord and not a String.
    �dit: Another thought. From the error code you posted, I would assume, that you might have the wrong JDK libraries in your path.

  • Help with a simple program please

    Hello, I am trying to create a java program that will request a password from the user (just input no gui fancy stuff) and give the user 5 tries to get it right. After the 4th guess, it needs to go from "You have # trials left." to "You have 1 trial left." It needs to become singular.
    I have successfully created a program that does this, but it uses 5 if statements and 1 while. I was curious as to if there was a way to make this more "pretty" to look at. Perhaps eliminate some of the ifs. I'm not sure, but some help would be great. Thanks!

    Sorry, this is lessakilla. It seems I have two accounts here. I'll look into fixing that. But here is my dilemma still.
    Well, I'm looking for a cleaner look. My program works fine and does what I want it to do, but i was wondering if I could somehow eliminate some of the if statements. There is a skeleton of the program below. Thanks in advance!
    while count < 3
            if guess.equals(password)
    print (correct. welcome)
       print (incorrect, you have (4 - count) trials left.)
    ++count;
            }Then I have this
    if count == 3
            if guess.equals(password)
    print (correct. welcome)
    print (incorrect, you have (4 - count) trial left.)
    ++count;
         }Finally I have this
    if count == 4
            if guess.equals(password)
    print (correct. welcome)
    print (incorrect, you lose.)
         }Edited by: vegunks on Oct 9, 2007 7:35 PM

  • Help with a simple task

    Hi, I'm quite new to AS so this is actually quite simple but
    is something I've yet to figure out.
    My flash movie comprises of several sections, and all these
    can be accessed from the main menu. Right now, what I'm doing is to
    preload all the sections at once before starting the clip. However,
    as more sections are added on, I found that it takes longer and
    longer to preload. Therefore, I wish to preload just the main menu
    first. Only after the user selects the section he wanted to enter
    will that section be loaded. I understand this is what a lot of
    websites are doing now but I'm still trying to understand the
    mechanics...greatly appreciated for any help rendered!

    Hi, thanks for the help, I worked it out to be something like
    this:
    this.onRelease= function(){
    loadMovieNum(section2.swf, 0)
    My site works in such a way that there're many big buttons on
    the main page, and clicking on them leads to a sub-section which
    will replace the main page. Using the loadMovieNum() function
    works, but how do I access some of the variables that I declared on
    the main clip? For example, I've got a soundvol variable that I
    want to decrease as I load section2.swf...this is to fade out the
    background music of the main clip...thanks for any help!

  • Help with arrays...Please Help

    Hello,
    Iam trying to make a library system. I have three classes, one for the GUI, User class, and Users class. User class instantiates an object with all the relevant data like, Name, Age, Address, etc. The Users class contains a array of User Objects.
    With this program I have to be able to create users, display users and delete users. The problem Iam having is displaying them. (I think I correctly store the User Objectsin the array, and Iam having problems retreiving them). The thing is when I run the program I don't get any exception errors, just nothing gets displayed!
    Here is part of my code:
    public class Users {
    //declaring variables
    public Users (){
    initialiseArray();
    public void initialiseArray(){
    userArray = new User [50];
    // This method first checks to see if there is enough room for a new
    // user object. If there is the object is added to the array, if there is'nt
    // Then method expandUserArray is called to make room for the user
    public void addUser( User user)
    if (userArraySize == userArray.length) {
    expandUserArray();
    userArray[userArraySize] = user;
    userArraySize++;
    // In this method first the user is searched for in the array, if found
    // Then method decreaseUserArray is called to delete the user
    public void deleteUser ( User user )
    location = 0;
    while (location < userArraySize && userArray[location] != user) {
    location++;
    if (userArray[location] == user) {
    decreaseUserArray(location);
    public void displayUsers( ){
    for (int i = 0; i < userArraySize; i++) {
    usersInformation += "\n" + (userArray.getUserName());
    usersInformation += "\t" + (userArray[i].getUserID());
    usersInformation += "\t" + (userArray[i].getUserAddress());
    public String getUserInformation(){
    //usersInformation = userInformation.toString();
    return usersInformation;
    // The User is deleted by shifting all the above users one place down
    private void decreaseUserArray(int loc)
    userArray[loc] = userArray[userArraySize - 1];
    userArray[userArraySize - 1] = null;
    userArraySize--;
    // This method increase the size of the array by 50%
    private void expandUserArray( )
    int newSize = (int) (userArray.length * increasePercentage);
    User newUserArray[] = new User[newSize];
    for (int i = 0; i < userArray.length; i++) {
    newUserArray[i] = userArray[i];
    userArray = newUserArray;
    Is there anything wrong with my arrays??? Here is part of my code for action performed:
    void addUserButton_actionPerformed(ActionEvent e) {
    newUserName = userNameTextField.getText();
    newUserAddress = userAdressTextField.getText();
    newUserID = Integer.parseInt ( userIDTextField.getText());
    User newUser = new User (newUserName, newUserAddress, newUserID);
    Users users = new Users();
    users.addUser(newUser);
    clearButton();
    void displayUsersButton_actionPerformed(ActionEvent e) {
    Users users = new Users();
    users.displayUsers();
    displayUsersTextArea.append (users.getUserInformation());
    void deleteUserButton_actionPerformed(ActionEvent e) {
    //Still incomplete
    Thanks for your help!

    First, PLEASE USE THE SPECIAL TOKENS FOUND AT
    http://forum.java.sun.com/faq.jsp#messageformat WHEN
    POSTING CODE!!!! Sorry about that, Iam new and I did'nt know about Special Tokens.
    As far as the problem, let me start out by asking if
    you've considered using a class that implements the
    List interface. Perhaps Vector or ArrayList would
    make a better choice since they already handle
    "growing" and "shrinking" for you.I tried using vector arrays but it got too complicated. It was very easy to add and remove objects from the vector but I never figured out how to display all the objects with all the data.
    public void displayUsers( ){
    for (int i = 0; i < userArraySize; i++) {
    usersInformation += "\n" +
    " + (userArray.getUserName());   //what is
    usersInformation?  Also, how does getUserName(),
    getUserID(), getUserAddress() know which user object
    to operate on if these are methods of userArray?
    usersInformation += "\t" +
    " + (userArray.getUserID());     //I'm guess you've
    only posted "some" of your code. 
    usersInformation += "\t" +
    " + (userArray.getUserAddress());//Try posting all
    that you have so far, and please use the special
    tokens to format your code.
    }I made a mistake while I was cutting & pasting my code. It should be for example:
    usersInformation += "\n" (userArray.getUserName());
    The comment about instanciating a new Users for each
    actionPerformed is on point. You are replacing your
    Usres with a new object each time.Yep this was the problem. I just changed the constructor, declared and
    created object of Users elsewhere.
    Thanks for your help!

  • Neep help with infinite loop! Please Help

    I currently have a program that allows a user to enter a password protected site and it will return all the images on that page.
    I�m trying to allow the user to type in the root URL, i.e. http://stage.diabetescontrolforlife.com/ and have the program pull all the images in all of the child directories. i.e. http://stage.diabetescontrolforlife.com/tool.aspx
    I got an inner class similar to the one pulling the <IMG> tag, that pulls the <A> tag. The class adds all the links to a linkList Arraylist. In my main method I call image.getInfo(image.getLinkList()); hoping that I can just pass all the links back through the program and find all the <IMG> tags.
    The problem is that, I get the desired output but it displays in an infinite loop, and the program never ends as it searches linkList over and over for <IMG> tags.
    So, I tried to adding two different Do, While loops.
    Main Method:
    do
                image.getInfo(image.getLinkList());
                test=1;
    }while(test != 1);This one does not change the output. Infinite loop continues.
    Inner Class:
    HTMLEditorKit.ParserCallback callback;
    callback = new HTMLEditorKit.ParserCallback ()
               public void handleStartTag(HTML.Tag tag, MutableAttributeSet attributes, int position)
                            do
                                        if (tag == HTML.Tag.A)
                                                    link = (String)attributes.getAttribute (HTML.Attribute.HREF);
                                                   if(link != null && !link.startsWith("javascript") && !link.startsWith("#") &&        link.startsWith("/"))
                                                                link = root + link;
                                                                linkList.add(link);
                                                               test=1; 
                    }while(test!=1);
    public void handleSimpleTag (HTML.Tag tag,MutableAttributeSet aset,int pos)
    {if (tag == HTML.Tag.IMG )This one never allows the first URL to be checked, and the program just sits there.
    Do you see anything I�m doing wrong, or anyway I can stop the infinite loop?
    I think the problem is that both of the searching tag classes are inner classes but I don�t know how to make them their own classes without messing up the whole password checking.
    Any advice would be helpful!

    HTMLEditorKit.ParserCallback callback;
              callback = new HTMLEditorKit.ParserCallback ()
                public void handleSimpleTag (HTML.Tag tag,MutableAttributeSet aset,int pos)
                        if (tag == HTML.Tag.IMG )
                            src = (String)
                                         aset.getAttribute (HTML.Attribute.SRC);
                            alt = (String)
                                         aset.getAttribute (HTML.Attribute.ALT);
                            height = (String)
                                         aset.getAttribute (HTML.Attribute.HEIGHT);
                            width = (String)
                                         aset.getAttribute (HTML.Attribute.WIDTH);
                            //System.out.println("SRC = " + src);
                            //System.out.println("ALT = " + alt);
                            System.out.println("ROOT2"+root);
                            System.out.println("SRC1"+src);
                            if(src.startsWith("http"))
                            else
                            if(src.startsWith("../"))
                                src = src.replace("../", "");
                                src = root +"/"+ src;
                            else
                            if(src.startsWith("/"))
                                src = root + src;
                            else
                                src = root +"/"+ src;
                            System.out.println("SRC2"+src);
                            altList.add(alt);
                            srcList.add(src);
                            heightList.add(height);
                            widthList.add(width);
                            currentUrl.add(passUrl);
                            if(alt == null)
                                altPresent.add("No");
                            else
                                altPresent.add("Yes");
                            URI uri = null;
                            try
                                if (!uriBase.toString ().endsWith ("/") &&
                                    !src.startsWith ("/"))
                                    src = "/" + src;
                              uri = new URI (src);
                                uri = uriBase.resolve (uri);
                                System.out.println("URL"+passUrl);
                                System.out.println ("uri being " +
                                                    "processed ... " + uri);
                                System.out.println("ROOT3"+root);
                            catch (URISyntaxException e)                           
                               System.err.println ("Bad URI");
                               return;
                            // Convert the URI to a URL so that its input
                            // stream can be obtained.
                            URL url = null;
                            try
                                url = uri.toURL ();
                            catch (MalformedURLException e)
                              System.err.println ("Bad URL");
                                return;
                            //InputStream is;
                            //String filename = url.getFile ();
                            //int i = filename.lastIndexOf ('/');
                            //if (i != -1)
                            //    filename = filename.substring (i+1);
                    @Override
               public void handleStartTag(HTML.Tag tag, MutableAttributeSet attributes, int position)
                            //while(test!=1)
                                System.out.println("TEST"+test);
                            if (tag == HTML.Tag.A)
                                link = (String)
                                             attributes.getAttribute (HTML.Attribute.HREF);
                                if(link != null && !link.startsWith("javascript") && !link.startsWith("#") && link.startsWith("/"))
                                    /*if(link.startsWith("/"))
                                        link = root + link;
                                    else
                                    if(!link.startsWith("http"))
                                        link = root +"/"+ link;
                                    //if(link.contains(root))
                                        link = root + link;
                                       test=1;
                                          linkList.add(link);
              try
                         HttpURLConnection urlConn = null;
                        //URL url = new URL(server);
                        // Build the string to be used for Basic Authentication <username>:<password>
                        String userPassword =  "testmlr" + ":" + "stage1-7000";
                        // Base64 encode the authentication string
                        String encoding = new sun.misc.BASE64Encoder().encode (userPassword.getBytes());
                        //URLConnection
                        urlConn = (HttpURLConnection) url.openConnection();
                        // Enable writing to server ( to write request )
                        urlConn.setDoOutput(true);
                        // Enable reading from server ( to read response )
                        urlConn.setDoInput(true);
                        // Disable cache
                        urlConn.setUseCaches(false);
                        urlConn.setDefaultUseCaches(false);
                        // Set Basic Authentication parameters
                        urlConn.setRequestProperty ("Authorization", "Basic " + encoding);
                       // test(server);
                        BufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
                  new ParserDelegator().parse(in, callback, false);
                  System.out.println(in + "test123412341234");
              catch (ChangedCharSetException e)
                  String csspec = e.getCharSetSpec ();
                 Pattern p = Pattern.compile ("charset=\"?(.+)\"?\\s*;?",
                                             Pattern.CASE_INSENSITIVE);
                  Matcher m = p.matcher (csspec);
                  String charset = m.find () ? m.group (1) : "ISO-8859-1";
                  // Read and parse HTML document using appropriate character set.
    public ArrayList getLinkList()
           return linkList;
       }

  • HT1212 ipod touch has been disabled and says connect to itunes can't get any help with it can you please help

    My son has an IPOD touch 16gb he changed the password and then forward the sequence of numbers as a result its disabled and says connect to ITunes

    See my response to your other post

  • HT4199 I just got a new iPod touch 4th generation and I'm trying to connect to my router and my iPod says, 'Cannont find network.' I don't know what to do! No other networks come up on the list so I can't 'tag' along with thier wifi. Please help. I need a

    I just got a new iPod touch 4th generation and I'm trying to connect to my router and my iPod says, 'Cannont find network.' I don't know what to do! No other networks come up on the list so I can't 'tag' along with thier wifi. Please help. I need advice.

    What type network is yu router set up for? The 4G iPod can only connect and see 2.4 GHZ networl like B, G and the 2,4 GHz N. There is also a 5 GHz N but the iPod will not even seethat network.
    See:
    iOS: Troubleshooting Wi-Fi networks and connections
    iOS: Recommended settings for Wi-Fi routers and access points

  • Need help with threads?.. please check my approach!!

    Hello frnds,
    I am trying to write a program.. who monitors my external tool.. please check my way of doing it.. as whenever i write programs having thread.. i end up goosy.. :(
    first let me tell.. what I want from program.. I have to start an external tool.. on separate thread.. (as it takes some time).. then it takes some arguments(3 arguments).. from file.. so i read the file.. and have to run tool.. continously.. until there are arguments left.. in file.. or.. user has stopped it by pressing STOP button..
    I have to put a marker in file too.. so that.. if program started again.. file is read from marker postion.. !!
    Hope I make clear.. what am trying to do!!
    My approach is like..
    1. Have two buttons.. START and STOP on Frame..
    START--> pressed
    2. check marker("$" sign.. placed in beginning of file during start).. on file..
         read File from marker.. got 3 arg.. pass it to tool.. and run it.. (on separate thread).. put marker.. (for next reading)
         Step 2.. continously..
    3. STOP--> pressed
         until last thread.. stops.. keep running the tool.. and when last thread stops.. stop reading any more arguments..
    Question is:
    1. Should i read file again and again.. ?.. or read it once after "$" sign.. store data in array.. and once stopped pressed.. read file again.. and put marker ("$" sign) at last read line..
    2. how should i know when my thread has stopped.. so I start tool again??.. am totally confused.. !!
    please modify my approach.. if u find anything odd..
    Thanks a lot in advance
    gervini

    Hello,
    I have no experience with threads or with having more than run "program" in a single java file. All my java files have the same structure. This master.java looks something like this:
    ---master.java---------------------------------------------------
    import java.sql.*;
    import...
    public class Master {
    public static void main(String args []) throws SQLException, IOException {
    //create connection pool here
    while (true) { // start loop here (each loop takes about five minutes)
    // set values of variables
    // select a slave process to run (from a list of slave programs)
    execute selected slave program
    // check for loop exit value
    } // end while loop
    System.out.println("Program Complete");
    } catch (Exception e) {
    System.out.println("Error: " + e);
    } finally {
    if (rSet1 != null)
    try { rSet1.close(); } catch( SQLException ignore ) { /* ignored */ }
    connection.close();
    -------end master.java--------------------------------------------------------
    This master.java program will run continuously for days or weeks, each time through the loop starting another slave process which runs for five minutes to up to an hour, which means there may be ten to twenty of these slave processes running simultaneously.
    I believe threads is the best way to do this, but I don't know where to locate these slave programs: either inside the master.java program or separate slave.java files? I will need help with either method.
    Your help is greatly appreciated. Thank you.
    Logan

  • I have created a form which needs to be completed once a week for 6 weeks. On completing week 1, weeks 2 - 6 are completed at the same time with week 1 information. please help?

    I have created a form which needs to be completed once a week for 6 weeks. On completing week 1, weeks 2 - 6 are completed at the same time with week 1 information. please help?

    Hello, thanks for replying.
    Yes they just copy to the next page, the fields are the same. The document is an observation to school lessons so it needs to be consistent but with different data on.

  • I am trying to buy an app (Aperture). I don't see a "buy" icon in the app store. If I go to Apple site, there is a buy icon but when I click it, I get a dialogue box saying the link needs to be opened with an application. Please help. Thanks.

    I am trying to buy an app (Aperture). I don't see a "buy" icon in the app store. If I go to Apple site, there is a buy icon but when I click it, I get a dialogue box saying the link needs to be opened with an application. Please help. Thanks.

    Hi ...
    Installing the OS X Lion Update 10.7.3 (Client Combo) will reinstall the App Store for you.
    Restart your Mac after the combo is installed then try purchasing Aperture.

Maybe you are looking for

  • My iPhone 6 isn't charging?

    I will plug my iPhone 6 to be charged and it doesn't charge. It has worked intermitently since i have purchased it.

  • Would you tell me If window server installed with "routing and remote access" can output firewall logs.

    I install "routing and remote access" into Window Server and make it work as a firewall. When connections are accepted or denied at firewall, would you tell me if the firewall can output the logs ? If that function can, would you tell me how to confi

  • Partition nicht löschbar?!

    Hallo liebe Community! Ich habe ein großes Problem und zwar, ich habe mit Boot Camp eine Windows 7 Partition installiert, ging alles reibungslos. Jedoch bemerkte ich das ich einen Fehler bei der Installation der Windows Partition machte und wollte di

  • Delete & full upload with seletion using DTP

    Hi, We have a scenario where we have to upload data everyday to cube for current month( scheduled job) . And there should be provision to upload data for any month any time also. Whenever upload for any month is complete we have to delete overlapping

  • Problema bluetooth e contatti

    Salve, da quando ho fatto l aggiornamento ad ios 6.1 ho problemi non mi si  collega in bluetooth con il vivavoce auto in piu adesso mi accorgo che i contatti nell'iphone 4 sono decimati ed anche se faccio sincronizza questi contatti non vengono aggiu