Files from Class #4, complete with comments, are now posted in the sidebar. Also, links to SWFObject and the TweenLite project are also in the sidebar as well.
Class #3 Commented Files have been posted! Click to download the Zip file.
Five seconds. Ten if you’re very lucky. User First Web links to an article about research on people’s web behavior as it relates to load times, and the results are chastening.
Likewise, my company – Akamai Technologies – has a white paper on the subject which includes this gem:
In 1999, a Zona Research report popularized the often-quoted “8-second rule” for Web page download times, estimating that as much as $4.35 billion in U.S e-commerce sales was being lost to site abandonment due to unacceptable site performance. That was in the era of dial-up connections, with online commerce still in relative infancy. Today, high rates of broadband penetration and savvy Internet shoppers’ expectations have cut the 8-second rule in half.
JupiterResearch now recommends that retailers now keep page download times to under 4 seconds, as one-third of broadband consumers will wait no longer than this for a page to load before abandoning the site. Online customers have ample reason to be fickle: they have easy, instant accessibility to hundreds of online retail destinations at the click of a mouse.
In our next two classes, we’re going to focus on dynamically loading content into your SWF file. That way, you can create a minimal SWF file (under 100K is a good target) that has your main user interface controls, and loads very quickly. That SWF can then load things like thumbnails and full-size images or SWFs as the user requests them. That way, every interaction is quick, and your users don’t spend 30 or 60 or 90 seconds staring at your preloader, hearing the siren song of ten billion other websites, and trying to quell the twitch of their mouse finger…
I heavily annotated my files from last night’s class and posted the Zip archive. I ended up breaking it up into 8 separate files, so you can better follow the sequence whereby we built the final product. I encourage you to review these in detail. I also posted the PDF of Problem Set #2, which is due Sunday by midnight.
One of the things that’s strange about Problem Set #1, if you got it working, is that changing the properties of motion_mc ends up stopping the motion tween. This is something I discovered when I first created the problem set a couple of years ago… I’ve left it in because it provides such a good “teachable moment.”
Aleah picked up this text from the Flash help that explains what’s happening:
If you modify any of the following properties of a MovieClip object that contains a motion tween, Flash Player stops the playhead in that MovieClip object: alpha, blendMode, filters, height, opaqueBackground, rotation, scaleX, scaleY, scale9Grid, scrollRect, transform, visible, width, x, or y. However, it does not stop the playhead in any child MovieClip objects of that MovieClip object.
Is the movie clip’s registration point the “circle” in the center of the object or the plus sign? How do we change the registration point?
The registration point is the little plus sign. You can’t change the registration point.
But, you can move the contents of any movie clip or button to align them however you
like with respect to the registration point. I frequently use the Align panel to do this. Let’s be sure to review this in class.
Betsy asked a good question about Illustrator files, which I thought I’d answer:
Is it possible to use vector images from Illustrator? I tried both pasting and importing the vector, but I couldn’t get Flash to create a shape tween with those vector images.
You can import vector images from Illustrator. I use Illustrator and Flash CS3 at home.
The thing about tweening vector images is that you have to have a “simple” shape on
each layer… a “simple” shape has no intersection points (i.e., an ellipse or a circle or a
rectangle or any closed polygon). If there are intersection points, Flash doesn’t really know
how to properly tween, and it produces unusual results.
What I’ve found works is to create my drawing in Illustrator, and then to choose
File > Export… and choose Flash (swf) as the format, and just accept the defaults.
Then, in Flash, choose File > Import to Stage, and select the file you just exported.
You’ll find that all the shapes you drew are imported, all on the same layer. If you
imported them onto an empty stage, you can choose Edit > Select All to ensure that
everything you just imported is selected, and then choose Modify > Timeline >
Distribute to Layers. This puts each shape on its own layer. Then, with everything
still selected, choose Modify > Ungroup. This is the key that “releases” each shape
from being its own grouped item to being just strokes-and-fills. Then, with each set
of strokes and fills on its own layer, you can create your shape tweens.
You can download the class#0 files from the link in the top right corner, or just click here (zip file).
Please go ahead and register for the blog so you can post comments and articles. That’s easier than me trying to set up all your accounts manually.
Welcome to the Spring 2009 edition of ActionScript for Designers. This semester (for the first time), we’ll be using this blog as the central web clearinghouse for downloads and information. You should receive an email from the instructor with your login information so you can post comments and code samples. If you have questions, contact Steve via email [steve [at] stevehoey [dot] com].
var tf:TextField = new TextField(); tf.width = 300; tf.height = 20; tf.text = "Hello, world!"; addChild(tf);