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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:09:44+00:00 2026-06-11T21:09:44+00:00

Mostly, problem is described in the title… I tried to load an external SWF

  • 0

Mostly, problem is described in the title… I tried to load an external SWF file that contains some named MovieClip instances (exporting and naming is done by Flash CS5 software) and to add some of externaly loaded (named) MovieClip-s in MovieClip object which is created in my code. Problem appears when i add MOUSE_CLICK listener to parent MovieClip. Simply, it does not dispatch event when i click on it at the stage…

private var loader:Loader;

public function Example(){
    loader = new Loader();
    var request:URLRequest = ... // URL to external SWF
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadingCompleted)
    loader.load(request);
}

private function loadingCompleted(event:Event):void{
    var mc:MovieClip = loader.content as MovieClip;
    var myMovie:MovieClip = new MovieClip(); 
    myMovie.addChild(mc.getChildByName("object_name"));
    myMovie.addEventListener(MouseEvent.CLICK, myMovieClicked);
    addChild(myMovie); // myMovie (with nested mc) appears on the stage
}

private function myMovieClicked(evt:Event):void{
//never reached
}

EDIT: I didn’t mention that i’m working in Flex using FlashBuilder 4.5 where i created ActionScript project. Code above is body of Example class, which is main SWF class.

EDIT AFTER ANSWER: myMovie.mouseChildren = false solves the problem. Earlier i tried to set mouseEnabled = true, and it didn’t fix the problem. But i’m confused about event flow now… Even if child is target node, why mouse listener on parent MovieClip doesn’t recieve event (in capture phase) when parent is still on event flow? Moreover, when i create another movie clip in my code (whit some simple shape inside) and add it to myMovie, everything works fine. What is so special when i obtain movie clip from externaly loaded SWF?

  • 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-11T21:09:45+00:00Added an answer on June 11, 2026 at 9:09 pm

    Have you tried doing myMovie.mouseEnabled = true and myMovie.mouseChildren = false ?

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

Sidebar

Related Questions

I'm mostly convinced that there is an answer to this problem, but for the
I´m encountering this problem trying to mock some objects that receive complex lambda expressions
I encountered a problem when running some old code that was handed down to
Here's the problem. In my app, I have 5 tabs which contains activities. In
I notice the problem mostly with Firefox 3.6.6 on OS 10.5.8, and it happens
I took a class on Intelligent Decision Making (which was mostly an Problem Optimization
My problem is mostly like this: strange out of memory issue , and I
The problem of single dispatch is mostly familiar to people engaged in coding with
I have encountered a problem in my program that has me somewhat stumped. I
The problem is mostly OOP design problem. I have a class which handles the

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.