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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:27:06+00:00 2026-06-01T00:27:06+00:00

Hai am trying to load the variables from parent(flash) to child(flash).Its working fine,. parent

  • 0

Hai am trying to load the variables from parent(flash) to child(flash).Its working fine,.

parent swf:(flash)

var parentMessage:String = "Hello";
var swf:MovieClip;
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
l.load(new URLRequest("child.swf"));
function swfLoaded(e:Event):void
{
swf = MovieClip(e.target.content);
swf.passVariable(parentMessage);
}

child swf(flex)

public var childMessage:String;
function passVariable(_msg:String):void
{
childMessage = _msg;
trace("message passed from parent to child: " + childMessage);
}

But while communicating with flash to flex its not loaded.

Error Message

ReferenceError: Error #1069: Property passVariable not found on
_child_mx_managers_SystemManager and there is no default value. at Function/()

Kindly help me .

Update

parent.swf in flash

 var parentMessage:String = "Hello";
 var swf:MovieClip;
 var l:Loader = new Loader();
 l.load(new URLRequest("asd.swf"));
 swf.addEventListener("applicationComplete", swfLoaded);
 function swfLoaded(e:Event):void
 {
 var app:DisplayObject = swf.getChildAt(1);
 app["passVariable"](parentMessage);
 }

Child.swf in flex

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
           xmlns:s="library://ns.adobe.com/flex/spark" 
           xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"  addedToStage="application1_addedHandler(event)" >
<fx:Script>
    <![CDATA[
        public var childMessage:String;

        protected function application1_addedHandler(event:Event):void
        {

            passVariable(childMessage);
        }
        public function passVariable(_msg:String):void
        {

            childMessage = _msg;
            trace("First message passed from parent to child: " + childMessage);
}

    ]]>
</fx:Script>

ErrorMessage

   TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Untitled_fla::MainTimeline/frame1()
   TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.managers::FocusManager/activate()
at spark.components::Application/initManagers()
at spark.components::Application/initialize()
at asd/initialize()
at mx.managers.systemClasses::ChildManager/childAdded()
at mx.managers.systemClasses::ChildManager/initializeTopLevelWindow()
at mx.managers::SystemManager/initializeTopLevelWindow()
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()
at       mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
  • 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-01T00:27:07+00:00Added an answer on June 1, 2026 at 12:27 am

    In Flex applications top most sprite is SystemManager. And Application object is added as a child of SystemManager. So, you’ll need to get it.

    swf = MovieClip(e.target.content);
    swf.addEventListener("applicationComplete", onApplicationReady);
    
    private function onApplicationReady(evt:Event)
    {
        var app:DisplayObject = swf.getChildAt(0);
        app["passVariable"](...);
    }
    

    Note, that Application is added on “applicationComplete” event.

    Read more about loading applications.

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

Sidebar

Related Questions

Hai am trying to get the gps location using BroadCast Receiver.its working fine,But i
Hai am trying to set alarm for every 10 minutes.But its running first time
Hai am trying to add the height and width of swf dynamically but i
Hai Friends, i am trying to load 20 images.I get outofmemory error. how to
Hai i want to generated an automated click event. I am working in php
Hai guys, I want to send scheduled mail every morning from my application and
Hai, I am trying to create a chess board. Here I want to do
Hai, I am trying to understand few concepts in JavaScript. Consider the following code:
hai guys, I have imported my gmail contacts from gmail and a file name
I am trying to implement Camera application in android,and i got some code from

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.