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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:42:45+00:00 2026-05-27T23:42:45+00:00

I have a two files: Main.swf and DataEnter.swf. Each has a Document Class. I

  • 0

I have a two files: Main.swf and DataEnter.swf. Each has a Document Class. I try to load DataEnter.swf in Main.swf.

Main.as

package
{
    import flash.events.*;
    import flash.display.MovieClip;
    import flash.net.URLRequest;
    import flash.net.URLLoader;
    import flash.display.Loader;

    public class Main extends MovieClip
    {    
        public function Main()
        {
            var loader: Loader = new Loader();
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, DataEnter_loadComplete);
            loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onError);
            loader.load(new URLRequest('DataEnter.swf'));
        }       

        function DataEnter_loadComplete(evt: Event):void
        {   
            trace(evt.target.content); // DataEnter__Preloader__                    
        var SWF = evt.target.content;   
        SWF.FooBar(); //Error #1069: Property FooBar not found on DataEnter__Preloader__ and there is no default value                      
        }
    }
}

DataEnter.as

package
{
    import flash.display.Sprite;

    public class DataEnter extends Sprite
    {
       private var _socketWorker:Foo;

       public function setSocketWorker(sw:Foo)
       {
           _socketWorker = sw;
       }

       public function FooBar()
       {
           //do something
       }
    }
}

When occurs an event Event.COMPLETE of Loader in Main class, the evt.target.content contains object DataEnter_Preloader_.
But it must be “DataEnter“.

What is wrong? How to call method FooBar of Loaded Class ?

  • 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-27T23:42:45+00:00Added an answer on May 27, 2026 at 11:42 pm

    I opened DataEnter.swf in FlashDevelopIDE. This shows that my file has two frames, but FlashIDE it has only one frame.

    In DocumentClass of DataEnter I have included a class “Foo”, which works with sockets. But, object of this class, passed in constructor.

    When I removed the class “Foo” and publish file again, then on loading swf file *DataEnter_Preloader_* is gone, and expected DataEnter was there.

    Sorry for Bad English

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

Sidebar

Related Questions

I have a project consisting of two files, main.c and logoff.c. When I try
I have two files: logic.scala and main.scala logic.scala contains one class and main.scala have
I have two php files: main.class.php form.class.php in these files there are two class
I have two flash files (say screenOne.fla and gameA.fla). After importing the main symbol
Right now I have two .java files. The Main.java: public class Main { static
I have two files, one of the test.py is import new.py class Test: def
I have two files. main.py that has main program logic and functions.py that has
i have two files:(localhost/template/) index.php template.php each time when i create an article(an article
I have two files A - nodes_to_delete and B - nodes_to_keep . Each file
I have two files independant on each other. Let's just call it Class1 and

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.