Comunidad de diseño web y desarrollo en internet online

problemas conla function uploadImage(event)

Citar            
MensajeEscrito el 27 Ago 2010 09:48 pm
tengo un problema con este tema un amigo me paso un tipo de sistema para agregar que las personas puedan subir sus imágenes y colocar tipos de dibujos encima de sus imágenes el problema es que yo cambie la dirección que tenía anteriormente de una web y le coloque la que tengo pero no funciona quisiera me puedan ayudar gracias le paso el código

Código ActionScript :

function uploadImage(event)
{
    imageFile.browse([{description: "Image Files", extension: "*.jpg;*.gif;*.png"}]);
} // End of the function
function imageDownloaded(event)
{
    if (event.total == -1)
    {
        imagePane.contentPath = "error";
    } // end if
} // End of the function
function downloadImage(file)
{
    imagePane.contentPath = "http://www.midominio.pe/prueba/files" + file;
} // End of the function
System.security.allowDomain("http://www.midominio.pe/prueba");
var listener = new Object();
listener.onSelect = function (selectedFile)
{
    statusArea.text = details.text = "";
    statusArea.text = statusArea.text + ("Recibiendo imagen al servidor " + selectedFile.name + "\n");
    selectedFile.upload("http://www.midominio.pe/prueba/upload.php");
};
listener.onOpen = function (selectedFile)
{
    statusArea.text = statusArea.text + ("Subido " + selectedFile.name + "\n");
};
listener.onHTTPError = function (file, httpError)
{
    imagePane.contentPath = "error";
    imagePane.content.errorMSG.text = "HTTPError number: " + httpError + "\nFile: " + file.name;
};
listener.onIOError = function (file)
{
    imagePane.contentPath = "error";
    imagePane.content.errorMSG.text = "IOError: " + file.name;
};
listener.onSecurityError = function (file, errorString)
{
    imagePane.contentPath = "error";
    imagePane.content.errorMSG.text = "SecurityError: " + SecurityError + "\nFile: " + file.name;
};
listener.onComplete = function (selectedFile)
{
    statusArea.text = statusArea.text + ("Subida terminada.\nNow downloading " + selectedFile.name + " to player\n");
    details.text = "";
    for (i in selectedFile)
    {
        details.text = details.text + ("<b>" + i + ":</b> " + selectedFile[i] + "\n");
    } // end of for...in
    downloadImage(selectedFile.name);
};
var imageFile = new flash.net.FileReference();
imageFile.addListener(listener);
uploadBtn.onPress = uploadImage;
imagePane.addEventListener("completo", imageDownloaded);
stop ();
alfa.gotoAndStop(10);
stop ();
stop ();
fscommand("fullscreen", "true");
invertido.onRelease = function ()
{
    miMC.gotoAndStop(2);
};
original.onRelease = function ()
{
    miMC.gotoAndStop(1);
};

:cry:

Por CLAnonimo

Claber

600 de clabLevel

5 tutoriales
1 articulo

 

Este es un usuario anónimo genérico para las cuentas borradas o perdidas.

firefox
Citar            
MensajeEscrito el 30 Ago 2010 07:25 pm
¿Existe el PHP en tu dominio? ¿El swf está en el mismo dominio? ¿El directorio permiso tiene permisos de escritura?

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 31 Ago 2010 03:31 pm
pero el directorio de permisos no lo tengo

¿El directorio permiso tiene permisos de escritura?

este seria el php

<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></head><body><br>
<b>Warning</b>: imagecreatefromjpeg() [<a href="http://www.midominio/prueba/function.imagecreatefromjpeg">function.imagecreatefromjpeg</a>]: gd-jpeg: JPEG library reports unrecoverable error: in <b>/web/htdocs/www.midominio/home/prueba/upload.php</b> on line <b>25</b><br>
<br>
<b>Warning</b>: imagecreatefromjpeg() [<a href="http://www.midominio/prueba/function.imagecreatefromjpeg">function.imagecreatefromjpeg</a>]: './files' is not a valid JPEG file in <b>/web/htdocs/www.midominio/home/prueba/upload.php</b> on line <b>25</b><br>
<br>
<b>Warning</b>: imagesx(): supplied argument is not a valid Image resource in <b>/web/htdocs/www.midominio/home/prueba/upload.php</b> on line <b>36</b><br>
<br>
<b>Warning</b>: imagesy(): supplied argument is not a valid Image resource in <b>/web/htdocs/www.midominio/home/prueba/upload.php</b> on line <b>36</b><br>
<br>
<b>Warning</b>: imagecopyresampled(): supplied argument is not a valid Image resource in <b>/web/htdocs/www.midominio/home/prueba/upload.php</b> on line <b>36</b><br>
</body></html>



