felisan
05-20-2008, 07:09 AM
hi everybody.
I'd like to be able to pass a parameter to my Flash-file, so that it can have a customizable background-color.
to do this, I've made this little test:
I've placed a black movieclip on stage, and instancenamed it; myBox.
then Ive tried this code:
import caurina.transitions.Tweener;
var myBackgroundColor:Number = 0x53616E;
Tweener.addTween(myBox, {_color:myBackgroundColor, time:0.7, transition:"linear"});
it works perfectly, myBox changes color.
then I've tried this code:
import caurina.transitions.Tweener;
var myBackgroundColor:Number = Number(root.loaderInfo.parameters.whatColor);
Tweener.addTween(myBox, {_color:myBackgroundColor, time:0.7, transition:"linear"});
with this: myBox.swf?whatColor=0x53616E
but this doesn't work.
what am I doing wrong?
thanks
felisan
I'd like to be able to pass a parameter to my Flash-file, so that it can have a customizable background-color.
to do this, I've made this little test:
I've placed a black movieclip on stage, and instancenamed it; myBox.
then Ive tried this code:
import caurina.transitions.Tweener;
var myBackgroundColor:Number = 0x53616E;
Tweener.addTween(myBox, {_color:myBackgroundColor, time:0.7, transition:"linear"});
it works perfectly, myBox changes color.
then I've tried this code:
import caurina.transitions.Tweener;
var myBackgroundColor:Number = Number(root.loaderInfo.parameters.whatColor);
Tweener.addTween(myBox, {_color:myBackgroundColor, time:0.7, transition:"linear"});
with this: myBox.swf?whatColor=0x53616E
but this doesn't work.
what am I doing wrong?
thanks
felisan