Official website for Web Designer - defining the internet through beautiful design
FOLLOW US ON:
Author: Dave Harfield
26th March 2009

Design storytelling web experiences in Flash CS3

19 Reusing elements

19 Reusing elements

Design storytelling web experiences in Flash CS3

Copy and paste the frames from the animation in the main scene for the instructions (include the mask). A warning window will show – click Don’t Replace. In the instructions Movie Clip, change the descriptive text to something associated with the scene, and get rid of the character.

20 Loading the next scene
In the main timeline on the Action layer, insert a Keyframe on the last frame. For this, write code ‘a’. Insert two Keyframes after that. In the first one, write code ‘b’. For the second one, copy and paste the same code. If we have had another movie, we would have replaced the name scene1_a. swf to that.
(a)
stop();
btn1.onPress = function () {
gotoAndPlay(“content1”);
}
btn2.onPress = function () {
gotoAndPlay(“content2”);
}
(b)
stop();
loadMovie (“scene1_a.swf”, “_root.content”);

21 Creating the labels

Design storytelling web experiences in Flash CS3
On the labels layer, insert two Keyframes on the last two frames of the animation. Give the first one the frame label ‘content1’, and for the next ‘content2’. Now you can test your movie to make sure it’s working. Try the main.swf to see if everything connects, as it should.

22 Next and last scenes

Design storytelling web experiences in Flash CS3
For the next scenes, repeat steps 17-22. Change the file names to load as in step 21. For the last scene, the structure is a bit different. Copy and paste the start button on the main scene and give it the instance name ‘btn’. Make a layer for the action, insert a Keyframe on the last frame and add the code below:
stop();
btn.onPress = function () {
_level0.gotoAndPlay(“start”);
}

23 Final comments

Design storytelling web experiences in Flash CS3

For scene1_a and for the last scenes, you can use the scenes from the ‘final’ folder on the CD. This game contains only three scenes, but you can make it as long as you want; just add new ones and link them together. Remember, the idea is to create a nonlinear story.

Pages: 1 2 3 4

  • Tell a Friend
  • Follow our Twitter to find out about all the latest web development, news, reviews, previews, interviews, features and a whole more.

    3 Comments »

    • Sally Mack said:

      Thank you for this, it’s just what I need. MY students are doing storytelling and Gamemaking this term.

    • Uttist said:

      Thanks Dave!

      Indeed I’m working on a similar project, and the loading of external .swf on my flash is giving me a headache.

      Just 2 things that I’d like to clarify,
      - I notice the ActionScript is written in AS2, is it possible to load external .swf in AS3?
      - What would the codes be, if they’re written in AS3?

    • carlos said:

      is there live versions of these tutorials on this site? I have looked through most of them and most do not.

    What's your opinion?

    Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

    Be nice. Keep it clean. Stay on topic. No spam.

    * Required fields