Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

flash的滑鼠特效和loading

如何讓flashㄉ滑鼠特效有拖卸ㄉ效果(如移動滑鼠,字會慢慢保回到原位)

能只用flash做,不要去下載還是什ㄇㄉ方法!!

還有有些網站會先LOADINGㄉ字,然後滿格(100%),才有動畫

如做?

3 Answers

Rating
  • 2 decades ago
    Favorite Answer

    1.請做兩個場景

    第一場景叫 Loading

    第二場景叫 Start

    2.在第一場景弄出兩個關鍵影格

    //

    //在第一格貼上~~

    //

    var myShadow = new flash.filters.DropShadowFilter();

    myShadow.strength = 10;

    myShadow.blurX = 10;

    myShadow.blurY = 20;

    myShadow.angle = 90;

    //

    function loading() {

    var a = getBytesTotal();

    var b = getBytesLoaded();

    var m = _root._totalframes;

    var n = _root._framesloaded;

    var x = getTimer();

    if (b<a) {

    timeUsed = int(x/1000);

    totalText = int(a/1000);

    speed = int(b/x*1000);

    loadedText = int(b/1000);

    volumeB = int(b/a*100);

    frameB = int(n/m*100);

    var dx = 0;

    var dy = 0;

    var ddx = 240;

    var ddy = 210;

    this.createEmptyMovieClip("triangle_mc", 1);

    triangle_mc.beginFill(0x0000FF, 30);

    triangle_mc.moveTo(dx, dy);

    triangle_mc.lineTo(dx+100, dy);

    triangle_mc.lineTo(dx+100, dy+30);

    triangle_mc.lineTo(dx, dy+30);

    triangle_mc.lineTo(dx, dy);

    triangle_mc.endFill();

    triangle_mc._x = ddx;

    triangle_mc._y = ddy;

    triangle_mc._xscale = volumeB;

    this.createEmptyMovieClip("triangle_mc2", 2);

    triangle_mc2.lineStyle(0, 0xFF00FF, 100);

    triangle_mc2.moveTo(dx, dy);

    triangle_mc2.lineTo(dx+100, dy);

    triangle_mc2.lineTo(dx+100, dy+30);

    triangle_mc2.lineTo(dx, dy+30);

    triangle_mc2.lineTo(dx, dy);

    triangle_mc2.endFill();

    triangle_mc2._x = ddx;

    triangle_mc2._y = ddy;

    triangle_mc2.filters = [myShadow];

    } else {

    gotoAndPlay("Start", 1);

    triangle_mc.removeMovieClip();

    triangle_mc2.removeMovieClip();

    }

    }

    loading();

    //

    //第二格貼上

    //

    gotoAndPlay(1);

    ///

    3. 在Loading的第一影格貼上幾個動態文字框變數分別為

    timeUsed //使用的時間

    totalText //總共的字節

    speed //下載的速度

    loadedText //已經下載的字節

    volumeB //以下載字節 / 總字節

    frameB // 已經下載完成的影格數 / 全部的影格數

    //

    4. 在 Start 得場景

    貼上

    //*****LOAD區***************

    stop();

    var dx = 0;

    var dy = 0;

    var ddx = 100;

    var ddy = 100;

    //***************************

    //繪圖區

    //***************************

    this.createEmptyMovieClip("triangle_mc3", 3);

    triangle_mc3.beginFill(0x0000FF, 30);

    triangle_mc3.moveTo(dx, dy);

    triangle_mc3.lineTo(dx+100, dy);

    triangle_mc3.lineTo(dx+100, dy+30);

    triangle_mc3.lineTo(dx, dy+30);

    triangle_mc3.lineTo(dx, dy);

    triangle_mc3.endFill();

    triangle_mc3._x = ddx;

    triangle_mc3._y = ddy;

    triangle_mc3.filters = [myShadow];

    //含數區

    triangle_mc3.onEnterFrame = function() {

    var dx = triangle_mc3._x-_root._xmouse+10;

    var dy = triangle_mc3._y-_root._ymouse;

    triangle_mc3._x -= dx/50;

    //相對滑鼠的x軸移動

    triangle_mc3._y -= dy/50;

    //相對滑鼠的y軸移動

    if (triangle_mc3._x<=0) {

    triangle_mc3._x = 0;

    } else if (triangle_mc3._x>410) {

    triangle_mc3._x = 410;

    }

    if (triangle_mc3._y<=0) {

    triangle_mc3._y = 0;

    } else if (triangle_mc3._y>310) {

    triangle_mc3._y = 310;

    }

    };

    //這個應該是你要的滑鼠跟隨效果

    //不過速度是與滑鼠距離的 1/50

    //越遠越快

    5.原始檔在

    http://tenchiwang2.hp.infoseek.co.jp/load.fla

    http://tenchiwang2.hp.infoseek.co.jp/load.swf

    不過都是 FLASH 8.0 做的有的在下..

    沒的別浪費時間...

    先聲明...我圖片處理的技術粉差

    所以除了字和文字框之外

    都是 AS 生成...醜就請見諒

    2005-10-09 16:22:32 補充:

    ....這是自己弄的~~

    所以覺的醜阿~~

  • 6 years ago

    我本來從沒遇到過修NAS修硬碟和隨身碟要資料救援,一開始也跟大家一樣總是問價格到處比價,因為不懂,凡事都從價格,考量,輕言聽信朋友介紹比較便宜一家,找錯家之後痛苦尾隨而來,以下省略500字........,後來自己上網找資料救援找到硬碟醫院,和他們經理溝通之後給我正確觀念,這是妳寶貴的資料,妳要考慮是救不救的回問題,而不是貴不貴問題,如果重要請找對人搶救NAS資料硬碟救援才能恢復你的NAS中多顆的硬碟資料

    http://www.datamaster.com.tw/

  • 1 decade ago

    不好意思~可以請你再分享下載檔嗎?

    因為所謂的繪圖區是?

Still have questions? Get your answers by asking now.