Comunidad de diseño web y desarrollo en internet online

Abrir URL en un cuadro de texto dinamico

Citar            
MensajeEscrito el 05 Feb 2009 02:01 am
Hola a todos!
He estado buscando bastante y no he dado al foco sobre la forma de abrir una URL en un cuadro de texto dinamico. Encontré varios enlaces de como abrir una URL en una nueva ventana pero no el de poder visualizar el contenido de una pagina web desde mi .fla.

De antemano les agradezco el soporte!

Por angpau

1 de clabLevel



 

firefox
Citar            
MensajeEscrito el 05 Feb 2009 02:20 am
Hola, en un cadro de texto dinamico, solo puedes mostrar texto, puede que lo muestres formateado en html, pero solo eso, nada de abrir paginas completas en cuadros de texto y hasta donde se, no se puede, hay componentes que renderean tablas html, y algunas otras cosas, pero nada para desplegar toda la web html al estilo de un iframe dentro del fla. puedes probar con Mdm Zinc pero genera archivos .exe NO .swf, que no son visualizables en un navegador. Suerte.

Por LongeVie

Claber

1741 de clabLevel

1 tutorial

Genero:Masculino  

En un lugar, re moto.

firefox
Citar            
MensajeEscrito el 05 Feb 2009 06:23 am
Bueno, si el contenido de esa pagina web .html tiene Head, Title, Body etc, no lo reconocera, pero si solo tiene declaraciones como esta:

Código HTML :

<p class='headline'>Flash adds FlashType rendering technology!</p><p><span class='byline'>San Francisco, CA</span>--Macromedia Inc. announced today a new version of Flash that features a brand new font rendering technology called FlashType, most excellent at rendering small text with incredible clarity and consistency across platforms. For more information, visit the <a href='http://www.macromedia.com'>Macromedia Flash web site.</a></p>


osea no tiene esas etiquetas que mencione antes, entonces es posible abrir dicha url en el cuadro de texto, de este modo:

Código ActionScript :

this.createTextField("news_txt", 99, 50, 50, 450, 300);
news_txt.border = true;
news_txt.html = true;
news_txt.multiline = true;
news_txt.wordWrap = true;
// Create a new style sheet and LoadVars object.
var myVars_lv:LoadVars = new LoadVars();
var styles:TextField.StyleSheet = new TextField.StyleSheet();
// Location of CSS and text files to load.
var txt_url:String = "myText.htm";
var css_url:String = "html_styles.css";
// Define onData handler and load text to display.
myVars_lv.onData = function(src:String):Void {
    if (src != undefined) {
        news_txt.htmlText = src;
    } else {
        trace("Unable to load HTML file");
    }
};
myVars_lv.load(txt_url);

// Define onLoad handler and Load CSS file.
styles.onLoad = function(success:Boolean):Void {
    if (success) {
        /* Si la hoja de estilos se ha cargado sin errores, 
            asígnela al objeto de texto, 
            y asigne el texto HTML al campo de texto. */
        news_txt.styleSheet = styles;
        news_txt.text = storyText;
    } else {
        trace("Unable to load CSS file.");
    }
};
styles.load(css_url);


Suerte.

Por LongeVie

Claber

1741 de clabLevel

1 tutorial

Genero:Masculino  

En un lugar, re moto.

firefox
Citar            
MensajeEscrito el 06 Feb 2009 12:26 am
LongeVie,
Gracias por la orientación y la ayuda!

Por angpau

1 de clabLevel



 

firefox

 

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