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 8127709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:37:34+00:00 2026-06-06T07:37:34+00:00

I’m working on a little project right now in ActionScript 3. The project is

  • 0

I’m working on a little project right now in ActionScript 3. The project is almost finished, but i want to add an intro frame. And then i get a problem.

I have 2 .as file with code. One is called Game, and the another is called intro. Game is the document class.

I have 2 frames and when i start the game, Game class is applied to both of them. So how can i apply Game class to 2nd frame and Intro class to the 1st.

The code is a little bit too long, so wouldn’t upload it. Here is some part of it. Also code works perfectly so ai don’t have problem with it.

Game.as

package  {
      public class Game extends MovieClip {
             public function Game () {
                      //constructor
             }
             // some other functions
       }
 }

Intro.as

 package  {
      public class Introextends MovieClip {
             public function Intro() {
                      //constructor
             }
             // some other functions
       }
 }
  • 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-06-06T07:37:36+00:00Added an answer on June 6, 2026 at 7:37 am

    You cannot dynamically change the Document Class in AS3, nor would it make any sense from an OOP perspective to be able to. You have three options:

    1. Keep the document class as Game and have the Game class load in Intro before it starts the main code.
    2. Change the document class to Intro and load in the Game class after the intro has finished.
    3. Create a new class to be a “holder” class, and use that as the document class instead. Then load in Intro and Game individually.

    I would go with Option 3, since it’s probably the easiest to implement and it makes the most sense. You can move all the frames from your old main timeline into a new MovieClip, then link that MovieClip to the Game class. Make a similar MovieClip for the Intro class. Use your new class to create new instances of each at appropriate times programmatically.

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

Sidebar

Related Questions

I want to construct a data frame in an Rcpp function, but when I
I want to count how many characters a certain string has in PHP, but
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but

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.