Link to home
Start Free TrialLog in
Avatar of nautan
nautanFlag for United States of America

asked on

My swf works on local browser but not online

I have checked javascript paths, uploaded actionscript file, checked local site definition but cannot get my swf files to appear online, yet alone play. Yet they do so on local server. Attached code below:  Thank you for any help you can give me!

<script src="SpryAssets/xpath.js" type="text/javascript"></script>
<script src="SpryAssets/SpryData.js" type="text/javascript"></script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>

<script type="text/javascript">
<!--
var dsnavigationbar = new Spry.Data.XMLDataSet("navbar.xml", "navigation");
var dsnavapp = new Spry.Data.XMLDataSet("config2.xml", "config");
//-->

</script>
<script language="JavaScript">
<!--
function resizeChristmasMenu(h) { document.getElementById("ChristmasMenuBox").style.height = h+"px";}
// -->
</script>
</head>

<body class="twoColFixRtHdr">

<div id="container">
  <div id="header">
    <h1>&nbsp;</h1>
    <p>&nbsp;</p>
    <div spry:region="dsnavigationbar"></div>
    <p>&nbsp;</p>
    <p>
      <!-- end #header -->
    </p>
    <div id="ChristmasMenuBox" style="position:absolute; height:40px; z-index:4; overflow:hidden; left: 111px; top: 186px;">
      <script type="text/javascript">
AC_FL_RunContent( 'id','Christmas_Flash_Menu','name','Christmas_Flash_Menu','codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','800','height','400','src','ChristmasMenu','quality','high','scale','noscale','salign','lt','wmode','transparent','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','flashvars','configSource=config2.xml','movie','ChristmasMenu' ); //end AC code
</script><noscript><object id="Christmas_Flash_Menu" name="Christmas_Flash_Menu" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="800" height="400">
        <param name="movie" value="ChristmasMenu.swf" />
        <param name="quality" value="high" />
        <param name="wmode" value="transparent" />
        <param name="scale" value="noscale" />
        <param name="salign" value="lt" />
        <param name="flashvars" value="configSource=config2.xml" />
        <embed name="Christmas_Flash_Menu" src="ChristmasMenu.swf" quality="high" scale="noscale" salign="lt" wmode="transparent" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" flashvars="configSource=config2.xml" width="800" height="400"></embed>
      </object></noscript>
Avatar of agengler11
agengler11
Flag of United States of America image

Is ChristmasMenu.swf in the root directory and is its name case sensitive? (Linux)
Avatar of nautan

ASKER

ChristmasMenu.swf is in the root directory. I am not sure if it is case sensitive - but have checked the code and it is always referred to as capitalized C and M in ChristmasMenu.swf. I do not see a discrepancy anywhere in regards to upper and lowercase.
I see you are using SPRY javascript links.  You can bet 99% certain the problem will be in the SPRY code -- SPRY is one of the most incompatible code sets ever produced, even for other Adobe things like flash.
Avatar of nautan

ASKER

I imported the xml data as spry data sets. Is there another way to incorporate that xml data without using spry? Thanks so much for your thoughts on this - I have spent weeks trying to figure it out without any progress.
Avatar of Jason C. Levine
>> SPRY is one of the most incompatible code sets ever produced, even for other Adobe
>> things like flash.

Spry and Flash have nothing to do with one another and can exist side by side.  That is not the problem.

>>but cannot get my swf files to appear online, yet alone play

Can you give us a live link to test?  Your code is okay, so it has to be something else that will be revealed from looking at a live page.
Avatar of nautan

ASKER

Yes, thank you! The page is up at www.rpmnauticalbeta.org. It is a rough prototype of the page, I am just trying to get the navigation bar to work correctly before I design further. Again thank you so much for your help on this!
Avatar of nautan

ASKER

In previous versions I had created a spry region and then inserted the swf into the spry region. In this version (that you will currently see at www.rpmnauticalbeta.org) I simply inserted the swf into the div below the header. I am not sure whether I must create a spry region first in order to insert the swf? In trying to research this issue I also came across the point that if you have an invalid div into which the swf is inserted then it also would not work. So I am not sure how you can tell if your div is invalid...not sure if any of this applies - I am still learning my way around Dreamweaver CS3! :<)
ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nautan

ASKER

WOW! Can it really be that simple??? It seems it is! I have the menu bar up and working! THANK YOU so MUCH!!! Do you mind if I ask one last question? Do you know how I center it, or anchor it within the maincontent section of the page?? Or should I open another thread to ask that question?
Hi nautan,
yes, you can pull your hair out over something that simple. I often throw or punch a soft pillow.
Anyhoo:

To center the nav:

add position: relative to .twoColFixRtHdr #header

change left: 98px  to left: 0 on ChristmasMenuBox (this is an INLINE style I'm not sure if it's being generated by a script, but you have to change it inline or eliminate the inline styles and transfer them to your style sheet.
>> WOW! Can it really be that simple?

Yep.  If it works locally and not remotely, it is almost always a missing file or a bad path.  It certainly wasn't Spry :)

>> Or should I open another thread to ask that question?

Probably.  It helps to keep the database clean as people searching in the future will search by the title of the thread and discussion about a HTML/CSS issue is tangential at best. But laughhearty is on the right track.  

I would take a different approach and get the christmas div out of the header div (promote it to the same level as the other divs and allow for floats and clears to work their magic.  All you need after that is a width and margin: auto to center.
Avatar of nautan

ASKER

Thank you so much - I greatly appreciate your assistance!!