- Posted by kajyr on June 8th, 2009 tagged: actionscript, audio, flash, quickreference, TweenLite
Just a quick reminder on how to shut up the master volume on a flash project. I like a smooth tween to the silence, so I’m using the TweenLite libraries.
private function volumeOff
():void {
var sf
:SoundTransform =
new SoundTransform();
TweenLite.to
(sf,
1,
{volume:0, onUpdate
:applySoundTransform, onUpdateParams
:[sf
]});
}
private function applySoundTransform
(s
:SoundTransform):void {
SoundMixer.
soundTransform = s;
}
The trick here is to tween the volume property of a throw-away SoundTransform object, and on each step of the Tween apply that object as the SoundMixer.soundTransform Object, with an helper function. Note that I’m not going to write the function inside the TweenLite’s partameter list, as it is gross and dirty.
Tweening the volume back to 1 is so easy that I’m not writing it, to not offend anyone.
- Posted by kajyr on April 16th, 2009 tagged: AIR, sqlite, tools
Another post on tools I really appreciate while working;
Lita is another SQLite administrator tool, made by David Deraedt. It really stands among other admin tools.
Read the rest on Lita homage.
- Posted by kajyr on April 15th, 2009 tagged: actionscript, AIR, tutorial
Every now and then, while working on a AIR application, i feel the need to save or restore some config info, like the last window position, or the last opened files.
Instead of embedding this login in every app, I thought about a PreferenceManager class that stores and restores values.
How it should behave:
- It must save data on a file.
- It must save data on an open and editable format, so if something goes wrong..
- It should be a static class, so i can access it in every other class of my application, whitout the need to have the reference to the instantiated object.
- It should be really simple to use. And should not require any setup.
Read the rest of this entry »
- Posted by kajyr on March 24th, 2009 tagged: browsers, flash, flex, jquery, websites
Sometimes you simply want to summon browser’s scrollbars to scroll your full page, in case of a too low resolution for example.
This great plugin for jquery from think2loud.com handles the problem.
It suggest to use the JQuery Flash Plugin to embed the swf movie, but works perfectly also with the flexbuilder default html template.
Also, I suggest to include jQuery api from a Content Delivery Network, to provide faster access worldwide, like the Google AJAX api library or the Yahoo one.
- Posted by kajyr on February 24th, 2009 tagged: adobe, flash, flex, tools, video
Finally Adobe has published a version of the beloved FLVPlayback that works either in Flash 10 and Flex 3. No more crappy NetStream in Flex! :-)
You have to login with your AdobeID and Agree to some blahblah ;-)
Download here the component - there are also documentation && examples.
Have fun