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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:04:58+00:00 2026-05-23T13:04:58+00:00

Can somebody explain what is the difference between getDefinitionByName and getDefinition inA AS3? When

  • 0

Can somebody explain what is the difference between getDefinitionByName and getDefinition inA AS3?

When I load an external SWF I can’t use getDefinitionByName because I get an Error #1065.

But using externalSWF_ContentLoaderInfo.applicationDomain.getDefinition works OK.

So, why getDefinitionByName doesn’t find the className?
I mean, if the definition is inside the applicationDomain of the loaded SWF, why is not in the main SWF too? (I’m using Flex).

Offtopic: I can’t create new tags so I can’t add the tags getDefinition and getDefinitionByName 🙁

  • 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-23T13:04:59+00:00Added an answer on May 23, 2026 at 1:04 pm

    getDefinition is a method of an ApplicationDomain which returns a definition of a class, namespace or function.

    getDefinitionByName is a package-level function from flash.utils which returns a Class object that you can use to instantiate new Objects. The definition must already be loaded somewhere in your ApplicationDomain.

    The reason you can’t make getDefinitionByName with an external SWF is that it is loaded into a separate ApplicationDomain. Your second example works because you are targeting the correct ApplicationDomain. To make your first example work you must load the external SWF into your current ApplicationDomain like this:

    var request:URLRequest = new URLRequest("externalSWF.swf");
    var context:LoaderContext = new LoaderContext();
    context.applicationDomain = ApplicationDomain.currentDomain;
    var loader:Loader = new Loader();
    loader.load(request,context);
    

    This works because it passes the current ApplicationDomain as a property of the loader context.

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

Sidebar

Related Questions

Can somebody explain me the difference between Temp table and table variable in SQL
Can somebody explain to me the difference between the project target and the minimum
I'm a little bit confused, can somebody please explain the main difference between those
can somebody please explain what is the difference between freeglut.h and glut.h
Can somebody explain difference between before and after trigger in oracle 10g with an
I am new to performance testing on rails. Can somebody explain the difference between
Can somebody explain me the difference between using <%: and <%= in an aspx
What is the exact difference between CursorAdapter and ResourceCursorAdapter ? Can somebody explain what
Can somebody please explain (with example) the difference between context-independent and context-dependent overloading?
can somebody please explain what is the difference between the following mechanisms of passing

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.