By scott
Adobe has published an Active Content update for Flash Basic 8 and Flash Professional 8. You can add this update using Macromedia Exchange Manager to HTML Templates in the Publish Setting menu. The Active Content updates adds two templates:
1. Active Content Update - HTTP, which is a basic HTML template to display your Flash content.
2. Active Content Update - HTTPS, which displays your Flash content in HTML and directs users who don’t have Flash Player installed to a secure HTTPS server to download the latest version of Flash Player.
Download this update form the following link: http://www.adobe.com/support/flash/downloads.html
I do not recommend this solution as the be all and end all solution. There are much better implementations out there like SWFObject by Geoff Sterns. However, this is good for quick local tests and small site implementations.
By scott
I am very happy to say that the MyRealLiving RIA has finally been launched. It has been a very busy few months for me, juggling work, home life and this project. This a really great application that I’m proud to put my name on.
RISMEDIA, April 11, 2006–Real Living Inc., the nation’s fourth-largest residential real estate firm, today unveiled a beta version of its new integrative consumer portal, MyRealLiving version 2.0. It is an industry-first, consumer-agent interface, which allows agents and consumers to work together in real time and eliminates the mystery of information available to consumers. The portal replicates an in-person experience online.
I had a great team of people to work with which made the Flash development a lot less stressful. Lots of thanks to Derrick who lead the flash development team, the whole project team at AKQA, and the developers at RealLiving.
Visit these links to learn more.
By scott
One of the complaints I often hear about is keeping scope when using controls and/or event listeners. One of my favourite classes is the Delegate class. This class ensures scope is kept by allowing you to specify the scope when calling a method. For example:
import mx.utils.Delegate;
class Whatever extends MovieClip {
private var someClip_mc:MovieClip;
function Whatever() {
someClip_mc.onRelease = Delegate.create(this, someMethod);
}
private function someMethod():Void {
trace(this);
//this will return a reference to the movieclip that is
//attached to the Whatever class and not someClip_mc
}
}
Ok, that’s all fine and dandy, now what if you need to pass a paramater to the method you’re targeting. You could extend the Delegate class and allow for this, or you could write your own class that does the same thing but allows for paramaters to be passed. But really, who has time to do that! Below is the same example as above but this time I pass a paramater to the method.
import mx.utils.Delegate;
class Whatever extends MovieClip {
private var someClip_mc:MovieClip;
function Whatever() {
var myDel = someClip_mc.onRelease = Delegate.create(this, someMethod);
myDel.button = someClip_mc;
myDel.index = 4;
}
private function someMethod():Void {
var button:MovieClip = arguments.caller.button;
var index:Number = arguments.caller.index;
trace(button + ' has an index of ' + index);
//this will trace out someClip_mc has an index of 4
}
}
Now you may be wondering where the heck you would use this. Picture this, you are building a menu system from an xml document. You create buttons dynamically based on the amount of data, all buttons call the same method but the method needs to know what button was selected so it can set its selected state and it also needs to know the content id associated to the button selected so the appropriate content is loaded. Instead of having a seperate method for each content id/button or updating your code everytime the data is updated this allows you to write a completely dynamic menu system in the least amount of code.
Like I said above, this isn’t the best solution, but it is a solution to the fact the Macromedia forgot to add in the ability to pass an object along to the method being called. Good news is scope is not an issue in AS 3 so the Delegate class isn’t even needed.
By scott
Adobe has just released the stats for Flash Player 8 penetration as of April 2006. Flash player 8 is now installed on 69.3% of computers in the United States, 79% in Canada (YAY CANADA!!), and 76.1% in Europe. Adobe still claims that player penetration rates will be at 80% by June in the US. This is very impressive considering the player was only officially released in September of 2005. In the past it took usually 2 years to get the penetration rates up to 80%. A combination of the available Flash Player auto-update and the player update notifications built in to the Operating Systems are the key reasons the penetration rates are increasing so quickly.
http://www.adobe.com/products/player_census/flashplayer/version_penetration.html
By scott
First off I want to say yes, it is possible. I actually figured this out by mistake and this isn’t 100% tried tested and true.
If you create a MovieClip, and inside your MovieClip you add a Textfield with _sans, _serif, or _typewriter (system or device fonts) selected as your font (you can also select another font and not embed it, be warned though, if the user does not have the font you selected on their machine font substitution will occur). Now with your font selected you can either add text dynamically or by simply typing it in the TextField (for you timeline folk :)). Now, if you were to add a mask or set the _alpha to 0 you would still see the text when you test the movie. But if you add a blur effect (or any filter for that matter) with the blurX and blurY values set to 0 masks and _alphas work perfectly. You can even animate the movieclip from an alpha of 0 to 100.
So why does this work you ask, well, from what I can tell it is because when you put an effect on a movieclip it sets the CacheAsBitmap property to true. The part I can’t figure out is when I dynamically set CacheAsBitmap to true with no blur filter it doesn’t work? I may be missing something, I haven’t really looked into it. I am just glad it worked. The other thing I haven’t tried is different filters to see the difference in performance, the file size is still tiny and I don’t see a difference in my performance useage. Happy masking.
Here is some example code, cut and paste this into a new move and it will work, remember you have to publish for Flash 8 for it to work. Sorry for the long code, just wanted to make sure everyone could figure out what was going on. The same thing can easily be accomplished with half the code.
import flash.filters.BlurFilter;
import mx.transitions.easing.*;
import mx.transitions.Tween;
var template_mc:MovieClip = this;
var textHolder:MovieClip = template_mc.createEmptyMovieClip('textHolder_mc',
template_mc.getNextHighestDepth());
var tf:TextFormat = new TextFormat();
tf.font = '_serif';
tf.color = 0x000000;
tf.size = 14;
textHolder.createTextField('text_txt', 1, 0, 0, 200, 50);
textHolder.text_txt.text = 'This is my device font test';
textHolder.text_txt.autoSize = 'left';
textHolder.text_txt.setTextFormat(tf);
textHolder._x = (Stage.width/2) - (textHolder._width/2);
textHolder._y = (Stage.height/2) - (textHolder._height/2);
var filter:BlurFilter = new BlurFilter(0, 0, 1);
var filterArray:Array = new Array();
filterArray.push(filter);
textHolder.filters = filterArray;
var fadeUpText = new Tween(textHolder, '_alpha', Regular.easeOut, 0, 100, 4, true);