Hi Friends,

I am new to flash code.
Can anybody please guide me to make the following code of OSX menu in
vertical format.
Here is the like of original code.
http://www.reflektions.com/miniml/template_permalink.asp?id=356

The *.fla file is uploaded on following path
http://www.pixelmultimedia.net/OSX_menu_3_1.fla

////////////////// codes/////////////////////
function __com_mochibot__(swfid, mc, lv, trk)
{
    var x;
    var g;
    var s;
    var fv;
    var sb;
    var u;
    var res;
    var mb;
    var mbc;
    mb = "__mochibot__";
    mbc = "mochibot.com";
    g = _global ? (_global) : (_level0._root);
    if (g[mb + swfid])
    {
        return (g[mb + swfid]);
    } // end if
    s = System.security;
    x = mc._root.getSWFVersion;
    fv = x ? (mc.getSWFVersion()) : (_global ? (6) : (5));
    if (!s)
    {
        s = {};
    } // end if
    sb = s.sandboxType;
    if (sb == "localWithFile")
    {
        return (null);
    } // end if
    x = s.allowDomain;
    if (x)
    {
        s.allowDomain(mbc);
    } // end if
    x = s.allowInsecureDomain;
    if (x)
    {
        s.allowInsecureDomain(mbc);
    } // end if
    u = "http://"; + mbc + "/my/core.swf?mv=7&fv=" + fv + "&v=" +
escape(getVersion()) + "&swfid=" + escape(swfid) + "&l=" + lv + "&f=" + mc +
(sb ? ("&sb=" + sb) : ("")) + (trk ? ("&t=1") : (""));
    lv = fv > 6 ? (mc.getNextHighestDepth()) : (g[mb + "level"] ? (g[mb +
"level"] + 1) : (lv));
    g[mb + "level"] = lv;
    if (fv == 5)
    {
        res = "_level" + lv;
        if (!eval(res))
        {
            loadMovieNum(u, lv);
        } // end if
    }
    else
    {
        res = mc.createEmptyMovieClip(mb + swfid, lv);
        res.loadMovie(u);
    } // end else if
    return (res);
} // End of the function
var numItems = 10;
var itemsArray = new Array();
var increase = 2.500000E+000;
var minSize = 40;
var maxSize = increase * minSize;
var spacing = minSize + 2;
var diff = maxSize - minSize;
var piSpan = 3.141593E+000 / maxSize;
var proximity = 1.000000E-001;
var hZ = 30;
var state = 0;
var isInside = false;
var centerX = Stage.width / 2;
var centerY = Stage.height / 2;
this.initMenu = function ()
{
    for (i = 0; i < numItems; i++)
    {
        var _loc2 = this.attachMovie(i, "clip_" + i, i);
        var _loc3 = i * spacing + minSize / 2;
        _loc3 = _loc3 + 40;
        _loc2._x = _loc2.x = _loc3;
        _loc2._y = _loc2.y = centerY;
        itemsArray[i] = _loc2;
    } // end of for
    this.onEnterFrame = renderMenu;
};
this.renderMenu = function ()
{
    state = isInside ? (Math.min(1, state + proximity)) : (Math.max(0,
state - proximity));
    var _loc16 = this.hitZone_mc._x - this.hitZone_mc._width / 2;
    var _loc15 = this.hitZone_mc._y - this.hitZone_mc._height / 2;
    var _loc12 = this.hitZone_mc._x + this.hitZone_mc._width / 2;
    var _loc13 = this.hitZone_mc._y + this.hitZone_mc._height / 2;
    isInside = _xmouse > _loc16 && _xmouse < _loc12 && (_ymouse > _loc15
&& _ymouse < _loc13);
    hZ = sliderH;
    for (i in itemsArray)
    {
        var _loc4 = itemsArray[i].x - state * maxSize;
        var _loc5 = itemsArray[i].x + state * maxSize;
        if (_xmouse > _loc4 && _xmouse < _loc5)
        {
            var _loc8 = piSpan * (_loc5 - _xmouse);
            var _loc2 = Math.cos(_loc8 / 2);
            var _loc6 = diff * (1 - _loc2 * _loc2);
            var _loc9 = itemsArray[i].x - state * hZ * _loc2;
        }
        else
        {
            _loc6 = 0;
            var _loc10 = itemsArray[i].x + state * hZ;
            var _loc7 = itemsArray[i].x - state * hZ;
            _loc9 = _xmouse <= _loc4 ? (_loc10) : (_loc7);
        } // end else if
        var _loc3 = minSize + state * _loc6;
        itemsArray[i]._width = _loc3;
        itemsArray[i]._height = _loc3;
        itemsArray[i]._x = _loc9;
    } // end of for...in
    var _loc14 = itemsArray[0].getBounds(this).xMin;
    var _loc11 = itemsArray[numItems - 1].getBounds(this).xMax;
    this.hitZone_mc._width = _loc11 - _loc14;
    this.hitZone_mc._x = _loc11 - this.hitZone_mc._width / 2;
    this.hitZone_mc._height = minSize + maxSize * state;
};
initMenu();
stop ();
__com_mochibot__("6d82e250", this, 10301, true);
///////////////code end///////////////////////////////////////

Thanks in advance,
Prince

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to