Heya, I’m new to flash. Im trying to learn, I like to learn by looking, playing & talking on forums (how i learnt xhtml,css,php etc…)
I downloaded this: http://ffiles.com/flash/menus/flip_nav_507.html
It only works in Flash 6 player.
I have no idea why it wont work in 9. Ive been trying for ages. Im not familiar with flash but I want to be. I would love somebody to help. The code is here:
Objects:
menu1(mc) menu2(mc) menu3(mc) menu4(mc)
And a txt(mc) inside of each menu(mc)
edit: I think it might be something to do with prototype.Moving. In flash 6 it cycles that function code continuously but in 9 it doesnt.
function menu_on(num)
{
_root["menu" + num].bg.Valalpha = 0;
_root["menu" + num].bg.scale = 10;
_root["menu" + num].txt.PosY = -72;
}
function menu_out(num)
{
_root["menu" + num].bg.Valalpha = 100;
_root["menu" + num].bg.scale = 100;
_root["menu" + num].txt.PosY = _root["menu" + num].txt.defY;
}
stop();
friction = 0.500000;
menu_num = 4;
movieClip.prototype.Moving = function (Val, PosX, PosY, scale, Valalpha)
{
this._x = this._x + Val * (PosX - this._x);
this.next_pos = (this.PosY - this._y) * Val + this.next_pos * _root.friction;
this._y = this._y + this.next_pos;
this._xscale = this._xscale + Val * (scale - this._xscale);
this._yscale = this._yscale + Val * (scale - this._yscale);
this._alpha = this._alpha + Val * (Valalpha - this._alpha);
};
for (e = 1; e <= menu_num; e++)
{trace("doing for " + num);
_root["menu" + e].defX = _root["menu" + e].PosX = _root["menu" + e]._x;
_root["menu" + e].defY = _root["menu" + e].PosY = _root["menu" + e]._y;
_root["menu" + e].txt.defX = _root["menu" + e].txt.PosX = _root["menu" + e].txt._x;
_root["menu" + e].txt.defY = _root["menu" + e].txt.PosY = _root["menu" + e].txt._y;
_root["menu" + e].bg.defX = _root["menu" + e].bg.PosX = _root["menu" + e].bg._x;
_root["menu" + e].bg.defY = _root["menu" + e].bg.PosY = _root["menu" + e].bg._y;
_root["menu" + e].bg.Valalpha = _root["menu" + e].bg.scale = 100;
_root["menu" + e].onEnterFrame = function ()
{
this.Moving(0.300000, this.PosX, this.PosY, 100, 100);
};
_root["menu" + e].bg.onEnterFrame = function ()
{
this.Moving(0.300000, this.PosX, this.PosY, this.scale, this.Valalpha);
};
_root["menu" + e].txt.onEnterFrame = function ()
{
this.Moving(0.200000, this.PosX, this.PosY, 100, 100);
};
_root["menu" + e].onRollOver = function ()
{
trace("read " + num);
name = this._name;
num = name.substring(4, 6);
_root.menu_on(num);
};
_root["menu" + e].onRollOut = function ()
{trace("read " + num);
name = this._name;
num = name.substring(4, 6);
_root.menu_out(num);
};
_root["menu" + e].onRelease = function ()
{trace("read " + num);
name = this._name;
num = name.substring(4, 6);
getURL(urlLink[num], "");
};
} // end of for
urlLink = new Array();
urlLink[1] = "#";
urlLink[2] = "#";
urlLink[3] = "#";
urlLink[4] = "#";