Archive for ‘Flash CS4’

November 4th, 2008

Understanding Flash CS4 Motion XML

by John Mayhew

Hi everyone. John Mayhew from Flash authoring here. This is my first blog entry here and I wanted to take some time to describe the XML schema we use to store motion presets in Flash CS4. First I’d like to give you some background. The new animation model in Flash CS4 was built from the ground up over the last several years. It started as an idea I pitched at the end of our Flash 8 cycle at Macromedia. We assembled a team and started development in Flash 9 and continued through into Flash 10 and eventually shipped it as part of CS4. It was the culmination of tons of hard work by many, many people including our very own Jen DeHaan! We are all very proud of the feature and hope our users find that it does indeed "kick ass" as Jen likes to put it.

October 19th, 2008

Movie clip buttons in a fight: it’s AS2 vs. AS3 (again)

by Jen deHaan

You might have created movie clip buttons in Flash CS3 or Flash CS4 (or Flash 8 or 7 or…) before to get those animations on your buttons. Either way, creating one would have proceeded a bit like the following if you used ActionScript 2.0.

* Create a button, and give it an instance name (in the following case, myMc).
* Along the Timeline, add frame labels _up, _over, _down, and _hit (if you want a hit area for the button).
* Put stop actions at each frame label, and change the graphics and/or add some animation at each state.
* Add this code to frame 1 in the actions panel:

myMC.onRelease = function() {
 trace ("You clicked me.");
}

(For full instructions on creating a movie clip button, you can refer to something I wrote for docs waaay back in Flash 8 days here updated for CS3).

More after the jump.

October 15th, 2008

Go download Flash Player 10 update for Flash CS4

by Jen deHaan

If you bought Flash CS4 already, you might want to check out the Flash CS4 updater for Flash Player 10. You can read about it, and download the installer, here:

Adobe Flash Player 10 Update for Flash CS4 Professional

What is it for? I quote “The update replaces the Debug and Release versions of Flash Player 10 browser plugins, standalone players, and Test Movie players that are included in the initial release of Flash CS4 Professional (player version 10.0.2.54). All users are encouraged to apply this update. These new players are version 10.0.12.36.”

UPDATE: Please note that the original release notes for this updater noted test movie players, however test movie players are not updated with this update. See comments below.

October 14th, 2008

Looks like you can buy Flash CS4 now

by Jen deHaan

The little picture of the box in the store says “Now Available” next to it – so it looks like you can buy it. (I’m looking at the United States store, so take that for what its worth)

You can go buy Flash CS4.

Do it.

And then tween something.

http://store1.adobe.com/cfusion/store/html/index.cfm?event=displayStoreSelector&keyword=flash

October 12th, 2008

New motion and Tween instances: Flash CS4 presentation (FlashCamp)

by Jen deHaan

Yesterday at FlashCamp, I gave a presentation on using the new motion model in Flash CS4. The files are linked on this post. This is a general synopsis of what I covered, and I’ll detail how I did a few things in the presentation. Please comment with any questions you have.

More after the jump.

September 23rd, 2008

Flash CS4: The photo tour of features

by Jen deHaan

After spouting off about the benefits of the new motion model in Flash CS4, I thought I’d take a bunch of screenshots of Flash, most of which are showing new features and such. For all of the following photos, click the thumbnail to look at the full size photo.

More after the jump.

September 22nd, 2008

The new way of tweening in Flash CS4 (or: New motion in Flash CS4 makes your animations better, faster, stronger)

by Jen deHaan

So now that you’ve heard all these great CS4 announcements, lets get into some constructive details about Flash CS4 (whoo hoo, I can finally talk about what I’ve been working on!). But before we start, this is the first time I’ve written in detail about a non-released product, so bear with me and please comment about whatever is really confusing or assuming you have the product already, below.

There have been sneak peeks of some of the upcoming features in Flash thanks to conferences and keynotes, and you may have seen that one of the big new features (and to some of us on the feature, *the* big new feature) is a new way of creating animation. So yeah, tweening has changed. Finally. In Flash version 10. No more arrows on purple blackground. Um, now it’s blue with diamonds. And a whole lot better in many ways.

Update: articles on Adobe Developer Center for the new motion model:

* Motion Migration Guide for Flash CS4

* Animation Learning Guide

More after the jump.

July 31st, 2008

Creating buttons that link to different scenes, and within a scene, using ActionScript 3.0

by Jen deHaan

A common request in the comments is for information on how to create a button that links to a scene using ActionScript 3.0 in Flash CS4 or CS3. Luckily, it’s largely the same as creating a normal button that links to whatever, and uses the same gotoAndPlay format as in ActionScript 2.0. So hopefully it’ll make sense once you see it.

