Potresti darmi una mano? l'esempio l'ho preso dal sito di braingiants.com e mi sono limitato solo a studiarne il codice ed a provare a modificarlo secondo le mie esigenze senza capirci molto però![]()
Sullo stage ci sono due mc (shadow e vuoto) e l'as sul primo (e unico) frame è questo
// ****** All code is © Copyright 2004 Charles Miller.
// ****** This code is provided for educational purposes only.
// ****** Please email me at charlie@braingiants.com for private use.
// Set initial variables
stageWidth=800; // Can also use the Stage.width property
stageHeight=600; // Can also use the Stage.height property
wmodifier = 403;
hmodifier = 329;
/* .7 for decent bounce effect */
bouncefactor = .7;
/* 6 for nice speed */
speedfactor = 8;
expand = function (id) {
// vuoto width
this.destwidth = wmodifier;
this.poswidth = id._width;
this.velwidth = this.velwidth*bouncefactor+(this.destwidth-this.poswidth)/speedfactor;
id._width += Math.round(this.velwidth);
// vuoto height
this.destheight = hmodifier;
this.posheight = id._height;
this.velheight = this.velheight*bouncefactor+(this.destheight-this.posheight)/speedfactor;
id._height += Math.round(this.velheight);
// vuoto x
this.destx = (stageWidth-wmodifier)/2;
this.posx = id._x;
this.velx = this.velx*bouncefactor+(this.destx-this.posx)/speedfactor;
id._x += Math.round(this.velx);
// vuoto y
this.desty = (stageHeight-hmodifier)/2;
this.posy = id._y;
this.vely = this.vely*bouncefactor+(this.desty-this.posy)/speedfactor;
id._y += Math.round(this.vely);
// shadow properties
barra._x = (vuoto._x-120);
barra._y = (vuoto._y-00);
menu._x = (vuoto._x-120);
menu._y = (vuoto._y+20);
};
vuoto.onEnterFrame = function() {
expand(this);
};
Mentre ai pulsanti assegno
on (press) {
_level0.wmodifier=500;
_level0.hmodifier=443;
}
Ecc...delle dimensioni esatte del swf da importare...

Rispondi quotando