QQ空间吧-蝴蝶社区

查看完整版本: flash右键制作方法

╄━→.︵.輪回 2008-5-23 14:48

flash右键制作方法

[size=3][b][color=Lime]本文由麦子发出感觉不错支持一下哦:[url]http://249710054.qzone.qq.com/[/url]

有人问麦子-你空间的FLASH模块怎么有字跟着鼠标动啊?点一下又键还有字。

下面偶就把FLASH又键菜单和连接教给大家.

下面在介绍一下制作Flash右键怎么加法...

为了节省日志的繁多,所以不想单独发表那么多,日志太多,反正朋友们带来不便

我就照这个日志说一下...

首先我们要给自己喜欢的Flash加上右键,那么我们必须要用的右键的AS

这个Flash点击右键可以看很多菜单:
[flash]http://blog.eduol.cn/uploadfile/2008-5/221241849003.swf[/flash]
[flash]http://blog.eduol.cn/uploadfile/2008-5/221241445530.swf[/flash]

现在开始吧不想多说了...

首先请看下面一段AS代码
function tab()
{
    getURL("http://249710054.qzone.qq.com", "_blank");
} // End of the function
function url1()
{
    getURL("http://249710054.qzone.qq.com", "_blank");
} // End of the function
function quit1()
{
    fscommand("quit");
} // End of the function
function tab()
{
    getURL("http://249710054.qzone.qq.com", "_blank");
} // End of the function
function url1()
{
    getURL("http://249710054.qzone.qq.com", "_blank");
} // End of the function
function quit1()
{
    fscommand("quit");
} // End of the function
function 鼠标跟随(myString, a, b, c, txtspeed)
{
    Mouse.hide();
    var i = 0;
    while (i < String_num)
    {
        this["dx" + i] = 0;
        this["dy" + i] = 0;
        var mc = _root.createEmptyMovieClip("txt" + i, i);
        this["color" + i] = new Color(mc);
        with (mc)
        {
            _xscale = _yscale = txtspeed;
            createTextField("mytxt", i, 0, 0, 0, 0);
            mytxt.autoSize = true;
            mytxt.text = myString.substr(i, 1);
        } // End of with
        i++;
    } // end while
    _root.onEnterFrame = function ()
    {
        var _l4 = this;
        txt0._x = _root._xmouse;
        txt0._y = _root._ymouse;
        var _l3 = 0;
        while (_l3 < String_num)
        {
            _l4["color_from" + _l3] = {ra: 5 * _l3, rb: 255 - 2 * _l3, ga: _l3 * 20 - 100, gb: Math.floor(Math.random() * 500 - 255), gb: 100 - 20 * _l3, ba: 5 * _l3 - 50, bb: Math.floor(Math.random() * 500 - 255)};
            _l4["color" + _l3].setTransform(_l4["color_from" + _l3]);
            _l4["dx" + _l3] = _l4["dx" + _l3] * a + (_l4["txt" + (_l3 - 1)]._x + c - _l4["txt" + _l3]._x) * b;
            _l4["dy" + _l3] = _l4["dy" + _l3] * a + (_l4["txt" + (_l3 - 1)]._y - _l4["txt" + _l3]._y) * b;
            _l4["txt" + _l3]._x = _l4["txt" + _l3]._x + _l4["dx" + _l3];
            _l4["txt" + _l3]._y = _l4["txt" + _l3]._y + _l4["dy" + _l3];
            _l3++;
        } // end while
    };
} // End of the function
var expandmenu = new ContextMenu();
expandmenu.hideBuiltInItems();
var $url1 = new ContextMenuItem("版权所有-约οΟ定-空间QQ:249710054 ", url1, true, true);
var $tab2 = new ContextMenuItem("提示:请点击空间右上角的添加关注", tab, true, true);
var $tab3 = new ContextMenuItem("请误盗版  谢谢合作!", tab, true, true);
var $tab4 = new ContextMenuItem("欢迎大家长来做客!!!", tab, true, true);
expandmenu.customItems.push($url1, $tab2, $tab3, $tab4);
expandmenu.onSelect = menuHandler;
_root.menu = expandmenu;
var expandmenu = new ContextMenu();
expandmenu.hideBuiltInItems();
expandmenu.customItems.push($url1, $tab2, $tab3, $tab4);
expandmenu.onSelect = menuHandler;
_root.menu = expandmenu;
var myString = "麦子 QQ:249710054";
var a = 0.650000;
var b = 0.100000;
var c = 15;
var txtspeed = 150;
var String_num = myString.length;
鼠标跟随(myString, a, b, c, txtspeed);
上面是发表的四个右键菜单。你只需要把里面的AS换成你的地址和你要显示的菜单名...
[flash]http://blog.eduol.cn/uploadfile/2008-4/1707715066.swf[/flash]

如果感觉太麻烦的话 下面还有一段。

右键菜单 = new ContextMenu();
右键菜单.hideBuiltInItems();
右键菜单.customItems.push(new ContextMenuItem('第一个菜单', dj_menu0, false));
右键菜单.customItems.push(new ContextMenuItem('第二个菜单'', dj_menu1, false));
右键菜单.customItems.push(new ContextMenuItem('第三个菜单', dj_menu2, false));
右键菜单.customItems.push(new ContextMenuItem('第四个菜单'', dj_menu3, false));
右键菜单.customItems.push(new ContextMenuItem('第五个菜单'', dj_menu4, false));
function dj_menu0() {
getURL('对应该的第一个网址','_blank');
}
function dj_menu1() {
getURL('对应该的第二个网址'','_blank');
}
function dj_menu2() {
getURL('对应该的第三个网址'','_blank');
}
function dj_menu3() {
getURL('对应该的第四个网址'','_blank');
}
function dj_menu4() {
getURL('对应该的第五个网址'','_blank');
}
_root.menu = 右键菜单;
当然我们也可以只做一个连接
on (release) { getURL("http://249710054.qzone.qq.com//problem/2845.shtml", "_blank"); } [/color][/b][/size]

kingday 2008-9-27 11:10

看不懂~
大家都没看懂??

顾景岩 2008-10-17 15:00

恩交角把
页: [1]
查看完整版本: flash右键制作方法