mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 09:37:50 -05:00
Brought up to date with the private repository (feea4c7)
This commit is contained in:
1 parent
1aa738d692
commit
1b1df1ae48
7925 files changed
+2617237
-20
No files matched your search
@@ -0,0 +1,39 @@
|
||||
package com.greensock.plugins
|
||||
{
|
||||
import com.greensock.*;
|
||||
import flash.media.SoundTransform;
|
||||
|
||||
public class VolumePlugin extends TweenPlugin
|
||||
{
|
||||
|
||||
public static const API:Number = 2;
|
||||
|
||||
protected var _target:Object;
|
||||
|
||||
protected var _st:SoundTransform;
|
||||
|
||||
public function VolumePlugin()
|
||||
{
|
||||
super("volume");
|
||||
}
|
||||
|
||||
override public function _onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean
|
||||
{
|
||||
if(isNaN(param2) || param1.hasOwnProperty("volume") || !param1.hasOwnProperty("soundTransform"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_target = param1;
|
||||
_st = _target.soundTransform;
|
||||
_addTween(_st,"volume",_st.volume,param2,"volume");
|
||||
return true;
|
||||
}
|
||||
|
||||
override public function setRatio(param1:Number) : void
|
||||
{
|
||||
super.setRatio(param1);
|
||||
_target.soundTransform = _st;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user