Skip to main content
Participant
December 6, 2006
Question

Pass x_scale and y_scale with Flashvars

  • December 6, 2006
  • 2 replies
  • 353 views
I put into html Flash tag this:

<param name="FlashVars" value="arq=../swf/anim.swf&xarq = 48&yarq =48">

First says which flash should be loaded, second and third parameters are x_scale and y_scale.

Into Flash I put this:
-----------------------------
stop();

carregaAnim = function() {
Anim = new LoadVars();
xsize = new LoadVars();
ysize = new LoadVars();
Anim.load(arq);
xsize.load(Number(xarq));
ysize.load(Number(yarq));
}

tela.loadMovie(arq);
tela._xscale = xsize;
tela._yscale = ysize;
tela._y = 0;
tela._x = 0;

System.useCodepage = true;
Stage.showMenu = false;
---------------------------------------

I can load the movie without problems but I can´t control x and y scale. I know have to convert to number and I try this, but without results. What do I have to do? What is wrong in my code?

Thanks a lot!

This topic has been closed for replies.

2 replies

Participant
December 6, 2006
Sorry, but I don´t know how to do this. Can you show me how I put this in code?
Inspiring
December 6, 2006
Inspiring
December 6, 2006
U can't controll the property immediately after calling load movie... use listener,and loadClip, After getting loaded the movei set the scale nad position.