Archive for the 'actionScript' Category

Flash MX2004 - Clase styleSheet: Carga de archivos CSS externos.

Las hojas de estilos CSS están representadas en ActionScript mediante la clase TextField.StyleSheet.

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No hay votos todavia.)
Loading ... Loading ...

Stage.onResize - Menú escalable.

Este script genera un menú horizontal cuyos botones se ajustan el ancho del navegador.
Ver ejemplo
PLAIN TEXT
Actionscript:

Stage.scaleMode = 'noScale';

Stage.align = 'TL';

formato = new TextFormat();

formato.font = 'verdana';

formato.size = 10;

function makeBoton(tmp_mc, ancho, largo, p, col, label) {

    var tm_mc = tmp_mc.createEmptyMovieClip("tempo" + p, p);

    tm_mc.beginFill(col);

    tm_mc.lineTo(0, 0);

    tm_mc.lineTo(0 + ancho, 0);

    tm_mc.lineTo(0 + [...]

1 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 5 (1 votos, promedio: 5 sobre 5)
Loading ... Loading ...

Pasar parámetros desde HTML a Flash

Pasar parámetros desde HTML a flash
Para pasar parámetros desde HTMl a una película de flash, se adjunta una variable concatenada al nombre de la película .swf. de la siguiente forma:
PLAIN TEXT
HTML:

<!--para Internet explorer-->

<param name="movie" value="mipeliculaflash.swf?mi_var=Hola mundo">

<!-- para fireFox y otros navegadores-->

src="mipeliculaflash.swf?mi_var=Hola mundo"

La película flash recoge la variable de la siguiente forma:
PLAIN TEXT
Actionscript:

trace(_root.mi_var);

Ejemplo
Para cargar [...]

2 Votes | Average: 4.5 out of 52 Votes | Average: 4.5 out of 52 Votes | Average: 4.5 out of 52 Votes | Average: 4.5 out of 52 Votes | Average: 4.5 out of 5 (2 votos, promedio: 4.5 sobre 5)
Loading ... Loading ...