Hi,
There is an example on my site with a Flash 9 SWF.
http://www.bridel.org/
 
Hilary
 
--

 
On 7/12/06, flexnewbie06 <[EMAIL PROTECTED]> wrote:
I am trying to cast swf as MovieClip in Flex 2.0.  The SWF was
created with Flash 8...I get an coercion error...is this something
that can not be done or maybe I am doing it incorrectly.

I have posted the error and my code.  Any Suggestions?



TypeError: Error #1034: Type Coercion failed: cannot convert
flash.display::[EMAIL PROTECTED] to flash.display.MovieClip.
       at EPlayer/::test()
       at EPlayer/___Button1_click()


CODE:


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
       <![CDATA[
       import mx.core.FlexMovieClip;
       import mx.controls.SWFLoader ;

               function test():void{
               var myMovieClip:MovieClip = MovieClip(mySWF.content);
               myMovieClip.gotoAndPlay(1);
               }
       ]]>
</mx:Script>

<mx:Panel height="406" width="525"
paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10"
y="10" x="10">

<mx:SWFLoader id="mySWF" source="RFP intro.swf" height="338"
width="459"/>

</mx:Panel>

<mx:Button label="test" x="300" y="424" click="test();"/>
</mx:Application>






------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links

<*> To visit your group on the web, go to:
   http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
   http://docs.yahoo.com/info/terms/






--
Hilary

-- __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





YAHOO! GROUPS LINKS




__,_._,___

Reply via email to