help with flash

hi there, i am a total noob and just got my arduino uno starterkit. i managed to setup serproxy and have glue running. as a starting point i would like to switch on leds connected to the digital outs and gnd. therefore i wrote the folowing program:

import net.eriksjodin.arduino.Arduino;
import net.eriksjodin.arduino.events.ArduinoEvent;
import flash.events.MouseEvent;
import flash.events.Event;

var ledPin13:Number = 13;
var ledPin12:Number = 12;
var ledPin11:Number = 11;
var ledPin10:Number = 10;
var ledPin9:Number = 9;
var ledPin8:Number = 8;
var ledPin7:Number = 7;
var ledPin6:Number = 6;
var ledPin5:Number = 5;
var ledPin4:Number = 4;
var arduino:Arduino = new Arduino("127.0.0.1", 5331);

// Arduino initialization

      arduino.setPinMode(ledPin13, Arduino.OUTPUT);
      arduino.writeDigitalPin(ledPin13, Arduino.LOW);
      arduino.setPinMode(ledPin12, Arduino.OUTPUT);
      arduino.writeDigitalPin(ledPin12, Arduino.LOW);
      arduino.setPinMode(ledPin11, Arduino.OUTPUT);
      arduino.writeDigitalPin(ledPin11, Arduino.LOW);
      arduino.setPinMode(ledPin10, Arduino.OUTPUT);
      arduino.writeDigitalPin(ledPin10, Arduino.LOW);
      arduino.setPinMode(ledPin9, Arduino.OUTPUT);
      arduino.writeDigitalPin(ledPin9, Arduino.LOW);
      arduino.setPinMode(ledPin8, Arduino.OUTPUT);
      arduino.writeDigitalPin(ledPin8, Arduino.LOW);
      arduino.setPinMode(ledPin7, Arduino.OUTPUT);
      arduino.writeDigitalPin(ledPin7, Arduino.LOW);
      arduino.setPinMode(ledPin6, Arduino.OUTPUT);
      arduino.writeDigitalPin(ledPin6, Arduino.LOW);
      arduino.setPinMode(ledPin5, Arduino.OUTPUT);
      arduino.writeDigitalPin(ledPin5, Arduino.LOW);
      arduino.setPinMode(ledPin4, Arduino.OUTPUT);
      arduino.writeDigitalPin(ledPin4, Arduino.LOW);

// switch LEDs on

                  arduino.writeDigitalPin(ledPin13, Arduino.HIGH);
                  arduino.writeDigitalPin(ledPin12, Arduino.HIGH);
                  arduino.writeDigitalPin(ledPin11, Arduino.HIGH);
                  arduino.writeDigitalPin(ledPin10, Arduino.HIGH);
                  arduino.writeDigitalPin(ledPin9, Arduino.HIGH);
                  arduino.writeDigitalPin(ledPin8, Arduino.HIGH);
                  arduino.writeDigitalPin(ledPin7, Arduino.HIGH);
                  arduino.writeDigitalPin(ledPin6, Arduino.HIGH);
                  arduino.writeDigitalPin(ledPin5, Arduino.HIGH);
                  arduino.writeDigitalPin(ledPin4, Arduino.HIGH);

if i start it some of the leds light others dont. all in all i am a little confused, as if i only engage digital pins 13-10 four leds light, but when i engage 13-11 no leds light.

could someone be so nice and bring some light in my brain? thank you in advance!

Did you put current limiting resistors in line with the LEDs ?

If not its possible you've cooked some of the digital pins.

oops, no i didnt ;) thats a good point. i will add resistors and try again. anyway: would you think that my code should work?

so, i checked the pins on arduino - its still alive!

i have one BIIIIG question: could anyone tell me how the following code has to be with flash?

 /*Turns on an LED on pin 7.

  This example code is in the public domain.
 */

void setup() {                
  // initialize the digital pin as an output.
  // Pin 7 has an LED connected on most Arduino boards:
  pinMode(7, OUTPUT);     
}

void loop() {
  digitalWrite(7, HIGH);   // set the LED on
}

really, you would make my day. thank you in advance

could anyone tell me how the following code has to be with flash?

Please clarify your question.

i am trying to switch on an led connected to pin 7. the code i provided ist the one which works on arduino.

i want to use the standard firmata firmware on arduino, then using serproxy which enables me to control the arduino with flash (actionscript). so what i need is a working actionscriptcode for connecting flash to arduino (firmata) and then switching pin7 to high.

i hope my question is clearer now.

Much clearer. Unfortunately, I can't help. Hopefully someone else can.

for all who are in trouble controlling arduino with flash. i found something that solved all my troubles. have a look at http://www.netlabtoolkit.org whoever they guys are who created this - they are brilliant!