Solved

My swf works on local browser but not online

Posted on 2010-11-26
12
411 Views
Last Modified: 2012-05-10
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>
0
Comment
Question by:nautan
12 Comments
 
LVL 2

Expert Comment

by:agengler11
ID: 34219628
Is ChristmasMenu.swf in the root directory and is its name case sensitive? (Linux)
0
 

Author Comment

by:nautan
ID: 34219850
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.
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 34220359
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.
0
 

Author Comment

by:nautan
ID: 34220430
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.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 34220866
>> 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.
0
 

Author Comment

by:nautan
ID: 34222028
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!
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:nautan
ID: 34222037
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! :<)
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 34222803
Hi nautan,

According to Firebug, the Flash file is being generated but an image is missing when Flash tries to load:

http://www.rpmnauticalbeta.org/photos/photo01.png

Can you load that file to the server and re-test?
0
 

Author Comment

by:nautan
ID: 34223179
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?
0
 
LVL 7

Expert Comment

by:Alicia St Rose
ID: 34223229
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.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 34223258
>> 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.
0
 

Author Comment

by:nautan
ID: 34223372
Thank you so much - I greatly appreciate your assistance!!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now