The new version of Flash Player when rendering an EXE document doesn't want to obey the "fscommand" for some reason. I don't know why, I don't care. This works just fine:
fscommand("fullscreen", true);
fscommand("allowscale", false);
fscommand("showmenu", false);
Stage.scaleMode = "showAll";
Wednesday, December 16, 2009
Thursday, December 3, 2009
CSS Selectors Browser Compatibility
Compatibility is one of the most annoying parts of web scripting and programming. I've found a great reference when it comes to CSS selectors. This should help you figure out what will work in old browsers and what you'll need to find a workaround for.
Continue Reading: CSS selectors: basic browser support
Wednesday, December 2, 2009
Hiding Text on Form Submit Button
I wanted to have CSS replace a submit button for one of the forms on my site. So I decided to style it with a background image and set a text-indent to hide the text. It worked nice but in Internet Explorer, the text wouldn't go away.
I found a strange way to make the text disappear even in Explorer. Just use this bit of CSS for the submit button.
{
color: transparent;
text-transform: capitalize;
}
That should do the trick!
Tuesday, November 17, 2009
Mute Streaming Audio in Flash
Muting sounds that are streaming in Flash isn't as simple as changing the volume of an object via a "mute" button. But it is surprisingly EASY! I can't believe I didn't see it. AND the movie continues to play and unmuting just brings the sound back in.... duh!
Well, I searched and searched and finally found something. Thanks (http://www.actionscript.org/forums/showthread.php3?t=32982)! I made some simple modifications.
This is my code. I made a MC with 2 frames and buttons in it. In frame 1, a button that calls "mute();" here's the button code for the one that's in frame 1.
And here's the code in the root. I could easily make a volume slider that sets the "level" variable, and would then set. But for most stuff, we simply need the sound to be either there... or not.
Enjoy!
Well, I searched and searched and finally found something. Thanks (http://www.actionscript.org/forums/showthread.php3?t=32982)! I made some simple modifications.
This is my code. I made a MC with 2 frames and buttons in it. In frame 1, a button that calls "mute();" here's the button code for the one that's in frame 1.
on (release) {And frame 2 has this:
nextFrame();
this._parent.mute();
}
on(release) {
prevFrame();
this._parent.unmute();
}
And here's the code in the root. I could easily make a volume slider that sets the "level" variable, and would then set. But for most stuff, we simply need the sound to be either there... or not.
level = 100;
globalSound = new Sound();
globalSound.setVolume(level);
function mute() {
trace("mute");
//previewaudio.stop();
globalSound.setVolume(0);
}
function unmute() {
trace("unmute");
globalSound.setVolume(100);
}
Enjoy!
Monday, October 19, 2009
Vertical Ticker Scroll with jQuery
Ever wanted to make those cool vertical scroll things? Here is a great light weight way to accomplish it:
Friday, October 9, 2009
Kern dynamic text is Flash Actionscript
I've always needed to know how to kern dynamic text is Flash Actionscript, and I knew there had to be a way. Well, here it is. I discovered this somewhere, made some tweeks, good stuff.
function kernText(myTextField, kerning) {
myTextField.html = true;
var newFormat:TextFormat = new TextFormat();
newFormat.letterSpacing = kerning;
//newFormat.font = "Arial"; // Add now whatever format needs you have.
myTextField.setTextFormat(newFormat);
}
function kernText(myTextField, kerning) {
myTextField.html = true;
var newFormat:TextFormat = new TextFormat();
newFormat.letterSpacing = kerning;
//newFormat.font = "Arial"; // Add now whatever format needs you have.
myTextField.setTextFormat(newFormat);
}
Wednesday, October 7, 2009
Flash right-click menu
I've always been looking for a nice and easy Flash right-click menu builder. This one seems extremely straight-foward and EASY!
function calledFunction1() {
trace("calledFunction1");
}
function calledFunction2(){
trace("calledFunction2");
}
MENU = new ContextMenu();
MENU.hideBuiltInItems();
insertAfter = new ContextMenuItem("Call function 1", calledFunction1);
insertBefore = new ContextMenuItem("Call function 2", calledFunction2);
MENU.customItems.push(calledFunction1);
MENU.customItems.push(calledFunction2);
_root.menu = MENU;
function calledFunction1() {
trace("calledFunction1");
}
function calledFunction2(){
trace("calledFunction2");
}
MENU = new ContextMenu();
MENU.hideBuiltInItems();
insertAfter = new ContextMenuItem("Call function 1", calledFunction1);
insertBefore = new ContextMenuItem("Call function 2", calledFunction2);
MENU.customItems.push(calledFunction1);
MENU.customItems.push(calledFunction2);
_root.menu = MENU;
Subscribe to:
Posts (Atom)