ActionScript 3.0 in Flash CS3 Professional Beyond the Basics
Illustration by
Watching:

Using the removeChild method


From:

ActionScript 3.0 in Flash CS3 Professional Beyond the Basics

with Todd Perkins

Video: Using the removeChild method

In the last movie you learned how to put a visual element on the stage. In this movie you'll learn how to take a visual element off of the stage using something called removeChild. If you're following along, I am in Remove _Child.fla and that's in the Chapter 1 folder within the Exercise Files. Let's take a look at how this file is setup. We have the Button layer and the actions layer and you can probably guess what's on the Button layer. That's the button. Let's see what's in the actions layer. Select the first keyframe of the actions layer and open up the Actions panel by pressing Option+F9 on the Mac or F9 on the PC. Lines 1 and 2 are that code that you wrote in the last movie and then we have an event listener added to remove button and then a skeleton of the removeBoard function is going to run when you click on the remove button.
Expand all | Collapse all
  1. 7m 52s
    1. Welcome
      2m 24s
    2. How to use the exercise files
      1m 11s
    3. Reviewing ActionScript 3.0 basics
      4m 17s
  2. 35m 10s
    1. Understanding the Display List
      1m 59s
    2. Using Display Objects other than MovieClip
      3m 19s
    3. Using the addChild method
      2m 27s
    4. Using the removeChild method
      1m 25s
    5. Referencing a Display Object by index number
      4m 53s
    6. Referencing a Display Object by name
      4m 1s
    7. Controlling Display Objects in different timelines
      3m 23s
    8. Controlling Display Objects in different movies
      3m 42s
    9. Using addChild to change parents
      4m 19s
    10. Understanding Stage vs. stage
      5m 42s
  3. 30m 1s
    1. Why use ActionScript to animate?
      1m 25s
    2. Understanding the Tween class
      4m 3s
    3. Using different easing methods
      4m 4s
    4. Understanding Tween Class methods
      3m 44s
    5. Responding to tween events
      2m 32s
    6. Using tweens to move a dynamic map
      6m 1s
    7. Making the map respond to tween events
      8m 12s
  4. 30m 58s
    1. Introduction to XML data
      2m 17s
    2. Understanding E4X syntax
      2m 5s
    3. Creating raw XML data
      4m 8s
    4. Loading external XML data
      2m 32s
    5. Using the XMLList class
      4m 5s
    6. Using XML data to load external images
      3m 20s
    7. Using XML data to create an image gallery
      5m 6s
    8. Displaying text from an XML file in your gallery
      5m 5s
    9. Adding tweens to your gallery
      2m 20s
  5. 39m 17s
    1. Reviewing packages and classes
      1m 7s
    2. Creating a template for class files
      3m 38s
    3. Defining a reusable class path
      1m 28s
    4. Creating a DisablingButton class from a template
      5m 34s
    5. Connecting classes to movie clips
      3m 15s
    6. Communicating between classes
      10m 20s
    7. Creating a ScaleButton class
      8m 29s
    8. Reusing a ScaleButton class
      5m 26s
  6. 26m 10s
    1. Preparing to build an advanced image gallery
      4m 13s
    2. Dividing the thumbnail into segments
      2m 2s
    3. Adding interactivity to thumbnails
      4m 36s
    4. Loading full-sized pictures
      3m 58s
    5. Creating an Image Gallery class
      11m 21s
  7. 29m 5s
    1. Understanding particle systems
      58s
    2. Creating particles
      2m 50s
    3. Animating particles
      1m 19s
    4. Randomizing particles
      3m 42s
    5. Setting a particle range
      3m 22s
    6. Defining a dynamic range
      1m 53s
    7. Controlling particle alpha and scale
      2m 23s
    8. Varying particle speed
      6m 55s
    9. Removing children to optimize performance
      2m 51s
    10. Using different particles
      2m 52s
  8. 22m 32s
    1. Understanding transitions
      1m 41s
    2. Understanding the Object class
      2m 58s
    3. Placing transition information in an object
      2m 21s
    4. Creating transition animations
      2m 13s
    5. Creating different types of transitions
      3m 28s
    6. Using undocumented transition events
      4m 3s
    7. Using transitions in an image gallery
      5m 48s
  9. 26m 9s
    1. Reviewing Flash video basics
      2m 32s
    2. Creating a resizable interface
      3m 53s
    3. Understanding cue points
      1m 57s
    4. Using XML for closed captioning
      2m 34s
    5. Connecting closed captioning to cue points
      3m 55s
    6. Creating an advanced navigation interface
      3m 3s
    7. Creating an AdvancedVideo class
      8m 15s
  10. 23s
    1. Closing remarks
      23s

Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now
please wait ...
Watch the Online Video Course ActionScript 3.0 in Flash CS3 Professional Beyond the Basics
4h 7m Intermediate Sep 26, 2007

Viewers: in countries Watching now:

Taking the principles and skills taught in ActionScript 3.0 in Flash CS3 Professional Essential Training, Adobe Certified Instructor Todd Perkins demonstrates how to put them to practical use in this course. Todd fully explores ActionScript's most powerful features, including creating advanced navigational interfaces and special effects using XML data and adding accessibility to files via closed captioning. Exercise files accompany the tutorials.

Topics include:
  • Referencing and controlling display objects
  • Using XML data and E4X syntax
  • Working with packages and classes
  • Creating advanced effects using XML data
  • Creating a particle system
  • Animating using transitions
  • Taking Flash video to a new level
  • Using XML for closed captioning
  • Creating advanced navigational interfaces
Subjects:
Developer Web
Software:
ActionScript Flash Professional
Author:
Todd Perkins

Using the removeChild method

In the last movie you learned how to put a visual element on the stage. In this movie you'll learn how to take a visual element off of the stage using something called removeChild. If you're following along, I am in Remove _Child.fla and that's in the Chapter 1 folder within the Exercise Files. Let's take a look at how this file is setup. We have the Button layer and the actions layer and you can probably guess what's on the Button layer. That's the button. Let's see what's in the actions layer. Select the first keyframe of the actions layer and open up the Actions panel by pressing Option+F9 on the Mac or F9 on the PC. Lines 1 and 2 are that code that you wrote in the last movie and then we have an event listener added to remove button and then a skeleton of the removeBoard function is going to run when you click on the remove button.

So the board's already is on the stage. All we need to do is take it off when you click this button and you can probably guess how that would work. If you use addChild to add the board as a child, we would use removeChild to remove the board as a child. That's exactly how it works. So just type inside of that function, removeChild with capital C, open parenthesis, board, closed parenthesis. That's really all there is to it. So let's just test the movie by pressing Command+Return on the Mac or Ctrl+Enter on the PC and you can see that the board is on the stage, and when we click the Remove button, we use removeChild to take the board off the stage. It's fairly simple, huh? Well there is a look at how to use removeChild.

In the next few movies, we'll take a look at how to reference children in different ways.

There are currently no FAQs about ActionScript 3.0 in Flash CS3 Professional Beyond the Basics.

 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

* Estimated file size

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed ActionScript 3.0 in Flash CS3 Professional Beyond the Basics.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.