Accessing a SWF from HTML in a different folder

This is a discussion on Accessing a SWF from HTML in a different folder within the Macromedia Flash forums in Adobe Tools category; Hi all, How can modify my HTML file so that it can access the SWF file that exists in the parent folder? For example, for the following file, I want it to display the file "..\topbar.swf" Code: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-6" /> <title>topbar</title> <script language="javascript">AC_FL_RunContent = 0;</script> <script src="AC_RunActiveContent.js" language="javascript"></script> </head> <body bgcolor="#ffffff"> <!--url's used in the movie--> <!--text used in the movie--> <!-- saved from url=(0013)about :internet --> <script language="javascript"> if (AC_FL_RunContent == 0) { alert("This page requires AC_RunActiveContent.js."); } else { AC_FL_RunContent( 'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0 ,0,0', 'width', '800', 'height', '60', 'src', 'topbar', 'quality', 'high', ...

Go Back   Application Development Forum > Adobe Tools > Macromedia Flash

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 11-04-2008, 04:32 PM
ahmedb72
Guest
 
Default Accessing a SWF from HTML in a different folder

Hi all,

How can modify my HTML file so that it can access the SWF file that exists in
the parent folder?

For example, for the following file, I want it to display the file
"..\topbar.swf"

Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-6" />
<title>topbar</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent(
'codebase',
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0
,0,0',
'width', '800',
'height', '60',
'src', 'topbar',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'topbar',
'bgcolor', '#ffffff',
'name', 'topbar',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'topbar',
'salign', ''
); //end AC code
}
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
rsion=9,0,0,0" width="800" height="60" id="topbar" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="topbar.swf" /><param name="quality" value="high"
/><param name="bgcolor" value="#ffffff" /> <embed src="topbar.swf"
quality="high" bgcolor="#ffffff" width="800" height="60" name="topbar"
align="middle" allowScriptAccess="sameDomain" allowFullScreen="false"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
</body>
</html>
When I modified the HTML file to the following,it didn't work:

Code:
<param name="movie" value="../topbar.swf" />
<embed src="../topbar.swf"


Reply With Quote
  #2  
Old 11-06-2008, 08:41 AM
rritchey
Guest
 
Default Re: Accessing a SWF from HTML in a different folder

Your edited code is partially correct. It will work if you turn javascript
off. I edited the entire code block, and put some space around the two lines
you missed. These lines are for the AC_RunActiveContent to use to embed the
SWF. The lines you embedded are part of the noscript block, which embeds the
SWF when the user doesn't have javascript turned on.

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-6" />
<title>topbar</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent(
'codebase',
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0
,0,0',
'width', '800',
'height', '60',


'src', '../topbar',


'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'topbar',
'bgcolor', '#ffffff',
'name', 'topbar',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',


'movie', '../topbar',


'salign', ''
); //end AC code
}
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
rsion=9,0,0,0" width="800" height="60" id="topbar" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="../topbar.swf" /><param name="quality" value="high"
/><param name="bgcolor" value="#ffffff" />
<embed src="../topbar.swf" quality="high" bgcolor="#ffffff" width="800"
height="60" name="topbar" align="middle" allowScriptAccess="sameDomain"
allowFullScreen="false" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
</body>
</html>

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 12:05 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.