Archive

Posts Tagged ‘Flash CS3’

Post your questions or code snippets

May 9, 2008 bmorrise 7 comments

I seem to be getting a number of people landing on this site every day, but not a whole lot of interaction with anyone. I really want to help people learn and understand Flash CS3. If you have questions, comments, code you want to discuss, or tutorials you’d like to see, please let me know. I just want to help you get to where you want to be with Flash. Seriously, I can help you with anything in Flash.

I want to make tutorials that are helpful to people using flash, so please post a comment with your tutorial wishes and I will oblige.

Building a Flash Video Player: Part One

April 29, 2008 bmorrise 1 comment

This is part 1 in a multiple part series about building a Flash video player. In this tutorial we start building the player control bar.

Click here to get the source code for this tutorial

Note: You can watch the videos in full screen by clicking the full screen button on the tutorial’s control bar.

Watch the Tutorial

Full Screen in ActionScript 3

April 28, 2008 bmorrise 51 comments

I’ve gotten several hits from search engines with the keywords “Full Screen” and I don’t have anything on here that actually shows how to do full screen. It’s pretty easy. Here is the code:

import flash.display.StageDisplayState;

function goFullScreen():void
{
    if (stage.displayState == StageDisplayState.NORMAL) {
        stage.displayState=StageDisplayState.FULL_SCREEN;
    } else {
        stage.displayState=StageDisplayState.NORMAL;
    }
}

stage.addEventListener(MouseEvent.CLICK, _handleClick)

function _handleClick(event:MouseEvent):void
{
    goFullScreen();
}

This code is pretty simple. What it does is make the Flash movie go full screen when you click anywhere on the stage. This could easily be tweaked so that it responds to a button click.

Keep in mind that this will only work when you view this in the browser. It’s doesn’t work when compiled inside of Flash CS3.

One thing you want to make sure of is that your embed code has the
<param name=”allowFullScreen” value=”true” /> tag in the param tags list as well as the allowFullScreen as an attribute in the embed tag. Here is an example:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="400" id="Untitled-3" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<font color="#0000FF"><param name="allowFullScreen" value="true" /></font>
<param name="movie" value="Untitled-3.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	<embed src="Untitled-3.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="Untitled-3" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

Capturing Keyboard Input

April 24, 2008 bmorrise 2 comments

In this tutorial I show you how to attach event listeners to the stage and listen for keyboard input. I also show you how to use the drawing capabilities in Flash to draw a smiley face. It’s pretty exciting stuff.

I’m also providing a link to the source code for the project. Once again, if you have any questions, please feel free to ask them in the comments section.

Tutorial 5 Source Code

Note: You can watch the videos in full screen by clicking the full screen button on the tutorial’s control bar.

Watch the Tutorial

Basic Functions and Sprites

April 21, 2008 bmorrise Leave a comment

This tutorial shows you the basics of function writing as well as some programmatic drawing.

Note: You can watch the videos in full screen by clicking the full screen button on the tutorial’s control bar.

Watch the Tutorial

Control Structures, Loops, and Arrays

April 17, 2008 bmorrise 3 comments

In this tutorial we focus on if statements, for and while loops. We’ll also be taking a look at arrays.

Note: You can watch the videos in full screen by clicking the full screen button on the tutorial’s control bar.

Watch the Tutorial

Getting Started with Adobe Flash CS3

April 15, 2008 bmorrise Leave a comment

Before you start through these tutorials it’s important that you get a copy of Adobe Flash CS3. Since the programming in the tutorials is going to be based on ActionScript 3 it is necessary to have Flash CS3. Previous versions used ActionScript 2 and it’s quite a bit different from ActionScript 3.

Now, I realize that most people don’t have the $699 that it costs to actually purchase a copy of Flash, but there are a few other options for “legally” getting a copy:

1. You can download a trial version of Flash CS3, but it only works for 30 days. Here is the link: http://www.adobe.com/go/tryflash

2. If you’re a student or teacher you can usually get an educational version of the software. If the institution has a book store you can generally pick up a copy there. If not, here is the link for Adobe’s educational discount site: http://www.adobe.com/education/products/flash/. The catch here is that the educational version can only be used for learning purposes.

3. The final option is a bit more creative. Adobe offers sizable discounts for upgrade packages. The upgrade for Flash CS3 is $299 compared to the $699. So, occasionally you can find previous versions on eBay or other auction sites. If you can find a copy of Flash MX 2004 or 8 for less than $400, you can save some money on getting the full version. This is the link for the upgrade page: http://www.adobe.com/uk/products/flash/upgrade/.

Once you’ve got your copy of Flash you’ll be able to follow along with our tutorials.