How  can i run this code correctly?

hello, everybody:
    when  i run the code, i found that it dons't work,so ,i  hope somebody can help me!
    the Ball class is this :
    package {
    import flash.display.Sprite;
    [SWF(width = "550", height = "400")]
    public class Ball extends Sprite {
        private var radius:Number;
        private var color:uint;
        private var vx:Number;
        private var vy:Number;
        public function Ball(radius:Number=40, color:uint=0xff9900,
        vx:Number =0, vy:Number =0) {
            this.radius= radius;
            this.color = color;
            this.vx = vx;
            this.vy = vy;
            init();
        private function init():void {
            graphics.beginFill(color);
            graphics.drawCircle(0,0,radius);
            graphics.endFill();
and the Chain class code is :
package {
    import flash.display.Sprite;
    import flash.events.Event;
    [SWF(width = "550", height = "400")]
    public class Chain extends Sprite {
        private var ball0:Ball;
        private var ball1:Ball;
        private var ball2:Ball;
        private var spring:Number = 0.1;
        private var friction:Number = 0.8;
        private var gravity:Number = 5;
        //private var vx:Number =0;
        //private var vy:Number = 0;
        public function Chain() {
            init();
        public function init():void {
            ball0  = new Ball(20);
            addChild(ball0);
            ball1 = new Ball(20);
            addChild(ball1);
            ball2 = new Ball(20);
            addChild(ball2);
            addEventListener(Event.ENTER_FRAME, onEnterFrame);
        private function onEnterFrame(event:Event):void {
            moveBall(ball0, mouseX, mouseY);
            moveBall(ball1, ball0.x, ball0.y);
            moveBall(ball2, ball1.x, ball1.y);
            graphics.clear();
            graphics.lineStyle(1);
            graphics.moveTo(mouseX, mouseY);
            graphics.lineTo(ball0.x, ball0.y);
            graphics.lineTo(ball1.x, ball1.y);
            graphics.lineTo(ball2.x, ball2.y);
        private function moveBall(ball:Ball,
                                  targetX:Number,
                                  targetY:Number):void {
            ball.vx += (targetX - ball.x) * spring;
            ball.vy += (targetY - ball.y) * spring;
            ball.vy += gravity;
            ball.vx *= friction;
            ball.vy *= friction;
            ball.x += vx;
            ball.y += vy;
thanks every body's help!

ok, thanks for your reply ! I run this code in the Flex builder 3!and the Ball class and the Chain class are all in the same AS project!
  and i changed the ball.pv property as public in the Ball class, and  the Chain class has no wrong syntactic analysis,but the AS code don't run.so this is the problem.
2010-04-21
Fang
发件人: Ned Murphy <[email protected]>
发送时间: 2010-04-20 23:01
主 题: how  can i run this code correctly?
收件人: fang alvin <[email protected]>
I don't see that the Ball class has a pv property, or that you even try to access a pv property in the Chain class.  All of the properties in your Ball class are declared as private, so you probably cannot access them directly.  They would need to be public.  Also, I still don't see where you import Ball in the chain class such that it can use it.

Similar Messages

  • How can i know how to redeem the code? how can i get this code?

    how can i know how to redeem the code? how can i get this code? please i need you help
    <Email Edited by Host>

    You are trying to create a new Apple ID? You don't have one yet? Is that correct?
    If so, then see this article on how to creat your Apple ID - and make up a password for it. Remember to write it down immediately.
    http://support.apple.com/en-us/HT203993

  • I want to type "0800" or "20.00"; Pages automatically "corrects" the entries to: "800" and "20." !  How can I turn this automatic correcting OFF?

    In my business it is critical that I be able to enter numbers in the format I choose.  I want to type "0800" or "20.00"; Pages automatically "corrects" the entries to: "800" and "20." !  How can I turn this automatic correcting OFF?  I am a relatively new user of Pages and cannot find a means of turning the autocorrect OFF.or of setting the number formatting rules.

    Pages v5.5.2 does not change 0800, or 20.00 when entered as body text for me. There is nothing in substitution, or Pages preferences settings that can effect these values.
    However, when typed in a Pages table cell with the wrong data format, mischief does occur. In order to preserve 0800, select the Cell tab on the format panel, and set the cell data format to Text, or a custom data format. To preserve 20.00, you must set that cell data format to either Automatic with 2 decimals, or Number with 2 decimals.

  • I developed app in mac 10.6.8 with xcode 3.2.6.how can i run this app in ipad device

    i developed app in mac 10.6.8 with xcode 3.2.6.how can i run this app in ipad device

    actually i planned to get  provisioning profiles from apple by paying 99$ in following website
    https://developer.apple.com/programs/start/ios/ and followed by
    https://developer.apple.com/programs/start/standard/.
    but in last link,following thing were mentioned at bottom -
    Technical Requirements
    You must have an Intel-based Mac running OS X 10.8 Mountain Lion or later to develop and distribute iOS apps and Mac apps.
    but i\m using mac running OS X 10.6.8 snow leopard.
    Doubt:can't i run my app in ipad device?\
    Thank's in advance..

  • I forgot the codeslot of my ipod. How can I delete this code?

    I forgot the codeslot of my ipod. How can I delete this code? Can anybody help help me? I'm sorry for the bad English.

    Connect it to iTunes and Restore it.

  • How can i rewrite this code into java?

    How can i rewrite this code into a java that has a return value?
    this code is written in vb6
    Private Function IsOdd(pintNumberIn) As Boolean
        If (pintNumberIn Mod 2) = 0 Then
            IsOdd = False
        Else
            IsOdd = True
        End If
    End Function   
    Private Sub cmdTryIt_Click()
              Dim intNumIn  As Integer
              Dim blnNumIsOdd     As Boolean
              intNumIn = Val(InputBox("Enter a number:", "IsOdd Test"))
              blnNumIsOdd = IsOdd(intNumIn)
              If blnNumIsOdd Then
           Print "The number that you entered is odd."
        Else
           Print "The number that you entered is not odd."
        End If
    End Sub

    873221 wrote:
    I'm sorry I'am New to Java.Are you new to communication? You don't have to know anything at all about Java to know that "I have an error," doesn't say anything useful.
    I'm just trying to get you to think about what your post actually says, and what others will take from it.
    what does this error mean? what code should i replace and add? thanks for all response
    C:\EvenOdd.java:31: isOdd(int) in EvenOdd cannot be applied to ()
    isOdd()=true;
    ^
    C:\EvenOdd.java:35: isOdd(int) in EvenOdd cannot be applied to ()
    isOdd()=false;
    ^
    2 errors
    Telling you "what code to change it to" will not help you at all. You need to learn Java, read the error message, and think about what it says.
    It's telling you exactly what is wrong. At line 31 of EvenOdd.java, you're calling isOdd(), with no arguments, but the isOdd() method requires an int argument. If you stop ant think about it, that should make perfect sense. How can you ask "is it odd?" without specifying what "it" is?
    So what is this all about? Is this homework? You googled for even odd, found a solution in some other language, and now you're just trying to translate it to Java rather than actually learning Java well enough to simply write this trivial code yourself?

  • How can i run this query in BI Answers

    Hi,
    pls tell me how can i run this sql statement in BI Answers....???
    select abc_date,abc_asset_desc,sum(nvl(abc_market_val_lcy,0)+nvl(abc_accr_lcy,0)) "total balance" from abc
    group by abc_date,abc_asset_desc;any help would be appriciated.... :-)
    Regards

    Strange question this one.
    normally with Answers you pick the columns you want to report on and the BI server will construct the SQL for you.
    In this example you would need a star with the abc dimension logical table and a logical fact for abc (these can be in the same table), which has a calculated field for 'Total Balance'.
    You then pick the columns you require and Answer and the BI will automatically add the group by.
    Adrian
    Majendi

  • How can i improve this code ?

    DATA: t_bkpf TYPE bkpf.
    DATA: t_bseg type bseg_t.
    DATA: wa_bseg like line of t_bseg.
    select * from bkpf into t_bkpf where document type ='KZ' and bldat in s_bldat.
    select single * from bseg into wa_bseg where belnr = t_bkpf-belnr.
    append wa_bseg to t_bseg.
    endselect.
    loop at t_bseg into wa_bseg.
      at new belnr.
         if wa_bseg-koart EQ 'K'.
            // pick vendor wrbtr
         else
           // pick other line item's wrbtr
         endif.
      endat.
    endloop.
    i am guessing my select statements arnt efficient performance wise, secondly in the loop when i use  'at new belnr' it aint showing my any values  whereas i get all the vendors(KOART EQ 'K') when i dont use 'at new belnr' .
    why is this so and how can i make the code efficient ?
    Thanks..
    Shehryar

    Hi,
    1.Dont read all the fields from the table unless it is required in your program.
    This will tremendously improve your performance.
    2.Make use of the key fields of the table wherever possible
    In your scenario you could use the fields BUKRS,BELNR,GJAHR of the table BKPF in the WHERE Clause rather than
    other fields.This will improve your performance a lot..
    3.As BSEG is a cluster table it will cause performance problem in most cases.So try to read
    the required fields from it rather than reading all the fields.Again Make use of the key fields in the WHERE Clause
    here too to improve the performance..
    4.Remove SELECT..ENDSELECT and replace it with FOR ALL ENTRIES to improve the performance.
    Cheers,
    Abdul Hakim
    Mark all useful answers..

  • How can I get this code to display 20 lines

    I need to get this code I have written to display 20 lines at a time, then the 20 using the Enter key.
    How would I approach this?
    I thought of making a RandomAcessFile object, but that seems like overthinking the problem, and I'm not sure that I could get that to work anyway.
    import java.io.*;
    public class ReadIt
    public static void main(String[] args)
         throws IOException
              System.out.println ("Enter The Desired .java Filename.");
              System.out.println ("Do not add the .java extention.");
              String fname;
              EasyIn type = new EasyIn();
              fname = type.readString();
              String fndotjava = new String(fname + ".java");
              //System.out.println (fndotjava);
              File inFile = new File(fndotjava);
              InputStream istream;
              OutputStream ostream;
              istream = new FileInputStream(inFile);
              ostream = System.out;
              int c;
              try
                     while((c = istream.read()) != -1)
                           ostream.write(c);
              catch(IOException e)
                     System.out.println("Error: " + e.getMessage());      
              finally
                    istream.close();
                    ostream.close();                 
    }Thanks
    Brad

    Well, a RandomAccessFile together with a counter should work. However, you can also achieve this by buffering the input rather than writing it directly out
    java.util.Vector vect = new java.util.Vector();
    try{
         while((c = istream.read()) != -1){
             vect.append(c);
    catch(IOException e){
         System.out.println("Error: " + e.getMessage());      
    finally{
         istream.close();                 
    }     with the help of
    java.util.Vector.size() and
    java.util.Vector.elementAt(int index)
    you are able to display only 20 lines at a time, you just need the additional code for reading System.in
    public static void prompt(String s){
        System.out.print(s + " ");
        System.out.flush();
      public static String readData ( BufferedReader in)  {
        boolean verfuegbar = true;
        while ( verfuegbar){
          try{
            S = in.readLine();
            if ( S != null)verfuegbar = false ;
          catch (IOException e){System.out.print (e);}
        return S;
      }now it should work with
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    prompt("return for continuing");
    int twentscount = 0;
    int count = 0;
    do{
       while( count < 20 && twentscount+count < vect.size() ){
           outstream.write(vect.elementAt(twentscount + count).toString() );
           count++;
    prompt("return");
    readData(in);
    twentscount += 20;
    count = 0;
    while(twentscount + count < vect.size());sure, this is code from head, and you can make many changes (e.g. instead of using twentscount use the modulo (%) operator saving one variable (while count % 20 != 0 ).
    I'm also not sure if it will definitly run , since i haven't tested it (especialy for index borders).
    I hope this will give you enough hints for this possible solution.
    Adrian

  • How can I fix this code ?

    hello,
    I have a small problem with this code:
    #include  <fstream>
    #include  <iostream>
    #include  <algorithm>
    #include  <iterator>
    #include  <string>
    #include  <vector>
    using namespace std;
    int main()
         string from, to;
         cin >> from >> to;
         ifstream is(from.c_str());
         istream_iterator<string> ii(is);
         istream_iterator<string> eos;
         //  line 24: Error:
         vector<string> b(ii, eos);  //  line 24: Error:
         sort(b.begin(), b.end());
         ofstream os(to.c_str());
         ostream_iterator<string> oo(os, "\n");     
             unique_copy(b.begin(), b.end(), oo);     
             return !is.eof() && !os;          
             return 0;
    }When I compile this happens
    bash-2.05$ CC -V
    CC: Sun C++ 5.6 2004/06/02
    bash-2.05$ CC -o std_vector.out std_vector.cpp
    "std_vector.cpp", line 24: Error:
    Could not find a match for
    std::vector<std::string>::vector(std::istream_iterator<std::string, char, std::char_traits<char>, int>, std::istream_iterator<std::string, char, std::char_traits<char>, int>)needed in main().
    1 Error(s) detected.
    What can I do ?
    best regards
    Morten Gulbrandsen

    You have run into a documented limitation of the default libCstd implementation of the C++ standard library. The default library is not a complete implementation, and in particular lacks required template member functions that allow implicit type conversions. We still use this library for binary compatibility with earlier releases.
    The optional STLport version of the library is a full implementation of hte C++ Standard Library. If you don't need binary compatibility, meaning you don't need to link to code that uses libCstd, you can add the option -library=stlport4 to every CC command line, compiling and linking. Your sample code compiles with STLport.
    If you need to use libCstd, you might get this code to work by inserting explicit type conversions. I have not tried to see whether that actually can be done.

  • How can I simplify this code?

    Here's some code I am working on for my CompScience class. If any of you more advanced java users can assist me in simpliying this code, it will be much appreciated. Thanks
    import javax.swing.JOptionPane;
    public class lab09b
         public static void main (String args[])     
              String str;     
              int num = 1, den = 1; //Initializes variables for use.         
              Rational2 r3 = new Rational2 (num,den); //Creates new Rational2 object to be used for math operations.     
              str = JOptionPane.showInputDialog("Enter Numerator 1:"); 
              num = Integer.parseInt(str);
              str = JOptionPane.showInputDialog("Enter Denominator 1:");     
              den = Integer.parseInt(str);
              Rational1 rA = new Rational1 (num,den); //Creates object to store original input of fraction 1.
              Rational2 r1 = new Rational2 (num,den); //Creates object to store reduced input of fraction 1.
              str = JOptionPane.showInputDialog("Enter Numerator 2:");
              num = Integer.parseInt(str);
              str = JOptionPane.showInputDialog("Enter Denominator 2:");     
              den = Integer.parseInt(str);
              Rational1 rB = new Rational1 (num,den); //Creates object to store original input of fraction 2.
              Rational2 r2 = new Rational2 (num,den); //Creates object to store reduced input of fraction 1.
              r3.add(r1,r2);
              JOptionPane.showMessageDialog(null,rA.getOriginal()+"+"+rB.getOriginal()+"="+r3.getRational()); //Outputs results of addition
              r3.multiply(r1,r2);
              JOptionPane.showMessageDialog(null,rA.getOriginal()+"*"+rB.getOriginal()+"="+r3.getRational()); //Outputs results of multiplication.                                 
              System.exit(0);     
    class Rational1
         protected int num; // Entered numerator.
         protected int den; // Entered denominator.
         private int getGCF(int n1,int n2) //Method for reduction.
              int rem = 0;
              int gcf = 0;
              do
                   rem = n1 % n2;
                   if (rem == 0)
                   gcf = n2;
                   else
                        n1 = n2;
                        n2 = rem;
              while (rem != 0);
              return gcf;
         public void reduce() //Modifies fraction to a equivalent simplified rational.
              int gcf = getGCF(num,den);
              num = num / gcf;
              den = den / gcf;
         public Rational1(int n, int d) //Constructs Rational1 without reducing it.
              num = n;
              if (d == 0)
                   System.out.println("Illegal denominator; altered to 1");
                   den = 1;
              else
                   den = d;
         public int getNum() //Returns Numerator.
              return num;
         public int getDen() //Returns Denominator.
              return den;
         public String getOriginal() //Returns Original Fraction.
              return ""+num+"/"+den;     
    class Rational2 extends Rational1 //Class used to modify fractions.
         public Rational2(int n, int d) //Constructs Rational2 using superclass constructor.
              super(n,d);
         public String getRational() //Returns the reduced fraction version.
              super.reduce();
              return ""+num+"/"+den;     
         public void add(Rational2 r1, Rational2 r2) //Adds two rationals together.
              den = r1.getDen() * r2.getDen();
              num = r1.getNum() * r2.getDen() + r2.getNum() * r1.getDen();
         public void multiply(Rational2 r1, Rational2 r2) //Multiplies two rationals.
              den = r1.getDen() * r2.getDen();
              num = r1.getNum() * r2.getNum();
    }

    seems simple enough to me.... you want complicated code... I could find you some good complicated code, and you'll look at yours and say, wow, this is pretty simple.
    What part are you expecting to simplify?
    Does it compile? Does it run? Does it do what you expect it to do?

  • How can I use this code in Muse?

    Please, tell me with details how to paste this code, which the "add this" widget on Muse to appear...
    <!-- AddThis Smart Layers BEGIN -->
    <!-- Go to http://www.addthis.com/get/smart-layers to customize -->
    <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-538d2f0f4872fcfe"></script>
    <script type="text/javascript">
      addthis.layers({
        'theme' : 'transparent',
        'follow' : {
          'services' : [
            {'service': 'facebook', 'id': 'africa.si.zgz'},
            {'service': 'twitter', 'id': 'Africa_Si'},
            {'service': 'google_follow', 'id': 'u/0/b/103262715708033329485/103262715708033329485/posts'},
            {'service': 'linkedin', 'id': 'África-sí', 'usertype': 'company'},
            {'service': 'youtube', 'id': 'africasizgz'}
        'whatsnext' : {} 
    </script>
    <!-- AddThis Smart Layers END -->
    Thank you!

    Thank you, but I still have a problem.... When a copy it directly on Muse through "ctrl + v" I see the whole code as text on Muse and when I paste it thorugh object--> Insert HTML Muse says that they "couldn't generate de miniature", do you know what I'm doing wrong?
    Thank you!

  • How can i modify this code in BI?

    hi friends,
    suppose i have data in infosource with deffirent customers.
    like from usa,germany,uk.
    i created 3 cubes and uploaded records corresponding countries.
    i have written code like this in 3.5
    loop at data_package.
    if data_package-/bic/zcustomer <> 'usa'.
    delete data_package.
    endif.
    endloop.
    same logic i need to write in BI 7.0 now where can i write this logic, what modifications i need to change for BI 7.0
    regards
    suneel.

    Hi,
    Check this link:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6090a621-c170-2910-c1ab-d9203321ee19
    I guess, you just need to change the DATA_PACKAGE to the new naming convention.
    Hope this helps.
    PB

  • How can i rewrite this code

    i have tried to rewrite this code but keep getting errors. ive read loads of tutorials on actionperformed and mouseclicked i just need som1 to point me in the right direction
    heres the code
    public boolean mouseUp(Event e, int x, int y){
    if (y == 0)
    swit = true;
    return true;
    //else
    if (pics[getMC(x,y)].getID() > rw*col/2){
      return true;}
    if (0 == track)
    card1 = pics[getMC(x,y)];
    start = new Date();
    etime.start();
    track = 2;
    stat = "pic again";
    repaint();
    return true;
    if (1 == track){
      card1 = pics[getMC(x,y)];
      track = 2;
      stat = "pick again";
      repaint();
      return true;
    else if (2 == track)
           if (card1 == pics[getMC(x,y)]) return true;
             card2 = pics[getMC(x,y)];
             track = 3;
             attempts++;
             if (card1.getID() == card2.getID())
              stat = "well done";
                matched++;
                if (rw*col/2 == matched)
                 stat = "finished";
                   etime = null;
             else
              stat = "Try Again";
             repaint();
             return true;
          else
           return false;
       }

    Hi,
    Do you want your code to listen to different Mouse events? and what other events?
    ex:
    copy the content of the below link and run the application
    http://java.sun.com/docs/books/tutorial/uiswing/examples/events/MouseEventDemoProject/src/events/MouseEventDemo.java
    http://java.sun.com/docs/books/tutorial/uiswing/examples/events/MouseEventDemoProject/src/events/BlankArea.java
    If you have any problem with the code; please let us know
    Regards,
    Alan Mehio
    London,UK

  • Can't reuse HTTPRequest  --- how can I reuse this code?

    public var getCategories: HttpRequest = HttpRequest {
        location: "http://lydias-kitchen.com/FXcategories.php";
        onInput: function(is: java.io.InputStream) {
            try {
                if(is.available()> 0){
                  categories.parser.input = is;
                  categories.parser.parse();
             } finally {
                 is.close();
                 var a = ids.size();
                 println ("categories ids size = {a}");
                 var b = bind (a-1);
                 for (i in [0 .. b]){
                    println("ids = { ids} names = {names[i]}");
    categories.newCategoryItem = com.javafx.preview.control.MenuItem {
    text: names[i]
    id: ids[i]
    onMouseClicked: function(e:javafx.scene.input.MouseEvent) {
    Main.CategoryId = e.node.id;
    println("category id = {Main.CategoryId}") ;
    recipes.getRecipes.start();
    font: Font {name: "Times New Roman" size: 20}
    graphic: ImageView {image: Image {url: "{__DIR__}images/ball.png"}
    fitWidth: 32
    fitHeight: 32
    insert newCategoryItem into Main.categoryItems;
    {code}
    I use the above code to get a PHP file to return all the recipe categories in a database table. The insert -> creates a dynamic menu. the println has confirmed that each menu item is assigned the correct text and recipe ID.
    I can click any one of the 19 "category" menu items generated and the "OnMouseClicked:" will call and start getRecipes.
    The code for getRecipes is identical to the code shown except that the returned recipes are inserted into the "recipe" menu instead of the "category" menu.
    Now it doesn't matter if I click an item in the "Recipe" or "Category" menu ......... any attempt to reuse the HTTPRequest functions will return:
    Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: request reuse not permitted
    at javafx.io.http.HttpRequest.start(HttpRequest.fx:1316)
    at jim2.categories$categories$Script$1Local$5$1ForPart$3.invoke$(categories.fx:59)
    at com.sun.javafx.functions.Function1.invoke(Function1.java:44)
    at com.sun.javafx.functions.Function1.invoke$(Function1.java:38)
    at javafx.scene.Node.impl_processMouseEvent(Node.fx:2938)
    at javafx.scene.Node.preprocessMouseEvent(Node.fx:2967)
    at javafx.scene.Scene$MouseHandler.process(Scene.fx:1559)
    at javafx.scene.Scene$MouseHandler.process(Scene.fx:1421)
    at javafx.scene.Scene.impl_processMouseEvent(Scene.fx:686)
    at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.fx:1016)
    at com.sun.javafx.tk.swing.SwingScene$SwingScenePanel.doMouseEvent(SwingScene.java:446)
    at com.sun.javafx.tk.swing.SwingScene$SwingScenePanel.mouseClicked(SwingScene.java:454)
    at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
    at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Since this is a recipe program you can see that I'm going to have to call the database for data each time a different category or recipe is called.
    *QUESTION: What do I have to do to get the HTTPRequest to work repeatly*
    Edited by: JWK on Feb 28, 2011 11:54 AM

    Exactly what it says; Create a new http request every single time you want to retrieve the data:
    //Records data retrieved from the request.
    var data : String;
    function makeRequest() : Void {
        //Create a new request object every time this function is called.
        var request : HttpRequest = HttpRequest {
            location: "http://en.wikipedia.org/"
            onInput: function(io : InputStream) {
                //Read input to data string and close input stream
        //Make the request connect.
        request.start();
    //Get the data
    makeRequest();
    //Get the data again.
    makeRequest();Each individual HttpRequest object is meant to be used once and only once so you need to create a new one each time.

Maybe you are looking for

  • Delivery Schedule Number or Delivery Plan Number field

    Hi, In MM which field refers to Delivery Schedule number (or Delivery Plan number) Advance Thanks Aadarsh

  • Payments for Consolidated billing

    how receipts are applied to the Consolidated billing number? Thanks, Prudhvi. www.erpschools.com

  • CS order operation: CATSD-VORNR what table stores this info?

    Hi all, we are trying to use CS operation level information entered in CATS to create printouts and other reporting. there are two factors: - we use in CATS for CS also other units (e.g. KM and CUR) than time dimension --> not shown in CS (AFRU) - KO

  • Granting SocketPermission using signed applet

    I have had a dream of locally caching a jar file for an applet so that all the code will be on the client machine after the first time the applet was loaded. Basically, I have a very thin applet composed of a jar class loader and a tiny applet which

  • Change the Language on Quicktime Software

    Hi, I have a Italian Windows but want to have my Quicktime Pro in German or English. Although I have downloaded the installer from the US and German Apple Site I still have the Quicktime Player in a italian version, does someboby know how to change t