Week Four: July 19-23

tuesday   thursday   TO DO

 

Tuesday, July 20

 

DUE July 22: Lesson 3

DUE July 25: Assignment 2

Weekly Checklist

 

 

GAMEPLAN

  • Button Actions

 

DISCUSSION

 

Based on Chapters 8, 9, 10

 

Make buttons do something

  • Drag the button onto the stage
  • Choose Window >> Behaviors to open the Behaviors palette
  • Add Menu icon >> Web >> Web Page, type a URL

 

Start and Stop Buttons

  • Create a layer, name it for the animation. Set a keyframe on the first frame (F8)
  • Drag a movie clip animation onto the stage on the first frame of its layer.
  • Select your movie clip, and in the Properties panel, type the layer name into the instance name (like myMovie) (NOTE: more required movie steps below)
  • Create another layer, and name it for the buttons. Set a keyframe on the first frame (F8)
  • Drag the start and stop button onto their layer.
  • Select the start button, and in the Properties panel, type the start_btn name into the instance name
  • Select the stop button, and in the Properties panel, type the stop_btn name into the instance name
  • Open the Actions Panel (F9)
  • Click on the start button in its layer, and in the Actionscript textbox, type:

    on(release)
    {
    myMovie.play();
    }

  • Click on the stop button in its layer, and do the same, but with this code:

    on(release)
    {
    myMovie.stop();
    }

 

Make an animation open as stopped

  • Open movie clip
  • Click on first frame
  • In Actions, type stop();
  • Click on last frame
  • In actions, choose Timeline Control >> gotoAndPlay and double-click. In the gotoAndPlay(); phrase, type 2 between the parentheses: gotoAndPlay(2);
  • Exit movie so you are in your main stage/timeline
  • Test your movie to see if the start and stop buttons work

 

Start/Stop an animation with a one button

  • Create a layer, name it for the animation. Set a keyframe on the first frame (F8)
  • Drag a movie clip animation onto the stage on the first frame of its layer.
  • Select your movie clip, and in the Properties panel, type the layer name into the instance name
  • Create another layer, and name it for the button. Set a keyframe on the first frame (F8)
  • Drag the button onto its layer.
  • Select your button, and in the Properties panel, type the layer name into the instance name
  • Open the Actions Panel (F9)
  • Follow the steps in Chapter 10, page 239

 

DEMO

 

TASKS

  • Do Chapter 10, page 238-239 (a different way)

 

 

BACK TO TOP

 

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

 

Thursday, July 22

 

GAMEPLAN

  • Masks
  • Blend Modes
  • Dynamic Text
  • Event Handlers
  • Controlling timelines with buttons
  • Frame Actions

 

DISCUSSION

 

Based on Chapters 6, 8

 

Masks

  • Masking is about hiding the part of a layer you don't want to see while giving a 'cut-out' effect to the part you do want to see.
  • The mask layer is the layer you will add some shape, text, etc. that will create the 'cut-out'.
  • The masked layer is the layer that serves as the 'background' to the cut-out.
  • Have a background image or color on the mask layer
  • Click on this layer and add a new layer, and right click on the new layer's name to choose Mask. This is your masking layer,
  • Unlock the masking layer, and add something to it that will 'cut-out' to show the background of the other layer. Then lock it again.

 

Blend modes

  • Blend modes allow you to create Photoshop-like transparency effects
  • See Chapter 8, page 175 for various descriptions, and play around with the blends.

 

Event Handling

  • An event is any interaction that is needed to make something happen, like a mouse click, rollover, key press, etc.
  • You van use Actionscript to program simple handling of these events - to make a movie clip start on the release of a mouse click, for instance.
  • We're focusing on simple event handling with Actionscript 2.0 - start, stop, move to frame, move to scene, etc.

 

Event Actions

  • Actions that happen because of a user interaction are scripted onto the use of a Flash symbol, like a button.
  • Use a button to open a web page
  • Use buttons to start/stop a movie
  • Use a button (hidden over text) to load a movie clip
  • Make sure you have clicked on the symbol in its layer and on the frame you want to affect it, before opening and using the Actions panel.

 

Example Symbol/Event Handling Actions

  • Need to start with Global Functions >> Movie Clip Control
    • on: release, press, etc.
  • Then need to add a Global Functions >> Timeline Control inside the {}
    • play, stop, gotoAndPlay, gotoAndStop, prevFrame, prevScene, nextFrame, nextScene, stopAllSounds
  • OR need to add a Global Functions >> Browser/Network inside the {}
    • getURL, loadMovie

 

Frame Actions

  • Actions can be used on Frames too, and these are not event handlers, because the are not interactive.
  • An action on a frame tells whatever is in or being affected in that frame to do something.
  • Common frame actions include stop, go to and play, and start.
  • You can also stop the looping of sounds with a stop frame action.

 

Actions inside Movie Clips

  • You can script Event Handling to symbols and add actions to Frames inside of animated movie clips, as well as to the main timeline you may drop the movie clip animation into.
  • You can stop the looping of a movie clip animation with a stop action inside the movie clip.

 

 

DEMOS

 

 

BACK TO TOP

 

 

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

 

TO DO

 

LINKS

  • http://previews.learnflash.com/previews/building-websites-flash-cs4/6.html
  • http://www.youtube.com/watch?v=3QoU1nFUSa0
  • http://fliiby.com/file/482504/nrtrfzuvkk.html

 

 
BACK TO TOP