[SWFObject] Replacements for ../ and BASE attribute?

Dan Bohea dan at timetravelmedia.com
Tue May 16 08:49:46 PDT 2006


Ok.  I can't get the base param to work at all. Leaves me with 2 options:

 

1)     Move all html pages to the same level as the swf file (scrappy and
not ideal).

2)     Change my swf file's getURL calls to absolute links rather than
relative links (makes local testing a bit more of a pain).

 

I opted for option 2 in the end in order to keep my site files a bit more
organised.

 

If anybody figures out how to get the base parameter working, be sure to get
in touch.

 

Cheers,

 

Dan.

 

 

-------------------------------------

Dan Bohea

-------------------------------------

Time Travel Media - Multimedia Design

-------------------------------------

 <http://www.timetravelmedia.com/> www.timetravelmedia.com

-------------------------------------

  _____  

From: swfobject-bounces at lists.deconcept.com
[mailto:swfobject-bounces at lists.deconcept.com] On Behalf Of Geoff Stearns
Sent: 15 May 2006 23:52
To: swfobject at lists.deconcept.com
Subject: Re: [SWFObject] Replacements for ../ and BASE attribute?

 

hmm, well i have to admit i've never had to use the base parameter, but i
always thought that it only affected loading files *into* your swf, not when
using getURL.

 

you could fix your problem by changing your getURL calls to be relative to
your root, though.

 

isntead of getURL("contact.html"); do getURL("/contact.html");

 

then it doesn't matter what directory it's in.

 

 

On May 15, 2006, at 6:48 PM, Dan Bohea wrote:





Ok.  Thanks.  That's fixed Problem 1.

 

I still can't get the base script to work though.  Tests reveal that when I
try navigating via the swf file (from a buried page) I just get an error
page saying that the page doesn't exist, quoting a url that sure enough
doesn't exist (as though the base script isn't being recognised).   

 

I was using a base of "." before I tried swfObject (this seemed to work
fine).  I've also now tried "/" and "mywebsite's url.com/" - still the same
problem.

 

Here's a link to a page displaying this exact symptom:

 

http://www.timetravelmedia.com/case_studies/cdrom/bc400_album.html

 

Try clicking on the briefcase icon in the swf file at the very top of the
page.  It should browse to http://www.timetravelmedia.com/portfolio.html but
instead it tries to browse to
http://www.timetravelmedia.com/case_studies/cdrom/portfolio.html (which
doesn't exist).

 

The script for the swfObject starts on line 28.

 

 

Any ideas folks?

 

 

Thank you sooo much for your help so far and speedy quick replies.

 

 

Dan.

 

 

-------------------------------------

Dan Bohea

-------------------------------------

Time Travel Media - Multimedia Design

-------------------------------------

 <http://www.timetravelmedia.com/> www.timetravelmedia.com

-------------------------------------

  _____  

From: swfobject-bounces at lists.deconcept.com
[mailto:swfobject-bounces at lists.deconcept.com] On Behalf Of Geoff Stearns
Sent: 15 May 2006 23:06
To: swfobject at lists.deconcept.com
Subject: Re: [SWFObject] Replacements for ../ and BASE attribute?

 

for #1, it should work just fine, it's probably just a path issue.

 

you said that your swf is 2 folders down from your html page, but you only
have one ../ there.

 

maybe try ../../flash_file.swf ?

 

for #2, you can use all of the same parameters that you normally would use,
so if you want to use the base parameter, you can use it like this:

 

so.addParam("base", "/");

 

(or whatever base path you need instead of the '/')

 

 

 

 

On May 15, 2006, at 5:56 PM, Dan Bohea wrote:






Hi List.  Thank you so much for all your hard work.  You're saving my ass.

 

I'm fairly new to a lot of this kind of stuff so be gentle..

 

I have the swfObject working on a basic level but cannot figure out how to
get round the following 2 problems:

 

Problem 1:

 

Some of my html pages are in a folder, 2 directories down from the swf file
to be embedded.  Normally I would just insert the swf file location as
"../flash_file.swf" as opposed to just "flash_file.swf".  This doesn't seem
to work using swfObject.  For example, the following script doesn't load my
swf at all:

 

var so = new SWFObject("../flash_file.swf", "mymovie", "200", "100", "7",
"#336699");
so.write("flashcontent");
 

This problem also seems to stop swf files from being displayed when I
publish from a Template in Dreamweaver.  This isn't the end of the world,
but sometimes I'd like to see how the swf sits in the page, even if it is
only a Template.

 

 

 

Problem 2:

 

Simliar to problem 1.  I have pages in folders that are 2 directories down
from the swf file to be embedded.  This swf file acts as a navigaion bar for
the website.  In order for the nav to work once it's loaded in to one of the
'buried in folders' pages, I normally have to use the BASE attribute when
the swf is inserted.  I got this tip from here: 

 

http://www.adobe.com/cfusion/knowledgebase/index.cfm?event=view
<http://www.adobe.com/cfusion/knowledgebase/index.cfm?event=view&id=KC.tn_04
157&extid=tn_04157&dialogID=29269559&iterationID=1&sessionID=9630dc11c536616
17c69&stateID=0+0+29277289&mode=simple>
&id=KC.tn_04157&extid=tn_04157&dialogID=29269559&iterationID=1&sessionID=963
0dc11c53661617c69&stateID=0+0+29277289&mode=simple

 

 

Any ideas?

 

 

Regards,

 

 

Dan.

 

 

_______________________________________________

SWFObject mailing list

SWFObject at lists.deconcept.com

http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com

 

_______________________________________________

SWFObject mailing list

SWFObject at lists.deconcept.com

http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deconcept.com/pipermail/swfobject-deconcept.com/attachments/20060516/f67fc158/attachment-0005.htm>


More information about the Swfobject mailing list