We moved an old site to a new server for hosting purposes before we build a new site.
Once moved the site now loads at the bottom of the page. I've tried all sorts of adjustments to the javascript and html but I'm at a loss to what is causing it to load at the bottom. Any help in identifying the problem would be greatly appreciated...
Current site location:
http://eversighthosting.info/artstow/Artspg1.htm
The page code:
<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=5,0,0,0',
'width', '100%',
'height', '100%',
'src', 'Arts',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'Arts',
'bgcolor', '#ffffff',
'name', 'Arts',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'Arts',
'salign', ''
); //end AC code
}
</script><embed src="Artspg1_files/Arts.swf" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer" play="true"
loop="true" scale="showall" wmode="window" devicefont="false" bgcolor="#ffffff"
name="Arts" menu="true" allowfullscreen="false" allowscriptaccess="sameDomain"
salign="" type="application/x-shockwave-flash" align="middle" height="100%"
width="100%">
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash
swflash.cab#version=5,0,0,0" width="100%" height="100%" id="Arts"
align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="Arts.swf" /><param name="quality"
value="high" /><param name="bgcolor" value="#ffffff" /> <embed
src="Arts.swf" quality="high" bgcolor="#ffffff" width="100%"
height="100%" name="Arts" align="middle"
allowScriptAccess="sameDomain" allowFullScreen="false"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
The direct reason, though I can't go so far as to explain why this is, is that Arts.swf appears twice in the page. The higher, blank version appears to originate from the <noscript> tag, although I don't really have an idea of why that's being loaded instead of ignored on a JS-capable browser. I would be pretty surprised if any browsers running without JavaScript have flash loaded, so I would just take that content out and replace it with a warning that says "You need Flash to view this site"
Related
Am working on a flash slider.I have 2 images embeded in it.. is it possible to click on the images and load a new html page?Here is my code:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="308" height="118" title="location">
<param name="movie" value="<?=base_url()?>flash/home/locationsliders.swf">
<param name="quality" value="high">
<embed src="<?=base_url()?>flash/home/locationsliders.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="308" height="118" ></embed>
</object>
<script type="text/javascript">
AC_FL_RunContent('codebase',
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','308','height',
'118','title','location','src',
'<=base_url()>flash/home/locationsliders',
'quality','high','pluginspage',
'http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash',
'movie','<?=base_url()?>flash/home/locationsliders' ); //end AC code
</script>
I was trying to use the onStateChange property of Youtube videos, And I could not get it to work. I searched a lot over it but could not really understand how it works. Here is the code which I tried, I added a console.log, which does not get called. Can someone help me?
This is my code:
<script type="text/javascript">
function onYouTubePlayerReady(playerId) {
var player = document.getElementById("YTplayer");
player.addEventListener("onStateChange", "onplayerStateChange");
}
function onplayerStateChange(newState) {
console.log('test');
}
</script>
<object style="height: 390px; width: 640px">
<param name="movie" value="http://www.youtube.com/v/u1zgFlCw8Aw?version=3">
<param name="allowFullScreen" value="true">
<param name="allowScriptAccess" value="always">
<embed
src="http://www.youtube.com/v/u1zgFlCw8Aw?version=3"
type="application/x-shockwave-flash"
allowfullscreen="true"
allowScriptAccess="always"
width="640" height="390"
id="YTplayer">
</object>
You must define the id in playerapiid pramameter or use the given one in the onYouTubePlayerReady callback
<object style="height: 390px; width: 640px">
<param name="movie" value="http://www.youtube.com/v/u1zgFlCw8Aw?version=3&playerapiid=YTplayer">
<param name="allowFullScreen" value="true">
<param name="allowScriptAccess" value="always">
<embed
src="http://www.youtube.com/v/u1zgFlCw8Aw?version=3&playerapiid=YTplayer"
type="application/x-shockwave-flash"
allowfullscreen="true"
allowScriptAccess="always"
width="640" height="390"
id="YTplayer" />
</object>
I am trying to call a Jscript function from a flash object. I want the function to be called when the animation ends.
Here is the embed code
<h1 align="center">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="360" HEIGHT="250" id="Yourfilename" ALIGN="center">
<PARAM NAME=movie VALUE="newbanner.swf">
<PARAM NAME=quality VALUE=high/><param name="LOOP" value="false" />
<param name="allowscriptaccess" value="always" />
<param name="wmode" value="transparent">
<param name="bgcolor" value="#FFFFFF">
<EMBED src="newbanner.swf" quality="high" bgcolor="#FFFFFF"
WIDTH="360" HEIGHT="250" loop="false" NAME="newbanner.swf" ALIGN=""
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>
</h1>
here is the jScript function i want to call:
<script language="javascript">
function mainFunction() {
var mydiv = document.getElementById('content');
mydiv.innerHTML = "hello";
}
</script>
here is the action code I add to the last frame of the flash object
URLLoader("javascript:mainFunction();");
The object loads but the function is not called. I can call the function other ways such as using an "onclick = mainFunction()" event on a button for example. Where am i going wrong?
thanks in advance.
Why don't you use flash.external.ExternalInterface.call ?
How can I make JavaScript loop left all <object> elements and hide them?
var objects = document.getElementsByTagName('object');
for (var i=0, n=objects.length;i<n;i++) objects[i].style.display='none';
Update. Playing with something I had thought about before. It works in Fx with object, but although I could make it work in IE with divs, I could not make it work in IE - not even with classnames on the object.
<html>
<head>
<title></title>
<style type="text/css">
object {
display:block;
}
</style>
<script type="text/javascript">
// got some of this from http://www.javascriptkit.com/dhtmltutors/externalcss3.shtml
function toggle() {
var mysheet=document.styleSheets[0]
var firstrule=mysheet.cssRules? mysheet.cssRules[0]: mysheet.rules[0]
firstrule.style.display=(firstrule.style.display=="block")?"none":"block"
return false
}
</script>
</head>
<body>
toggle the objects<br />
<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/tgbNymZ7vqY?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/tgbNymZ7vqY?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/VnT7pT6zCcA?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/VnT7pT6zCcA?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/PhMCa1_9FYg?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/PhMCa1_9FYg?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
</body>
</html>
I think you can do this with something like this css-rule:
html object { display: none; }
instead of javascript.
or use a class + javascript
html object.no-show { display: none; }
and use a loop to apply the class on all objects.
or toggle the class to the body:
html body.hide-object object { display: none; }
this is with javascript with no loop.
Greetings,
I am trying to make my flash button to execute a javascript function. I already did alot of searching and came to a conclusion to use ExternalInterface.call. I also make the allowScriptAccess" to "always" but still it doesn't work.
Here is my flash call:
import flash.external.*;
......................
function rpress() {
ExternalInterface.call("showMessage");
}
And this is how I embedded the flash file to my html: (sorry for the length already)
<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-1" />
<title>harita</title>
<script language="javascript">AC_FL_RunContent = 0;
function showMessage(){
alert("hey");
}
</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
</head>
<body bgcolor="#18658c">
<!--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=7,0,0,0',
'width', '750',
'height', '420',
'src', 'harita',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'harita',
'bgcolor', '#18658c',
'name', 'harita',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','always',
'movie', 'harita',
'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#version=7,0,0,0" width="750" height="420" id="harita" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="harita.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#18658c" /> <embed src="harita.swf" quality="high" bgcolor="#18658c" width="750" height="420" name="harita" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
</body>
</html>
Try changing
'allowScriptAccess','always',
to
'allowscriptaccess','always',
If that doesn't work, try skipping the use of AC_RunActiveContent.js and test with the code in the <noscript> tags. Sometimes I've seen AC_RunActiveContent munch on tags