AIRE: <img> mostrará arrastrar-n-drop imagen, cargadoras no?

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Marzo 3rd, 2009, 4:21 pm

Im básicamente armar una versión de AIR de una existente solicitud Escribí hace un rato.

Hasta ahora Ive consiguió la aplicación AIR aceptar imágenes que se han drag-n-cayó en el fondo de teléfono y visualizar / posicionamiento en la pantalla.

Parece que no puedo obtener mi cabeza por conseguir la imagen que ha sido abandonado en la aplicación en un objeto BitmapData, así que puede cortar / etc y guardarlo en un archivo nuevo sin embargo. Parece una cosa recinto de seguridad, pero su Soo sido desde hace mucho tiempo Ive hecho nada con Flash, y mucho menos aire, que yo realmente no lo sé.

Heres Im usando la función para mostrar la imagen cayó
Código: [ Select ]
    function dropHandler(event)
    {
        var str = event.dataTransfer.getData("text/plain");
        var elm = document.getElementById('iphone-wallpaper');
        air.trace(elm.style.backgroundImage);
       
        elm.src = str;
    }
  1.     function dropHandler(event)
  2.     {
  3.         var str = event.dataTransfer.getData("text/plain");
  4.         var elm = document.getElementById('iphone-wallpaper');
  5.         air.trace(elm.style.backgroundImage);
  6.        
  7.         elm.src = str;
  8.     }


Heres qué Ive juzgado por la carga de los BitmapData
Código: [ Select ]
var loader = new air.Loader();
// event handler definitions
loader.contentLoaderInfo.addEventListener(air.Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(air.IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.load(new air.URLRequest(document.getElementById('iphone-wallpaper').src));
  1. var loader = new air.Loader();
  2. // event handler definitions
  3. loader.contentLoaderInfo.addEventListener(air.Event.COMPLETE, completeHandler);
  4. loader.contentLoaderInfo.addEventListener(air.IOErrorEvent.IO_ERROR, ioErrorHandler);
  5. loader.load(new air.URLRequest(document.getElementById('iphone-wallpaper').src));


Heres el mensaje de error que me pasa por un archivo local
Código: [ Select ]
[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2035: URL Not Found. URL: file:///home/me/Desktop/1024-768-cat-wallpapers-11.jpg
" errorID=2035]
 
  1. [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2035: URL Not Found. URL: file:///home/me/Desktop/1024-768-cat-wallpapers-11.jpg
  2. " errorID=2035]
  3.  


Heres el mensaje de un archivo arrastrado desde mi navegador
Código: [ Select ]
An ActionScript error has occurred:
TypeError: Value  does not allow function calls.
  1. An ActionScript error has occurred:
  2. TypeError: Value  does not allow function calls.


Toda información es bienvenida. :)
Strong with this one, the sudo is.
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Marzo 3rd, 2009, 4:21 pm

Publicar Información

  • Total de mensajes en este tema: 1 mensaje
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 43 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC