Solved

How to access/reference movieclip within flex application?

Posted on 2007-11-18
7
1,606 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 250 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 250 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

726 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