1 / 13

Creating Scenes

Creating Scenes. A scene in flash contains one or more layers that show related objects, in the stage, that act and interact to deliver a certain idea. When creating a flash file, it will have one scene by default (named as Scene 1). A created movie can have one or more scenes.

cleo
Download Presentation

Creating Scenes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Creating Scenes • A scene in flash contains one or more layers that show related objects, in the stage, that act and interact to deliver a certain idea. • When creating a flash file, it will have one scene by default (named as Scene 1). • A created movie can have one or more scenes. • To insert a new scene into your movie: • Go to (insert  scene) in the flash menubar.

  2. Creating Scenes • To delete and rename a scene in your movie: • Go to (WindowDesign PanelsScene) in menubar • Or, Shift + F2 • Then a new panel (scene) will be displayed. Using it, you can delete , rename, duplicate existing scenes. • You also can insert a scene using it. duplicate insert delete

  3. ActionScript in flash • ActionScript is a way to communicate with a program. • you can use it to tell Flash what to do and to ask Flash what is happening as a movie runs. • This two-way communication lets you create interactive movies. • ActionScript is the code statements you write to interacts with flash program. • ActionScript can be added to frames or some flash objects (such as buttons)

  4. ActionScript in flash • To open the (Actions) panel in which you can add ActionScript: • Go to (Window Development PanelsActions) in menubar • Or, press F9 • The following slides shows the different parts that compose the Action panel.

  5. Actions Panel Add action script code here Built-in functionalities Objects and frames that hold actionscripts The object or frame that holds The written action script

  6. Creating a button symbol • Button symbol is used to perform some action when pressing on it. • To create a button symbol: • Create new flash file • Draw a rectangle then select it. • Convert it to a button symbol, call this symbol (myButton) • This can be done by selecting the shape and pressing F8 • Now, select the button (myButton) and press F9 to display the action script of it.

  7. Creating a button symbol • Write action script as follows: Means that the the code in { } will be executed when pressing myButton To print on output window (The code to be executed) Symbol name

  8. Creating a button symbol • On the Stage, double-click the logo button that you created to view the button Timeline (to enter symbol-editing mode). • The button Timeline contains the following states: • Up : the button state when it is not pressed • Over : the button state when the mouse is over it • Down : the button state when it is pressed • Change the Up, Over, and Down state by inserting a key frame and changing the color on each one. • Click Scene 1, above the upper left side of the Stage, to exit symbol-editing mode for the button.

  9. Using Timeline functions • Some useful timeline functions that controls playhead movement in a Timeline : • stop(); • It is used to stop the playhead and stop the movie playing. • play(); • It is used to resume the movie after stopping it. • nextFrame(); • It is used to advance to the next frame • prevFrame(); • It is used to return to the previous frame

  10. Using Timeline functions • nextScene(); • It is used to advance to the next scene. • prevScene(); • It is used to return to the previous scene • gotoAndStop(scene_name, frame_no); • It moves the playhead to the scene (scene_name) at frame number (frame_no) and stops there. • Scene_name should be enclosed by “”. • Frame_no should be an integer. • gotoAndPlay(scene_name, frame_no); • The same as previous function without stopping

  11. Using Timeline functions Ex) This example shows how to use timeline functions. • Create a new flash file. • Rename the scene to “firstScene” • Select Frame 1 of layer 1. • In the Actions panel , verify that Frame 1 is selected. • Click in the Script pane of the Actions panel, and type stop(); to add the stop action. To verify that Frame 1 is selected

  12. Using Timeline functions • Create a new scene and name it “newScene” • In scene “newScene” draw a circle and make it moves from one place to another. • In the Action panel of the last frame of “newScene” add (stop();) command • Return to the first scene, add a button in the stage and type the following statement to the action panel of that button: gotoAndPlay(“newScene”,1); • Test the scene

  13. Exercise • Make a flash program that shows the steps needed to learn the subtraction process. • See the file (subtraction.swf) • You have to use a button to transfer from step to another.

More Related