         }
 
         public function callback(eventname:String, ... args) : void {
-            eventname = "cameraman._" + eventname;
-            var callargs:Array = [eventname] + args;
+            eventname = "cameraman.cameras['" + cameraid + "']._" + eventname;
+            trace("Calling back to " + eventname + " with: " + args);
+            args.unshift(eventname);
             if (ExternalInterface.available)
-                ExternalInterface.call.apply(callargs);
+                ExternalInterface.call.apply(null, args);
         }
 
         public function takePhoto() : void {


            trace("START ME UP");
            sendto = this.loaderInfo.parameters.sendto;
            configureCamera(null);

            if (ExternalInterface.available) {


        public function sendingIOError(event:IOErrorEvent) : void {
            trace("IOError: " + event.type + " " + event.text + " " + event.target + " " + event.target.bytesLoaded);
            this.callback('errorSending', 'IO error: ' + event.text);
        }

        public function sendingSecurityError(event:SecurityErrorEvent) : void {
            trace("SecurityError: " + event.text + " " + event.target);
            this.callback('errorSending', 'Security error: ' + event.text);
        }

        public function sentPhoto(event:Event) : void {
