Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 245225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:04:15+00:00 2026-05-11T21:04:15+00:00

How can I used ActionScript to draw on different frames of a movie clip.

  • 0

How can I used ActionScript to draw on different frames of a movie clip. That is, make it so that movieClip.gotoAndStop(0); will show something different to movieClip.gotoAndStop(1);

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:04:16+00:00Added an answer on May 11, 2026 at 9:04 pm

    You can use addFrameScript in your code.

    For example, let’s say you have a movieclip associated with the class CustomMovieClip.

    In your CustomMovieClip’s constructor, you can write something like the following (untested code):

    class CustomMovieClip
    {

    …

    function CustomMovieClip()
    {
    stop();

    // add drawGraphicsForFrame1 code into frame 0

    addFrameScript(0, drawGraphicsForFrame1);

    // add drawGraphicsForFrame2 code into frame 1

    addFrameScript(1, drawGraphicsForFrame2);
    …

    }

    private function drawGraphicsForFrame1():void
    {
    stop();

    var sprite:Sprite = new Sprite();
    addChildAt(sprite, 1);

    // draw in sprite

    sprite.graphics.lineStyle …

    }

    private function drawGraphicsForFrame2():void
    {

    // remove the previous sprite (assumption: it's always at layer 1)
    
    if (getChildAt(1) != null)
      removeChildAt(1);
    
     // draw new sprite
    
     var sprite:Sprite = new Sprite();
     addChildAt(sprite, 1);
    
     sprite.graphics.lineStyle ...
    

    }

    …

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any javascript algo that i can used to check for a website
Can anyone point to libraries that can be used for Printing from Compact .Net
In the past, I used swiftsuspenders that is an actionscript 3 IoC controller. Basically
So in actionscript 3, instances of the Object class can be used an as
I have a dynamic ActionScript Class that is used to send parameters to a
I have a set of ~5 ActionScript 3 classes that are currently used within
In ActionScript, you can do something like this: [Embed(source = src/myfile.xml, mimeType = application/octet-stream)]
@uncheckedVariance can be used to bridge the gap between Scala's declaration site variance annotations
SSL can be used to ensure the server identity (using server certificates) and, optionally,
What SQL can be used to list the tables, and the rows within those

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.