Foros del Web » Creando para Internet » Flash y Actionscript »

mx:HTML creado mediante ASC3 no me deja ver los pdf

Estas en el tema de mx:HTML creado mediante ASC3 no me deja ver los pdf en el foro de Flash y Actionscript en Foros del Web. El error que tengo es el sigueinte: Me dispongo a crear un mx:HTML dentro de un mx:VBox desde asc3 en la funcion onChangeTree pero no ...
  #1 (permalink)  
Antiguo 06/03/2010, 14:05
 
Fecha de Ingreso: febrero-2010
Mensajes: 23
Antigüedad: 14 años, 2 meses
Puntos: 1
mx:HTML creado mediante ASC3 no me deja ver los pdf

El error que tengo es el sigueinte: Me dispongo a crear un mx:HTML dentro de un mx:VBox desde asc3 en la funcion onChangeTree pero no me sale no se me visualiza nada sin embargo si lo pongo mediante los tegs de mxml si lo visualiza.
Por que cren que pueda ser... Dejo el codigo por si se animan a probarlo

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Style source="style.css"/>
<mx:Panel title="Curso de Ajedrez Segundo Nivel" width="391" height="379" >
<mx:HDividedBox id="divisor" liveDragging="false" width="100%" height="100%">
<mx:Tree id="tree" width="15%" height="100%" dataProvider="{treeData}" labelField="@label" showRoot="false" change="onChangeTree(event);"/>


<mx:ViewStack id="viewstack" width="85%" height="100%">

<mx:VBox id="Fase" width="100%" height="100%">
<mx:HTML location="files/estructura.pdf" width="100%" height="100%"/>
</mx:VBox>

</mx:ViewStack>

</mx:HDividedBox>
</mx:Panel>

<mx:XMLList id="treeData">
<node label="">
<node label="Materiales del Tema" direccion="index.html">
<node label="ORIENTACIONES GENERALES DEL CURSO" fase="1" direccion="files/estructura.pdf"/>
<node label="FORO DE NOTICIAS" fase="1" direccion="resource/9/index.html"/>
<node label="Documento" fase="2" direccion="resource/2/index.html"/>
</node>
</node>
</mx:XMLList>


<mx:Script>
<![CDATA[
import mx.charts.BubbleChart;
import mx.controls.HTML;
import mx.containers.VBox;
import mx.controls.Button;
[Bindable]
private var fase: String;
private var lab: String;
private var child: VBox;
private var child1: DisplayObject;
private var direccion:String;
private var myVBOX:VBox;
private var myHTML:HTML;


private function onChangeTree(event:Event):void {
viewstack.removeAllChildren();
myVBOX = new VBox();
myHTML = new HTML();
fase = Tree(event.target).selectedItem.attribute('fase'). toString();
direccion = Tree(event.target).selectedItem.attribute('direcci on').toString();

myHTML.location= direccion;
myHTML.width=Number("100%");
myHTML.height=Number("100%");

myVBOX.width=Number("100%");
myVBOX.height=Number("100%");

myVBOX.addChild(myHTML);
viewstack.addChild(myVBOX);
viewstack.getChildren()[0];

}
private function linkar(dir:String) : void {

var u:URLRequest = new URLRequest(dir);
navigateToURL(u,"_blank");
}

]]>
</mx:Script>
</mx:WindowedApplication>

Última edición por annieruci; 09/03/2010 a las 13:54

Etiquetas: flex, pdf, ver
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 23:34.