So if you’re unsure on general button code, see this post here: Making a button work in AS3. More links about writing button code at the end of this post.

Now you’re ready for some scenes-with-buttons action. Here’s some code:

stop();button1.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);function mouseDownHandler(event:MouseEvent):void {
 
gotoAndStop(1, "Scene 2");
 
}

So that code assumes that you have a button with the instance name button1, and a scene in your document called Scene 2 in the Scenes panel. The number "1" in that code points to frame 1 of the scene.

So what if you want to, say, link to a particular frame? Let’s link to frame 5 of a scene called monkeyScene:

stop();button2.addEventListener(MouseEvent.MOUSE_DOWN, monkeyDownHandler);
 
function monkeyDownHandler(event:MouseEvent):void {
 
gotoAndStop(5, "monkeyScene");
 
}

Hope that answers the question. I’ve put an FLA file online that links each scene using buttons so you can see this in action.

Linking to buttons within a scene

There have also been questions about linking to frames within a scene. I’m not positive what the specific problem is, but I’ll take a stab at it (or at least show what seems to work for me.

Now, what causes many of the problems with Scenes in Flash (and why they are officially discouraged from use in Flash best practices – I never use ‘em unless I have next to no code in a FLA), is as follows. From what I understand, when you publish your SWF file, all of the scenes in a FLA are made into one big giant string of frames. Kind of like sticking all of your scenes into one big timeline (one big scene, essentially) and pushing it out as a SWF. Therefore, this can mess up your code. If you’re pointing to a frame 56… which one? To you it may be frame 56 of scene 3, but to Flash that may be frame 56 of the giant new timeline in the SWF that’s published.

So, it’s good to avoid scenes.

But I digress. So if you’re linking to buttons within the same scene, you could specify what scene you’re pointing to in each button. So if you’re in a scene called monkeyScene, you could make your button that’s on frame 1 point to frame 2 of monkeyScene as follows:

stop();
 
mbutton1.addEventListener(MouseEvent.MOUSE_DOWN, monkeyHandler1);
 
function monkeyHandler1(event:MouseEvent):void {
 
gotoAndStop(2, "monkeyScene");
 
}

I’ve uploaded another real ugly FLA file that links multiple buttons to frames within a single scene. Check out monkeyScene in the FLA file.

MORE INFORMATION ON BUTTONS:

March 13th, 2008

Adding more than one button to a FLA file while rocking it in ActionScript 3.0

by Jen deHaan

So there have been a number of questions on my kinda recent post about making a button in Flash CS3 or Flash CS4 using ActionScript 3.0. I will do the next couple posts on how to do the things in the questions (and actually check em out in Flash, and make an FLA to download). Update: More links about buttons and button code at the end of this post.

So if you haven’t already read or don’t know how to make a single button, head on over to the post linked above. Here, I’ll continue on to multiple buttons.

Say you have a couple buttons on a page, and you want one to go to one URL, and the second one to go to a different URL – you need to change your function names in your code so you don’t have multiples with the same name. So, you would need to do something like this:

thumbsdown_btn.addEventListener(MouseEvent.MOUSE_DOWN, thumbDownHandler);
function thumbDownHandler(event:MouseEvent):void {
 navigateToURL(new URLRequest("http://msdn2.microsoft.com/en-us/silverlight/default.aspx"));
}
thumbsup_btn.addEventListener(MouseEvent.MOUSE_DOWN, thumbUpHandler);
function thumbUpHandler(event:MouseEvent):void {
 navigateToURL(new URLRequest("http://www.adobe.com/devnet/flash/"));
}

Note the thumbDownHandler and thumbupHandler in the code.

The source file: Mutliple buttons to URLs

So some people are instead targeting multiple frames. In that case, the code would look like this:

stop();
first_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler1);
function mouseDownHandler1(event:MouseEvent):void {
 gotoAndStop(5);
}
 
second_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler2);
function mouseDownHandler2(event:MouseEvent):void {
 gotoAndStop(10);
}

The source file: Mutliple buttons to frames

MORE INFORMATION ON BUTTONS:

February 25th, 2008

Making a button work in Flash CS3, CS4 or CS5 with ActionScript 3.0 – it’s not too bad

by Jen deHaan

So I used to monitor comments coming in from the CS3 Video Workshop, which contains a few hundred video tutorials on the CS3 products. Some of the comments that came in regarding the Flash videos was how people were having frustrations about how to set up button code with ActionScript 3.0. I thought that’s where I’d start out, with a simple example that compares the two. So I’ll show you how to make a button work in Flash CS3 or Flash CS4 using ActionScript 3.0.

Luckily, the set up is pretty much the same assuming you put code on the Timeline. If you didn’t, it will be a bit of a change and you’ll need to follow the steps below.