nel secondo frame ho messo questo codice:
Codice PHP:
_root.bkg_mc._x = Stage.width / 2;
_root.bkg_mc._y = Stage.height / 2;
_root.bkg_mc.w = _root.bkg_mc._width;
_root.bkg_mc.h = _root.bkg_mc._height;
trace(_root.bkg_mc.h)
myResize = new Object();
function Window()
{
var CDim = _root.bkg_mc.w / _root.bkg_mc.h;
var SDim = Stage.width / Stage.height;
if (SDim < CDim)
{
_root.bkg_mc._height = Stage.height;
_root.bkg_mc._width = _root.bkg_mc.w * Stage.height / _root.bkg_mc.h;
} else {
_root.bkg_mc._width = Stage.width;
_root.bkg_mc._height = _root.bkg_mc.h * Stage.width / _root.bkg_mc.w;
}
_root.bkg_mc._quality = "BEST";
};
myResize.onResize = function()
{
Window();
}
Stage.addListener(myResize);
Window();
bkg_mc contiene una mashera e 1 altro mc con questo codice:
Codice PHP:
this.mask_mc._width = 30;
this.mask_mc._height = 30;
this.mask_mc._x = _root.Stage.width /2;
this.mask_mc._y = _root.Stage.height /2;
// funzione che mi ingrandisce il cerchio mask
mask_mc.onEnterFrame =function() {
mask_mc._width = mask_mc._width + 65;
mask_mc._height = mask_mc._height + 65;
trace(mask_mc._width)
if ((mask_mc._width >= 6000) || (mask_mc._height >= 6000)) {
trace("ok");
delete this.onEnterFrame;
}
}
// sfondo maschera
this.masksfo_mc._width = 20;
this.masksfo_mc._height = 20;
this.masksfo_mc._x = _root.Stage.width /2;
this.masksfo_mc._y = _root.Stage.height /2;
// funzione che mi ingrandisce sfondo semitrasparente cerchio mask
masksfo_mc.onEnterFrame =function() {
masksfo_mc._width = masksfo_mc._width + 95;
masksfo_mc._height = masksfo_mc._height + 95;
if ((masksfo_mc._width >= 6000) || (masksfo_mc._height >= 6000)) {
_parent.nextFrame();
delete this.onEnterFrame;
}
}
stop();