espero me puedas ayudar muchas gracias

Por CLAnonimo

Claber

600 de clabLevel

5 tutoriales
1 articulo

 

Este es un usuario anónimo genérico para las cuentas borradas o perdidas.

firefox
Citar            
MensajeEscrito el 31 Ago 2010 03:34 pm
Quise decir el escritorio donde escribes los archivos, supongo que todos estos errores te salen porque abres directamente el PHP en el browser

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 31 Ago 2010 03:39 pm
el erro que sale en el flahs es este ya que no me salen mas errores y no entiendo por qeu no sube

Error al abrir la URL 'http://www.midominio.pe/prueba/filesInvierno.jpg'


y eston son lo datos qeu me aparesen al intentar subir la imagen

_listeners: [object Object]
postData: undefined
creator: undefined
creationDate: Mon Jun 14 13:20:56 GMT-0500 2010
modificationDate: Fri Aug 24 07:00:00 GMT-0500 2001
size: 105542
type: .jpg
name: Invierno.jpg


:cry:

Por CLAnonimo

Claber

600 de clabLevel

5 tutoriales
1 articulo

 

Este es un usuario anónimo genérico para las cuentas borradas o perdidas.

firefox
Citar            
MensajeEscrito el 31 Ago 2010 03:42 pm
¿tienes la URL para echarle un vistazo?

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 31 Ago 2010 03:52 pm
te mando un zip con los archivos

con el fla y el php

http://www.salypimienta.pe/tienda/simulador.html

http://www.salypimienta.pe/tienda/simulador.zip

Por CLAnonimo

Claber

600 de clabLevel

5 tutoriales
1 articulo

 

Este es un usuario anónimo genérico para las cuentas borradas o perdidas.

firefox
Citar            
MensajeEscrito el 31 Ago 2010 04:35 pm
No, ya veo, es el error del PHP, porque el archivo va en el adjunto como Filedata ... ¿que dice tu PHP?

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 31 Ago 2010 04:54 pm
dime me podrias ayudar con ese tema la verdad soy nuevo en action scrip y mucho mas en php asi que no logro entender el erro muchas gracias

Por CLAnonimo

Claber

600 de clabLevel

5 tutoriales
1 articulo

 

Este es un usuario anónimo genérico para las cuentas borradas o perdidas.

firefox
Citar            
MensajeEscrito el 31 Ago 2010 04:55 pm
Pon el código de tu PHP

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 31 Ago 2010 04:58 pm
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></head><body><br>
<b>Warning</b>: imagecreatefromjpeg() [<a href="http://www.midominio/prueba/function.imagecreatefromjpeg">function.imagecreatefromjpeg</a>]: gd-jpeg: JPEG library reports unrecoverable error: in <b>/web/htdocs/www.midominio/home/prueba/upload.php</b> on line <b>25</b><br>
<br>
<b>Warning</b>: imagecreatefromjpeg() [<a href="http://www.midominio/prueba/function.imagecreatefromjpeg">function.imagecreatefromjpeg</a>]: './files' is not a valid JPEG file in <b>/web/htdocs/www.midominio/home/prueba/upload.php</b> on line <b>25</b><br>
<br>
<b>Warning</b>: imagesx(): supplied argument is not a valid Image resource in <b>/web/htdocs/www.midominio/home/prueba/upload.php</b> on line <b>36</b><br>
<br>
<b>Warning</b>: imagesy(): supplied argument is not a valid Image resource in <b>/web/htdocs/www.midominio/home/prueba/upload.php</b> on line <b>36</b><br>
<br>
<b>Warning</b>: imagecopyresampled(): supplied argument is not a valid Image resource in <b>/web/htdocs/www.midominio/home/prueba/upload.php</b> on line <b>36</b><br>
</body></html>

Por CLAnonimo

Claber

600 de clabLevel

5 tutoriales
1 articulo

 

Este es un usuario anónimo genérico para las cuentas borradas o perdidas.

firefox
Citar            
MensajeEscrito el 31 Ago 2010 04:58 pm
No, eso es la salida, el código PHP, mira que por ahí tienes un archivo que se llama upload.php, y que tiene código fuente en PHP

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 31 Ago 2010 05:00 pm
ok pero en ese caso tengo un gran problema no tengo ese archivo la persona que me paso el flahs no me paso ese archivo

Por CLAnonimo

Claber

600 de clabLevel

5 tutoriales
1 articulo

 

Este es un usuario anónimo genérico para las cuentas borradas o perdidas.

firefox
Citar            
MensajeEscrito el 31 Ago 2010 05:02 pm
Estás en lo cierto, cuando lo obtengas ya me cuentas

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.