- Messages
- 5,508
- Reaction score
- 35
- Points
- 48
I found a cool action script at the web that I want to use. I think it is very complicated and I need someone with good knowledge of actionscript.
Here is the actionscript:
I want to use this picture:
I want the flash to be 468 x 60 and have transparent background. And I don't want the user to be able to move the picture. I will pay 300 - 400 credits for it.
The result will be like http://davr.org/flash/swf.php?swf=blur&w=600&h=400 but my logo as logo...
Here is the actionscript:
Code:
/**
* @mxmlc -sp+=G:\davidr\papervision\as3\src
*/
package {
import flash.geom.*;
import flash.display.*;
import flash.events.*;
import flash.ui.Keyboard;
import flash.text.*;
import flash.filters.*;
import flash.utils.*;
[SWF(width="600", height="400", backgroundColor="#eeeeee", frameRate="30")]
public class Main extends Sprite
{
[Embed(source="../logo.png")]
public var Logo:Class;
var logo:Sprite;
var buf:Bitmap;
var blur:BlurFilter;
var ct:ColorTransform;
public function Main()
{
stage.scaleMode = "noScale";
stage.align = "TL";
buf = new Bitmap();
addChild(buf);
ct = new ColorTransform(1,1,1,1,
1,1,1,0);
blur = new BlurFilter(1.5, 1.5, 1);
var logoBMP:Bitmap = new Logo();
logo = new Sprite();
logo.addChild(logoBMP);
addChild(logo);
onResize(null);
logo.addEventListener(MouseEvent.MOUSE_DOWN, grab);
logo.addEventListener(MouseEvent.MOUSE_UP, release);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.addEventListener(Event.RESIZE, onResize);
}
public function onResize(e:Event) {
buf.bitmapData = new BitmapData(stage.stageWidth, stage.stageHeight, false, 0xdddddd);
var sw:Number = stage.stageWidth;
var sh:Number = stage.stageHeight;
var lw:Number = logo.width;
var lh:Number = logo.height;
logo.x = (sw-lw)/2;
logo.y = (sh-lh)/2;
}
public function grab(e:Event) {
logo.startDrag();
}
public function release(e:Event) {
logo.stopDrag();
}
var flag:int = 0;
public function onEnterFrame(e:Event) {
flag++;
if(flag == 2)
{
buf.bitmapData.draw(stage, null, ct, null, null, true);
flag = 0;
}
else
buf.bitmapData.draw(stage, null, null, null, null, true);
buf.bitmapData.applyFilter(buf.bitmapData, buf.getBounds(buf), new Point(0,0), blur);
}
}
}
I want to use this picture:
I want the flash to be 468 x 60 and have transparent background. And I don't want the user to be able to move the picture. I will pay 300 - 400 credits for it.
The result will be like http://davr.org/flash/swf.php?swf=blur&w=600&h=400 but my logo as logo...
Last edited: