<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial
color=#0000ff size=2>Tim.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial
color=#0000ff size=2>I think you are just having a targeting issue since you
components are inside a movieClip you are attaching.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial><FONT
color=#0000ff size=2>If you moviclip you are attaching is called "LoaderIMG",
then you need to set the path on the component INSIDE you MC. If your movieClip
loader component instance is called "loader", then you would set its contenpath
like:</FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial
color=#0000ff size=2>LoaderIMG.loader.contentPath
="some.jpg"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial><FONT
color=#0000ff size=2>again, with the FLV player: if "LoaderFLV" is your MC you
are attaching, and your flv playback component instance is called "playback",
set its content path like:</FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial
color=#0000ff size=2>LoaderFLV.playback.contentPath =
"some.flv"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial
color=#0000ff size=2>Cheers,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=437023009-03092006><FONT face=Arial
color=#0000ff size=2>Aran</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> swfobject-bounces@lists.deconcept.com
[mailto:swfobject-bounces@lists.deconcept.com] <B>On Behalf Of
</B>ReDrUm<BR><B>Sent:</B> Sunday, 3 September 2006 5:19 PM<BR><B>To:</B>
swfobject@lists.deconcept.com<BR><B>Subject:</B> [SWFObject] ExternalInterface
and Levels<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>Hi Everyone,</DIV>
<DIV> </DIV>
<DIV>This isnt a swfObject specific question so i apologise for that fact
but...<BR><BR>I'm trying to build an a flash container swf to
perform 2 functions.</DIV>
<DIV> </DIV>
<DIV>The First:</DIV>
<DIV>To have an image loader using the Loader Component in the hopes of
changing the contentPath via ExternalInterface</DIV>
<DIV> </DIV>
<DIV>The Second:</DIV>
<DIV>To have a flash video player using the FLVPlayBack Component. Again
changing the contentPath via ExternalInterface</DIV>
<DIV> </DIV>
<DIV>My Problem:</DIV>
<DIV>I've added the two components to my library, and created two movie clips,
LoaderIMG, and LoaderFLV. Inside each of these MCs is the appropriate
component with a set instance name. I only want one component on the screen at
once. What i want to achieve is the ability to change the content path of each
component externally using the ExternalInterface in Flash 8. Ignoring the fact
that my end goal is to use external interface, in the meantime I am
currently having trouble figuring out how to change the
contentPath of the two loaders. They each only load their origional
contentPath values set in the component instances in the Loader MC's I
created. I've been experimenting with _root, _parent, and _levels
but I'm still not having much luck. If any of you could suggest a
fix or an alternative method I would much appreciate it. </DIV>
<DIV> </DIV>
<DIV>Thanks alot.</DIV>
<DIV> </DIV>
<DIV>Actionscript below:</DIV>
<DIV> </DIV>
<DIV>// This is a gateway to JavaScript via the ExternalInterface (Do i need
two - one for each function to be called externally?)<BR>var ei1 =
flash.external.ExternalInterface.addCallback("loadImages", null, loadImages);
<BR>var ei2 = flash.external.ExternalInterface.addCallback("loadVideos", null,
loadVideos);</DIV>
<DIV>
<P>// Temp for development (Its not loading these paths currently which is
what i want to fix)<BR>imgPath = "pics/red.gif";<BR>vdoPath =
"media/test2.flv";<BR>trace(imgPath);<BR>trace(vdoPath);</P>
<P>// Function to add the FLVplayer MC to the stage when called
upon<BR>function createLoaderFLV ()<BR>{<BR> // Call our component from
the library<BR> attachMovie("loaderFLV", "loaderFLV", 1);<BR> // Set
its X and Y co-ordinates <BR> loaderFLV._x = 0;<BR> loaderFLV._y =
0;<BR>}</P>
<P>// Function to add our imgLoader MC to the stage when called
upon<BR>function createLoaderIMG ()<BR>{<BR> // Call our component from
the library<BR> attachMovie("loaderIMG", "loaderIMG", 2);<BR> // Set
its X and Y co-ordinates <BR> loaderIMG._x = 0;<BR> loaderIMG._y =
0;<BR>}</P>
<P>// Function to set the contentPath of the images and call createLoaderIMG
function to the stage<BR>function loadImages (imgPath)<BR>{<BR> // Remove
the loaders from the
stage<BR> loaderFLV.removeMovieClip();<BR> loaderIMG.removeMovieClip
();<BR> // Creates instances of the loaders on the
stage<BR> createLoaderIMG();<BR> // Sets the contentPath to that
specified externally via php<BR> imgContainer.contentPath =
imgPath;<BR>}</P>
<P>// Function to set the contentPath of the videos and call createLoaderFLV
function to the stage<BR>function loadVideos (vdoPath)<BR>{<BR> // Remove
the loaders from the
stage<BR> loaderIMG.removeMovieClip();<BR> loaderFLV.removeMovieClip
();<BR> // Creates instances of the loaders on the
stage<BR> createLoaderFLV();<BR> // Sets the contentPath to that
specified externally via php<BR> vdoContainer.contentPath =
vdoPath;<BR> // Plays the file once
loaded<BR> vdoContainer.play();<BR>}</P>
<P>// Loads the Images or Videos inside their loaders on the stage, start with
Images<BR>loadImages(imgPath);<BR>//loadVideos(vdoPath);</P></DIV>
<DIV> </DIV>
<DIV>Thanks again to anyone who can help,</DIV>
<DIV><BR>Tim</DIV></BLOCKQUOTE></BODY></HTML>