<!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=968293205-04092006><FONT face=Arial
color=#0000ff size=2>Tim.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=968293205-04092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=968293205-04092006><FONT face=Arial
color=#0000ff size=2>Emailed you directly already. Let me/ the list know if
you are still having issues.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=968293205-04092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=968293205-04092006><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>Tim
Keir<BR><B>Sent:</B> Monday, 4 September 2006 1:38 PM<BR><B>To:</B>
swfobject@lists.deconcept.com<BR><B>Subject:</B> Re: [SWFObject] SWFObject Vol
6 Issue 3 - ExternalInterface andLevels (ReDrUm)<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>That helped thanks, The targeting has been solved however I'm still
having trouble setting the contentPath initially from within my
function.</DIV>
<DIV> </DIV>
<DIV>I have a movieClip in my library called loaderIMG<BR>inside
loaderIMG i have an instance of the loader component from my library, given
the instance name imgContainer. This instance has been given a default
contentPath of "pics/default.jpg" then in my _root timeline i have this
function: </DIV>
<DIV><BR>function loadImages (imgPath)<BR>{<BR>createLoaderIMG(); //function
to add loaderIMG to the stage<BR>loaderIMG.imgContainer.contentPath =
imgPath;<BR>}<BR>loadImages("pics/photo1.jpg"); // Should change the
contentPath to that </DIV>
<DIV>
<P>so its adding the movieclip to the stage with the default contentPath as it
should,</P>
<P>but then its not changing it to the specified.<BR><BR>if i create a
button and set:</P>
<P>on (release) { loaderIMG.imgContainer.contentPath = "pics/photo1.jpg";
}<BR><BR>then it changes the contentPath but i want to be able to change it
initially when the function is called.</P>
<P>Any more help please?</P>
<P>Thanks alot,</P>
<P>Tim<BR></P></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Message: 3<BR>Date: Sun, 3 Sep 2006 19:38:25 +1000<BR>From: "Aran Rhee"
<<A onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:aran.rhee@qdc.net.au">aran.rhee@qdc.net.au</A>><BR>Subject:
Re: [SWFObject] ExternalInterface and Levels <BR>To: <<A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:swfobject@lists.deconcept.com">swfobject@lists.deconcept.com</A>><BR>Message-ID:
<000d01c6cf3c$bb78a070$0300a8c0@HYPERION><BR>Content-Type: text/plain;
charset="us-ascii" <BR><BR>Tim.<BR><SPAN></SPAN><BR>I think you are just
having a targeting issue since you components are<BR>inside a movieClip you
are attaching.<BR><BR>If you moviclip you are attaching is called "LoaderIMG",
then you need to <BR>set the path on the component INSIDE you MC. If your
movieClip loader<BR>component instance is called "loader", then you would set
its contenpath<BR>like:<BR><BR>LoaderIMG.loader.contentPath ="some.jpg"
<BR><BR><BR>again, with the FLV player: if "LoaderFLV" is your MC you are
attaching, and<BR>your flv playback component instance is called "playback",
set its content<BR>path like:<BR><BR>LoaderFLV.playback.contentPath =
"some.flv"<BR><BR><BR>Cheers,<BR>Aran<BR><BR><BR> _____<BR><BR>From: <A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:swfobject-bounces@lists.deconcept.com">swfobject-bounces@lists.deconcept.com
</A><BR>[mailto:<A onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:swfobject-bounces@lists.deconcept.com">swfobject-bounces@lists.deconcept.com</A>]
On Behalf Of ReDrUm<BR>Sent: Sunday, 3 September 2006 5:19 PM <BR>To: <A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:swfobject@lists.deconcept.com">swfobject@lists.deconcept.com</A><BR>Subject:
[SWFObject] ExternalInterface and Levels<BR><BR><BR>Hi Everyone,<BR><BR>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.<BR><BR>The First:<BR>To have an image loader using the Loader
Component in the hopes of changing <BR>the contentPath via
ExternalInterface<BR><BR>The Second:<BR>To have a flash video player using the
FLVPlayBack Component. Again changing<BR>the contentPath via
ExternalInterface<BR><BR>My Problem:<BR>I've added the two components to my
library, and created two movie clips, <BR>LoaderIMG, and LoaderFLV. Inside
each of these MCs is the appropriate<BR><SPAN></SPAN>component with a set
instance name. I only want one component on the screen<BR>at once. What i want
to achieve is the ability to change the content path of <BR>each component
externally using the ExternalInterface in Flash 8. Ignoring<BR>the fact that
my end goal is to use external interface, in the meantime I am<BR>currently
having trouble figuring out how to change the contentPath of the <BR>two
loaders. They each only load their origional contentPath values set in<BR>the
component instances in the Loader MC's I created. I've been<BR>experimenting
with _root, _parent, and _levels but I'm still not having much <BR>luck. If
any of you could suggest a fix or an alternative method I would<BR>much
appreciate it.<BR><BR>Thanks alot.<BR><BR>Actionscript below:<BR><BR>// This
is a gateway to JavaScript via the ExternalInterface (Do i need two <BR>- one
for each function to be called externally?)<BR>var ei1 =
flash.external.ExternalInterface.addCallback("loadImages",
null,<BR>loadImages);<BR>var ei2 =
flash.external.ExternalInterface.addCallback("loadVideos", null,
<BR>loadVideos);<BR><BR>// Temp for development (Its not loading these paths
currently which is what<BR>i want to fix)<BR>imgPath =
"pics/red.gif";<BR>vdoPath =
"media/test2.flv";<BR>trace(imgPath);<BR>trace(vdoPath);<BR><BR>// 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>}<BR><BR>// 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><SPAN></SPAN> loaderIMG._y = 0;<BR>}<BR><BR>// Function to set the
contentPath of the images and call createLoaderIMG <BR>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>}<BR><BR>// Function to set the contentPath of the videos and call
createLoaderFLV<BR>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>}<BR><BR>// Loads the Images or Videos
inside their loaders on the stage, start with
<BR>Images<BR>loadImages(imgPath);<BR>//loadVideos(vdoPath);<BR><BR><BR>Thanks
again to anyone who can
help,<BR><BR>Tim<BR> </DIV></BLOCKQUOTE></BODY></HTML>