...I'm not, but your RSL stuff takes awhile, and
I'm niccin', so no choice bro!
----- Original Message -----
Sent: Thursday, February 09, 2006 4:07 PM
Subject: RE: [flexcoders] embed a movieclip
Um, so don't fall in love with any of this.
Just sayin'.
-rg
...whoa... so, if I have an MC inside of the
Flash 8 SWF, I can in fact run code through a Flash Player 8.5 SWF? Can
you post your example somewhere, this would be really valuable!
----- Original Message -----
Sent: Wednesday, February 08, 2006 4:42 PM
Subject: Re: [flexcoders] embed a movieclip
Yes, I was able to successfully call a setter property. I
put arbitrary code in the function and it worked out fine. The only
gotcha is that the getter/setter must be attached to a MovieClip instance
inside the SWF. So you have to associate a class with a library MC,
place it on the stage and give it an instance name. Then in the Flex
code:
var swf: MovieClip = MovieClip(myloader.content); var mc:
MovieClip = MovieClip(swf.getChildByName("myMC")); mc.myText =
"xxx"; //setter
I'm really hoping there's an easier
way....or this gets fixed in the next release.
On 2/8/06, JesterXL
<[EMAIL PROTECTED]>
wrote:
Have you successfully set a getter/setter
property?
-----
Original Message -----
Sent: Wednesday, February 08, 2006 3:08 PM
Subject: Re: [flexcoders] embed a movieclip
Ok, I found something interesting
about this. You can actually access properties in the loaded swf but
trying to call a function messes up. The function is actually there,
but it isn't recognized as a function. For example, my Flash8 swf has
a function named "callMe". I load this into my Flex2 app and then
trace " swf.callMe" and I actually get "[object Object]". But if try
to call it via swf.callMe(), I get a runtime error: Call attempted on an
object that is not a function.
Ironically, you can actually access
getter/setter functions. Since they're considered properties, I guess
they're good to go. It's a useable workaround at this point.
On 2/8/06, Jason Y.
Kwong <[EMAIL PROTECTED]> wrote:
I'm
actually trying to do something similar. What I've found so far
should be able to help you. You need to load the SWF via the Loader
component and then use its content property:
<mx:Loader
id="myloader" source=" SimpleSWF.swf"
complete="onComplete()"/>
private function onComplete():
void { var swf: MovieClip =
MovieClip(myloader.content);
swf.gotoAndPlay(...); }
My problem is that I can't access
additional methods/properties that are declared in the loaded swf.
I've seen a Flex 1.5 example where you can just go ahead and call those
methods on the MovieClip instance, but that doesn't seem to work in Flex
2. I've tried casting it to an Object to get around the compiler,
but I just end up with a runtime error.
On 2/8/06, nacho < [EMAIL PROTECTED]>
wrote:
what
I want to do is load a .SWF file and control the timeline of this
movieclip, with gotoAndPlay, etc... but i don't know how to load
it
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|