You can set variables or call functions on SWF's that have been loaded
through the Loader class.
<mx:Script>
<![CDATA[
function setVars( event ) {
event.target.content.xmlFile = "cover.xml";
event.target.content.progressColor = "0xCCCCCC";
}
]]>
</mx:Script>
<mx:Loader id="slideshow" source="slideshow.swf" complete="setVars(
event )"/>
The question is will these variables be set before the first frame is
called on the SWF. If not try progress instead of complete event.
Renaun
--- In [email protected], Steve Ocean <[EMAIL PROTECTED]>
wrote:
> I have a slideshow generator that does a great job of one task,
showing a
> particular format of a slideshow. I want to embed this slideshow in
a Flex
> app. I have looked through the docs and forums and have found
similar
> questions, but none with exactly the same problem, and I confess I
can't
> figure out how best to do this.
>
> How, should I put one of these slideshows, or any swf for that
matter, in a
> contanier, say a viewstack, and pass it the parameters it needs to
function?
> I need to assume that I cannot change the code of the swf I am
embedding,
> nor do I have access to the FLA.
>
> Here's the HTML that the slideshow uses to initiate the show and
instruct
> the swf "player" about where to get files etc:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
> <title>Untitled Document</title>
> </head>
>
> <body>
> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="
>
http://download.macromedia.com/pub/shockwave/cabs/
flash/swflash.cab#version=7,0,0,0"
> width="675" height="450" id="cover" align="middle">
> <param name="FlashVars"
value="xmlFile=cover.xml&progressColor=0xCCCCCC" />
> <param name="movie" value="slideshow.swf" />
> <param name="quality" value="best" />
> <param name="scale" value="scale" />
> <param name="bgcolor" value="#000000" />
> <embed src="slideshow.swf" id="cover" quality="best"
flashvars="xmlFile=
> cover.xml&progressColor=0xCCCCCC" scale="noscale" bgcolor="#000000"
> type="application/x-shockwave-flash" width="675" height="450"
pluginspage="
> http://www.macromedia.com/go/getflashplayer" />
> </object>
> </body>
> </html>
>
>
> Here's the XML in cover.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <slideshow effecttime="6" transtime="2" music="08 Dreams of
Eternity.mp3"
> volume="30" repeat="true" streaming="true">
> <slide filename="1 Ext Sunset Best.jpg" />
> <slide filename="10 Patio to Dia Head.jpg" />
> <slide filename="10.jpg" />
> <slide filename="Sunset Liv Rm 010.jpg" />
> </slideshow>
>
> many thanks
------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/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/