Keblinger

Keblinger
Design your thoughts

music on /off script

0
| Monday, May 16, 2011
var music:Sound = new Sound(new URLRequest("music.mp3"));
var trans:SoundTransform = new SoundTransform(1, -1);
var channel:SoundChannel = music.play(0, 1, trans);
var musicOn:Boolean = true
onOff.addEventListener(MouseEvent.CLICK, onOffSound);
function onOffSound(e:Event) {
    if (musicOn == true) {
        musicOn = false;
        trans.volume=0;
        SoundMixer.soundTransform = trans;
    } else {
        musicOn = true;
        trans.volume=1;
        SoundMixer.soundTransform = trans;
    }
}

moving object script url & changing color

0
|
moving object script


http://www.actionscript.org/resources/articles/26/1/Drag-n-Drop-and-Drop-Target

s/Page1.html



change color

http://www.flashvault.net/tutorial.asp?ID=144

png FIX

0
| Wednesday, March 23, 2011

<!--[if lt IE 7]>
<script defer type="text/javascript" src="pngfix_map.js"></script>
<![endif]-->







 
http://homepage.ntlworld.com/bobosola/imagemap.htm

Action Script 3.0 (Loading file from outside the swf)

0
| Tuesday, March 22, 2011
/*Mouse.hide();
stage.addEventListener(Event.ENTER_FRAME,ff);
function ff(e:Event):void{
dd.x=mouseX;
dd.y=mouseY;
}*/

stage.scaleMode = StageScaleMode.NO_SCALE;


dd.addEventListener(MouseEvent.ROLL_OVER,btn1Over);
dd.addEventListener(MouseEvent.ROLL_OUT, btn1Out);
dd.addEventListener(MouseEvent.CLICK, btn1Click);

function btn1Over(event:Event):void {
    dd.gotoAndPlay("over");
}

function btn1Out(event:Event):void {
    dd.gotoAndPlay("out");
}

function btn1Click(event:Event):void {
    dd.gotoAndPlay("click");
}

var loade:Loader=new Loader();

dd.addEventListener(MouseEvent.CLICK,mm);
dd1.addEventListener(MouseEvent.CLICK,f1);
dd2.addEventListener(MouseEvent.CLICK,f2);
dd3.addEventListener(MouseEvent.CLICK,f3);

function mm(e:MouseEvent):void {
    var ui:URLRequest=new URLRequest ("cat-buttons.jpg");
    loade.load(ui);
    uiloader.addChild(loade);
}

Action Script 3.0 (mouse pointer)

0
|
This script is using for to hide the mouse pointer and show what ever image we can given other than mouse pointer. Lets check..

//Mouse.hide();
stage.addEventListener(Event.ENTER_FRAME,ff);
function ff(e:Event):void{
aa.x=mouseX;
aa.y=mouseY;

Action Script 3.0 (no scaling property)

0
|
This AS3 code is using for no scaling property in a flash website or any flash presentations

stage.scaleMode = StageScaleMode.NO_SCALE;
 

Copyright © 2010 Webdesigners Corner Blogger Template by Dzignine