Solved

How to access/reference movieclip within flex application?

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
Flash movie or gif/animation? 3 910
Flex AS3 image Compression 2 739
Adobe flash player memory exhaustion 6 96
How do I have music file play continuously on a website? 6 104
This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

792 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