Called movies won't play with swfobject 2.0

15 views
Skip to first unread message

ladynred

unread,
May 13, 2008, 3:54:46 PM5/13/08
to SWFObject
Let me explain that.
I have a main movie file called 'introMain' that contains a graphic
frame, a narrative soundtrack plus actionscript that loads in the 3
sections of the whole project using loadMovie. The intro.swf works
fine if I play it by itself, it loads each of the 3 sections in
succession and in synch with the narrative soundtrack. However, when I
put the intro.swf into the HTML file using the dynamic method, all you
get is the frame with the soundtrack playing, the 3 movies that should
be loading are not playing at all.

Now, this whole thing was originally done almost 4 years ago with a
much older version of swfObject - now updated to 2.0. In the original
setup, the introMain.swf, the 3 loaded swf files and the swfObject. js
file were all in the root directory of the web site and everything
plays fine. We are now re-designing and reorganizing the site and all
the flash files and swfobject files were moved into a Flash
subdirectory, 1 level below the html file. The paths appear correct, I
can't find a reason as to why the 3 called movies won't load and play.
There are no hard paths coded into the actionscript loadMovie function
either.

IF I move all the swf files and the swfobject.js file back into the
root folder with the html page it's embedded into, change the html
paths back, the intro works perfectly as before. So, while I've
checked and re-checked all the paths in the html file and the main
intro flash file and can't find anything wrong, it seems to be a path
problem when mixed with swfobject 2.0.

To add to the mix, on the home page, I have a small rotating flash
photo banner. It too is embedded with swfobject 2.0 using the dynamic
method, and the photobanner.swf is also located in the Flash sub-
directory - it won't play either, and it's not loading any additional
movies into itself. If I move photobanner.swf back into the root
directory, it plays.

Can anyone shed any light on this ? Is there a reason why it only
works if the flash files are in the same location as the html files ??
Have I missed something ? All of these files are in a single domain,
so it's not running into that issue.

Thanks in advance !


Aran Rhee

unread,
May 13, 2008, 9:14:53 PM5/13/08
to swfo...@googlegroups.com
If you post a link to your page, we can see what might be going wrong.

Aran

ladynred

unread,
May 14, 2008, 5:31:51 PM5/14/08
to SWFObject
I wish I could, it's still under development and only available on our
internal servers.

Here's the code though for the 3-part intro movie:

<script type="text/javascript" src="flash/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
var params = {};
params.quality = "high";
params.scale = "exactfit";
params.wmode = "transparent";
params.allowfullscreen = "false";
params.allowscriptaccess = "sameDomain";
var attributes = {};
/*attributes.id = "logoani";
attributes.align = "top";*/
swfobject.embedSWF("flash/recruitingintro_main2.swf",
"flashIntroContent", "600", "300", "7.0.0", false, flashvars, params,
attributes);
</script>

<body>
<div id="flashIntroContent">
<p>This Flash movie requires a newer version of the Flash plugin.
<br />Please <a href="http://www.adobe.com/shockwave/download/
download.cgi?P1_Prod_Version=ShockwaveFlash&promoid=BIOW">click here</
a> to obtain an upgrade.</p></div>

</div>

</body>

And for the real simple flash banner that is not loading any
additional swf's:

<script type="text/javascript" src="flash/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
var params = {};
params.quality = "high";
params.scale = "exactfit";
params.wmode = "transparent";
params.allowfullscreen = "false";
params.allowscriptaccess = "sameDomain";
var attributes = {};
attributes.id = "bannerShow";
/*attributes.align = "center";*/
swfobject.embedSWF("photobanner.swf", "flashcontent", "445", "85",
"8.0.0", false, flashvars, params, attributes);
</script>

<div id="photos">
<div id="photosLeft">
<div class="banner"><!-- rotating banner area -->
<div id="flashcontent"></div>
</div> <!-- end rotating banner photo -->
</div></div>

The css for the 'flashcontent' div has only some margin/padding
settings on it.

Hope that'll help.
Thanks !

Aran Rhee

unread,
May 15, 2008, 12:26:21 AM5/15/08
to swfo...@googlegroups.com
I'd say you have a pathing issue with where the parent swf file is in
regards to the files you are loading. Are you loading the children swfs with
an absolute or relative path?

Try specifying the child loading locations as an absolute path to ensure you
are loading the files from where you think you are. Also, are all your swfs
on exactly the same domain?

ladynred

unread,
May 15, 2008, 1:54:32 PM5/15/08
to SWFObject
The child files are in the same folder as the 'parent' SWF file. In
the actionscript, just the names of the child movies are referenced,
so it's set up so that the parent and the child files are to be in the
same directory. All files are on the same domain. The loadMovie intro
works just fine when played as a standalone, it's when it gets
embedded that it stops working.

The fact that the other SWF file, the photobanner, won't play if it's
not in the same directory as the page it's being displayed in via
swfobject makes it appear that it's swfobject that's the problem but I
can't figure out what it is.

Thanks !

Sam Sherlock

unread,
May 15, 2008, 2:42:39 PM5/15/08
to swfo...@googlegroups.com
The child files are in the same folder as the 'parent' SWF file. ...
 
would adding a param.base = './';

I use firebug to determine the location of the file being loaded

- S

2008/5/15 ladynred <ladyn...@gmail.com>:

ladynred

unread,
May 20, 2008, 10:58:27 AM5/20/08
to SWFObject
Well, I'll give that a try :) I have Firebug.

On May 15, 1:42 pm, "Sam Sherlock" <sam.sherl...@gmail.com> wrote:
> > The child files are in the same folder as the 'parent' SWF file. ...
>
> would adding a param.base = './';
>
> I use firebug to determine the location of the file being loaded
>
> - S
>
> 2008/5/15 ladynred <ladynre...@gmail.com>:

ccrider

unread,
Jun 19, 2008, 12:17:13 PM6/19/08
to SWFObject
I am having this same problem.
Seems like your answer solved the other guy's problem, so I'm hoping
it will fix mine.

Where do I add param.base = './' ?

Thanks,
Nate

On May 15, 2:42 pm, "Sam Sherlock" <sam.sherl...@gmail.com> wrote:
> > The child files are in the same folder as the 'parent' SWF file. ...
>
> would adding a param.base = './';
>
> I use firebug to determine the location of the file being loaded
>
> - S
>
> 2008/5/15 ladynred <ladynre...@gmail.com>:

Sam Sherlock

unread,
Jun 19, 2008, 3:38:43 PM6/19/08
to swfo...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages