?
Solved

How to access/reference movieclip within flex application?

Posted on 2007-11-18
7
Medium Priority
?
1,615 Views
Last Modified: 2012-06-22
Hello experts!

I have a custom flash menu I have built using flash cs3.
It is basically a bunch of animated movieclips (onRollOver).

I am loading this Flash SWF through the use of a SWF loader in my Flex app.

How do I access the content of the flash swf??
I want to code something like (I know this is as2 but it's just easier to give the example):

flashswf.movieclip1.onRelease = function() {
     change state of main flex app to 'state1'
}

Do I have to code this in the flash swf? or can I use the flex swf to do so?

thanks!
0
Comment
Question by:bensarz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 23

Accepted Solution

by:
Siva Prasanna Kumar earned 1000 total points
ID: 20309852
According to me your Flash file must have all the required functionality as such it works when you its complete. But As per the documentation I suppose it says that these events will trigger on the Flash loaded. The whole SWF file is loaded is considered as a single component.

http://livedocs.adobe.com/flex/2/langref/flash/display/Loader.html 
0
 
LVL 23

Expert Comment

by:Siva Prasanna Kumar
ID: 20309862
I am not sure where you searching for this ? "Accessing SWFs from Flex and Vice-Versa"

http://weblogs.macromedia.com/pent/archives/2004/12/accessing_swfs.cfm
0
 
LVL 19

Assisted Solution

by:Gary Benade
Gary Benade earned 1000 total points
ID: 20310328
You have access to the loaded movies root through the content property, as long as the flash movie is actionscript 3 you can manipulate it directly eg. swfLoader.content.addEventListener( "yourFlashEvent", yourHandler);
swfLoader.content.someFunction();
swfLoader.content.someVariable = 3;
0
 
LVL 19

Expert Comment

by:Gary Benade
ID: 20329515
Did you get it to work?
0
 
LVL 19

Expert Comment

by:Gary Benade
ID: 22537975
Need more help with this?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
Suggested Courses
Course of the Month15 days, 14 hours left to enroll

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question