Posts categorized “Lesson”.

Easy code for loading sound

Open a new Actionscript 3.0 Flash document. Save it to a folder. Copy an MP3 into the same folder.

Open the ActionScript window on frame one and add the following code, replacing the name of the MP3 with yours (remove the spaces from the filename in the finder or you’ll be scratching your head):

var mySong:Sound = new Sound();
mySong.load(new URLRequest(”TheNationalAnthem.mp3″));
mySong.play();

Run it and listen to your MP3 play back. You’ve just loaded your first external file (no linkage needed). You can call mySong.play() from anywhere, including a function that’s called from a button or rollover! You can also load multiple sounds, so as long as you create new instance names (MySong1, MySong2, etc).

Flash Examples post-midterm

CREATING CUSTOM BUTTONS
custom buttons

ADDCHILD
Displaying library content in AS3
Advanced – The Display List, The Stage, and “addChild” in Flash CS3

PLAYING BACK FLV MOVIES (THINK YOUTUBE) WITH FLVPlayback
FLVPlayback

LOOPS
What are loops?

CONDITIONALS
Conditionals 1
Conditionals 2

DRAWING SHAPES WITH AS3
shapes

Advanced – LOADING EXTERNAL FILES
External Files

PRELOADER BAR

Preloading in ActionScript 3.0, the Easy Way
Creating a Preloader and Progress Bar

HACKING EXISTING CODE
Drag and drog objects onto another object
Create a magnifying glass

Type I Flash file

Here is the flash file I made in class today.It contains all the the techniques we covered and you should be able to reverse engineer anything you may have missed or forgotten.

Assignment list, due dates, folding and binding techniques

Folding

We didn’t get a chance to talk about properly folding with a ruler, but use a ruler with a metal edge (or better yet a metal ruler) to score your edges for a perfect fold. You can measure, but you can also touch corner to corner, leaving it slack and then insert a ruler and press on the metal edge moving towards you from the top. Here is about.com’s guide on folding. Scroll down to about halfway the page before you find the useful stuff. The “Fancy French Fold” is in here, but it’s not the same one I showed you–It’s a variation. Use crop marks in illustrator and indesign (in the print window) to get an even more acurate fold.

You are welcome to use any number of these folds, so as long as you booklet is compact and the format fits your message.

Assignment list so far

  1. 5 Patterns–French fold book–Minimum. 10 pages, including an
    introduction and a paragraph about each pattern. Due in two weeks
  2. Symbols together–Luba Lukova 2 symbols together. Due next class
  3. Site–Picture, Logo and 2-page spread Due, refine as you go
  4. Annotated Picture–Take a picture of your site and annotate it.
    Patterns, stories, information (historical or otherwise). Due next class
  5. Visual Story–Write a story and annotate it with symbols and pictures. Due next class
  6. Pentagons & group book–Many many versions Have this done a week from Monday
  7. Walk–Annotate the patterns, repetition and flaws in architecture. Post up photos on your blog and title your blog post “patterns from the library” and work on this with your patterns book
  8. Two juried symbols with “names” Done, refine as you go

Processing Examples

Here are all of the examples, which were prepared by Peter Kirn of Create Digital Media. We are only required to do up to example 2d this week. If you want to do more, please do so. Be prepared to ask questions and to be confused, but don’t let this go to the last minute. It requires quite a bit of attention, just like a foreign language (because it is). Mess with it. Break it. Start over again. Put random numbers in there. Take some of the examples in Processing and mess with those. Break them. Start over again. Combine a few. Play!

Next week I will introduce variables and how variables are the key to understanding most of this stuff and why it’s not that hard after all.

Here is your link to the exercises.

Colin

—>

Processing

In preparation for the next assignment, we will learn the fundamentals of programming and visualization. We will be using processing, an open source programming language geared specifically for designers, artist and researchers. What you learn in Processing can be applied to ActionScript, Java and similar languages–the structure is basically the same.

For class next monday, download the Processing language through this link. If you are on a PC or you prefer to download from the downloads page, use this link. Be sure and download only the 0135 version.

Please feel free to take a look at the examples under FILE > EXAMPLES. To run an application, all you have to do is click on the “play” button on the upper left-hand corner.

If you have any questions, please email me.