Solved

How to access/reference movieclip within flex application?

Posted on 2007-11-18
7
1,595 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
  • 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now