Here is my office hour schedule for finals week:
- Tuesday 05/14/2013 — 1:00pm to 2:30pm in WWH 420
- Wednesday 05/15/2013 — 1:00pm to 2:30pm in WWH 420
If you have any questions please feel free to drop me a line. Thanks! -Craig
Here is my office hour schedule for finals week:
If you have any questions please feel free to drop me a line. Thanks! -Craig
Our final exam will cover a variety of topics, including those listed in this post. To prepare for the exam you should review assigned course readings, assignments as well as the terms and concepts outlined below.
Today we deconstructed an interactive animation sequence. Click on the image below to see what we created:
As promised, here’s the HTML & CSS that we worked on in class. Good luck with your assignments!
Note that you will have to click on the little “clapboard” at the top right side of the screen to switch between scenes. You will initially start in Scene 3 – switch it over to Scene 1 to see the beginning of the animation.
In the previous example (Motion Tweens) we imported graphics directly into your Library. You can also create new library symbols that incorporate both imported and hand-drawn objects. Here’s how to get started:
The Bone Tool
The current state of the web imposes a stringent set of limitations on potential applications, none the least of which is bandwidth. It takes time to transmit information across the Internet, so the larger the amount of information, the longer it will take to transmit.
Flash came into being to attempt to fill the long vacant niche of web based animation. Traditional computer generated animation came along with the price tag of huge file sizes, mainly due to the fact that they stored graphical information as a series of bitmaps. For every individual pixel, one or more bits had to be allocated to store a color value. Flash stores information as a set of vectors, or mathematical equations. This allows a significant reduction in the amount of space needed to store a graphical object. Consider the following example:
The graphic above is a bitmapped circle. The computer must store a set color values for each discrete point on, around, and inside the circle. When the circle expands in size, so do the points, and thus quality is lost.
The computer must allocate a 15×15 grid of pixels to store the circle. That’s 225 individual pixels. If we were using 8 bit color (256 colors), we need exactly 1,800 bytes to store the image above.
A vector based rendition of this circle would contain the following:
4 = x2 + y2 , 0000FF
All we need to do is to store the mathematical equation for a circle and the color value of the object. This equates to a significant reduction in the amount of space needed to store the circle. And, as an added bonus, vector based images are fully scalable. As you increase their size, their edges do not get “pixilated” due to the enlarging on individual pixels. The mathematical equation simply gets recalculated using higher values to generate the same smooth curve.
The other feature that makes Flash so suitable for web delivery is that it also has a built in ability to create “streaming” animations. A Flash movie will begin playing before the entire file has downloaded. The remaining portion of the movie will download in the background automatically, thus freeing the end user from a lengthy download.
Go ahead and open up Flash. The Flash application interface is similar to that of Photo Shop. Along the left side of the screen you’ll see a series of drawing tools, and to the right you will see an a white box which is called the ’stage.’ At the bottom of the screen you will see the ‘Properties’ panel for editing specific aspects of a selected object and at the right you will see a space for docking specialized editing panels. So far, so good. The main difference between the Flash interface and that of a 2D image editing program is the ‘Timeline’ that runs along the top of the screen. The timeline allows you to define changes in your images over time and thus gives you the ability to create scenes that animate.
The timeline is arguably one of the most important areas of the Flash interface. All visible graphics, animations, sound and video objects must appear on the timeline in order for the end user to see and / or interact with them (with the exception of graphics generated via ActionScript, but we’ll get to that in a bit!) The small rectangular boxes that extend out from the left side of the interface are called “frame” markers. Frame markers are numbered along the top of the screen for reference purposes – you will be referring to them quite often when designing animation sequences. These numbers represent time – the larger the number, the farther away the frame marker is from the beginning of the movie.
In general Flash movies run at 24 frames per second (FPS.) You can change this value by clicking on the stage and setting a new number in the ‘Frame rate’ box in the Properties panel. Under this system you can divide the total number of frames you are using by 12 to determine how long in seconds your animation will last. For example, a 36 frame animation will last 3 seconds.
We need to create some content on the timeline before we can start animating in Flash. Content can be drawn from within Flash or can be brought in from another source, such as an image, video or sound file. Content must be put into a “keyframe” on the timeline. Keyframes denote that something “new” is happening on the timeline. For example, If you wanted a ball to appear in your animation at frame 5 you could place a keyframe on frame 5 and draw a ball. If you wanted to have the ball exist for 5 frames and then disappear you would create a blank keyframe on frame 10. That way Flash would know that there was a “change” on frame 10 and that the ball was no longer to be displayed. Keyframes become very important in animation as they allow you define the “start” and “end” point of an animation sequence. Keyframes appear as little circles within a frame. If the circle is white it means that the keyframe is blank. If it is shaded it means that there is something in that frame.
You will need to create multiple layers on the timeline if you’d like to have more than one thing happen at the same time. Flash can only support one animation per layer. You can add new layers by using the ‘Insert layer’ icon in the timeline panel. Layers can be renamed and can be organized into folders for easier access.
There are two basic animation techniques in Flash – Shape Tweening and Motion Tweening. Shape Tweening should be used in the following circumstances:
Keep in mind that all animation in Flash requires that the animation take place on its own Layer, which is similar to a PhotoShop layer. If you have Flash open you should already have a layer to work with in the Timeline area named ‘Layer 1′. If you need to make more you can always click on INSERT->TIMELINE->LAYER.
Click on the small white box on layer 1 that has a small circle in it. This is Flash’s symbol for a keyframe and it tells Flash that something new exists in this frame of animation. After you’ve clicked here go ahead and use the drawing tools to draw a blue ball on the stage. You can do this by looking for the Rectangle Tool (the 8th icon down in the drawing toolbar), positioning your mouse over tool and holding down the left mouse button. After a second or two a sub-menu will appear – select the oval tool and draw a ball similar to the one below. Selecting a color using the swatches at the bottom of the drawing toolbar will cause the ball to be drawn with the fill color of your choice.
Now we want to move the ball across the stage. To do that we need to first tell Flash how long this animation should take. We measure how long animations last in Flash in terms of how many frames they take to execute. As stated above, the default speed of a Flash movie is 12 frames per second, so let’s have this ball take 2 seconds to move across the stage. Click your mouse inside Frame 24 on Layer 1 and choose INSERT->TIMELINE->KEYFRAME. Your screen will look as follows:
Now we’ve told Flash that there’s something going on in Frame 1 (a ball at the top of the screen) – we’ve also told it that nothing is happening from frame 1 to Frame 24 (as can be seen by the standard gray frames that exist on the timeline). Frame 24 has a keyframe in it, which means that something can change in the animation here. Let’s move the ball now. Make sure that you’ve got Frame 24 selected and move your ball to the bottom right of the screen. Try playing your movie now and see how it works (CONTROL->PLAY MOVIE)
See how choppy this is? In order to make it smoother we have to tell Flash to animation the frames in between the two keyframes. To do that click anywhere in-between those frames on the timeline and choose SHAPE from the TWEEN menu at the bottom of the screen. Playing your movie now will result in the following:
Note that you can change any aspect of the animation by modifying what’s going on in the keyframes. If you wanted to move the ball to the top right instead of the bottom right just move the ball in Frame 24. Playing your movie again will show the change in your animation. If you’d like the animation to take longer you can click and then click-drag the keyframe in frame 24 to a higher frame, thus adding more time in between the two keyfames. Likewise if you’d like to make it shorter you can drag the keyframes closer together.
Shape tweens also allow you to take advantage of Flash’s ability to work with vector based objects and perform what is called a ’shape morphing’ – to see this in action let’s modify your movie a bit. Click into your first frame and select your ball using the black arrow tool. Then delete the ball and replace it with a red square. Running your animation again will result in the following:
Flash also allows you to move more complex objects across the stage, though if you were to try and move a complex object (one with many shapes, colors, etc) using the Shape Tweening technique you would be presented with a weird image morph effect going on all the time. To allow objects to ’stick together’ we have to group them in some way.
To start, open up a new Flash movie. Then click on INSERT->NEW SYMBOL. We’re going to create a ‘Movie Clip’ symbol of a Snowman, so type ‘Snowman’ into the Name blank. Then click the OK button. You’ll notice that your screen changes slightly to indicate that you are editing a symbol (see below):
The “breadcrumbs” above the timeline indicate that you are currently inside Scene 1 of your movie, editing the ‘Snowman’ symbol. You can get back to Scene 1 by clicking on its name (it acts similarly to a hyperlink.) You can also use the ‘Library’ on the right side of the screen to edit symbols – just double click on symbol to go into “editing” mode.
Okay, so we’re in editing mode for our little Snowman. Go ahead and draw a snowman similar to the one below on the stage:
Click on the ‘Scene 1′ hyperlink to get back to scene 1 of your movie. Click on the keyframe on layer 1 and drag a copy of your Snowman out of the library and onto the stage. Go to frame 24 and create a frame — then right click in the range and select CREATE MOTION Tween. Move the Snowman across the screen on the last frame — this will automatically add in a keyframe to the layer. Your movie should look something like this:
You have some additional options at your disposal for motion tweens that can be defined using the properties panel. For example, if you want the snowman to rotate while moving you can use the ‘Rotate’ drop down to define which direction and number of rotations to apply to the tween. You can also modify the symbol at either keyframe to change how the animation takes place – for example, a popular effect is to “scale” the snowman down to a smaller (or larger) size to simulate the object getting bigger (or smaller) over time. You can also click on the symbol and use the ‘Color’ dropdown to change color aspects – the most popular effect here is to change the Alpha (opacity) of the image to simulate it fading in or out as can be seen below:
Flash makes it easy to include sound and music in your projects. The first step to using audio is to obtain a music file. Flash works best with MP3 files, but you can use other files in a pinch. Keep in mind that adding lots of music to your movies will cause the final file size to increase dramatically. A good place to find audio files is at the Flash Kit Loops Library. This library of audio files are designed to be “looped” over and over to provide a seamless background track for your movie.
Once you have a file downloaded to your machine you can bring it into Flash by clicking on FILE -> IMPORT -> IMPORT TO LIBRARY. The audio file will appear in your library listing and you can use the ‘Play’ button over in the library interface to preview the sound.
Sounds need to go onto the timeline just like everything else in Flash. I like to create an entirely separate layer for sounds. Once you have a layer you can drag the file out onto the stage – it won’t show up as a visual object there, but you’ll know you did it right if the timeline indicates that there is a “waveform” present on the layer. Click on this waveform and look at the properties panel. The ‘Sync’ property allows you to define how the sound will play within your movie. Setting this to ‘Event’ will play the sound as a high quality sound but will not guarantee that the sound will always synchronize with the animation that is happening on other layers. Changing this to ‘Stream’ will force the sound to synchronize with the timeline, though the quality may be slightly less than if you set it to ‘Event.’ For purposes of the Music Video assignment you should use the ‘Stream’ property.
The best way to test your movie is through the CONTROL -> TEST MOVIE command. This command lets you see how your movie will appear once it is “published” (see below). It also removes “housekeeping” items, such as motion guides, and crops the edge of your movie so that you only see objects that are actively on the stage. From this point forward when we will be using this technique in lieu of the CONTROL -> PLAY command.
When you’re all done you’ll probably want to do something with your movie other than watch it within Flash. Thankfully Flash exports itself into a number of very compatible formats. To export your movie you should first save it and then click on FILE -> PUBLISH SETTINGS. HTML and SWF should be checked – these are the default web compatible formats. You can also export Flash as a Quicktime movie if you’d like to import it into a more comprehensive video editing package, or use the Windows or Mac projector file to create a self executable file that can be played without any special software (SWF files need the free Flash plug in in order to play).
Once you’ve published your file you can link it to your web site fairly easily depending on your preferred web publishing package. In Dreamweaver you can open up an HTML page and click on Insert -> Media -> SWF and then browse to find your SWF file. The file will be copied to your site directory and will be embedded onto the current page.
If you’re not using Dreamweaver you can still easily import a Flash SWF onto your page. For example, popular web-based content management systems (such as WordPress) contain a ‘Insert Embedded Media’ button in their authoring interface. If you selected HTML in the Publish Settings menu you will also be given a “wrapper” document that contains all the HTML code necessary to to put your Flash creation on a website. You can copy and paste this code onto your own site (don’t forget to upload the SWF file as well!) – you could also just upload the HTML file and SWF files to your site and create a link to the HTML file.
Today we discussed the concept of digital animation and explored how a computer can be instructed to render animated content. Here’s a detailed overview of what we covered:
The advantage to using animated graphics like the ones above is easily seen – they have the ability to display motion graphics and are easily inserted into existing web sites in the form of an image file. However, animated graphics by nature are much larger than their “static” cousins. This occurs because you are effectively adding an additional graphic (or frame) for each bit of motion you wish to simulate. Animated graphics do not allow for any interactivity, nor do they allow you to incorporate any additional media capabilities, including an audio track. Animated GIFs may or may not loop (i.e. replay at the end) but they do support image transparency like a PNG file, which means you aren’t stuck with a white background behind your images if you don’t want one.
What is a QR Code?
QR, or “Quick Response”, codes are 2-dimensional “barcodes” that are used to store information. Originally used as a way to keep track of inventory in the automotive industry, QR codes have evolved into a technology that lets you easily “tag” physical objects to virtual content.
Reading a QR Code
It’s easy to read a QR code using a mobile device (iPhone, Android, iPad, etc). All you need to get started is a device that has a camera and a free QR code reader application. Here’s a quick list of apps that you can use to get started:
iPhone / iPad
Mac / PC (with an attached webcam)
Once you have a QR reader app installed all you need to do launch it and point it at a QR code. The app will take a moment to decode the pattern, and once the code is recognized you will be able to view the content that it contains. For example, if you scan the code below your mobile device will be redirected to the Statue of Liberty homepage.
Creating your own QR Codes
It’s surprisingly easy to create your own QR codes – here’s how!
Today we discussed how to get started with digital audio as well as an overview of Augmented Reality. Note that that Augmented Reality is an “extra” topic and won’t be included on the final exam. Here’s an overview of what we covered:
The title says it all! CSS was definitely not built for this!