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

  • Home
  • SEARCH
  • 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 4236746
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:40:54+00:00 2026-05-21T02:40:54+00:00

I have 2 flash files, one with an intro and the second that just

  • 0

I have 2 flash files, one with an intro and the second that just has a document class file that plays out a snake game. How could i import that document flash file and make it play out on like frame 100 off my other flash file.

Thankyou for any help.

  • 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-21T02:40:55+00:00Added an answer on May 21, 2026 at 2:40 am

    You can instantiate the Snake class file in your intro, using code like the following on frame 100:

    var game:Snake = new Snake();
    addChild(game);
    

    assuming your document class is called SnakeGame. You may have to make a few changes in SnakeGame for this to work, however. The stage and root properties of SnakeGame will be null in the constructor when using this method. This is different behavior from it’s was the document class (or placed directly on the stage) — stage and root are already initialized. So if you do any actions to either root or stage in the constructor, you must change this or you will get an error. To fix this, listen for the ADDED_TO_STAGE event in Snake:

    public function Snake() {
        addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
    }
    
    public function onAddedToStage(event:Event):void {
        removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
        // stage+root are now valid, put your init code here
    }
    

    Alterantively, you could link the Snake class to an empty MovieClip symbol and place that directly on the stage on frame 100. First, create an empty MovieClip by going to Window->Library and clicking the +. In the Create New Symbol dialog, check “Export for ActionScript” and type in Snake in the Class field under Linkage. Now you can drag that MovieClip directly onto the stage on frame 100 and it hopefully will work without changes to the code.

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

Sidebar

Related Questions

I have a small flash file that just loads and shows one image scaled
I have a flash movie that loads images dynamically from an xml file. I
Is there a way to have an file browser for Flash that allows the
I have a flash player that has a set of songs loaded via an
I have a Flash project, and it has many source files. I have a
I have a flash .swf file that I embed on my webpage. On my
I have a flash program that loads movie clips dynamically and sometimes they want
I have a Flash application that is hosted from within a Drupal page. Some
I have a Flash sprite in my Director project. Under the Properties of that
Let's say that I have a Flash website where you could create an avatar

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.