/    Sign up×
Community /Pin to ProfileBookmark

Using javascript variable for flash

Hello, I am using java varibalbe dynamicly to change flash movie name in html. here is code that i am using, all the alerts that I insert are getting the right movie name, but it’s not displaying at all, and no error message.

inside of the head

[CODE]<script type=”text/javascript”>
var videoID = top.videoName;
alert(“which one to play=”+videoID);

</script>[/CODE]

inside of body:

[CODE]<body marginheight=”0″ marginwidth=”0″ bottommargin=”0″ topmargin=”0″ leftmargin=”0″ rightmargin=”0″ bgcolor=”#2D44C8″>
<SCRIPT LANGUAGE=”JavaScript”>
document.write(‘<table cellspacing=”0″ cellpadding=”0″ border=”0″ width=”100%” height=”100%”>’);
document.write(‘<tr>’);
document.write(‘<td align=”left” valign=”top”>’);
document.write(‘<OBJECT’);
document.write(‘CLASSID=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″‘);
document.write(‘WIDTH=”100%”‘);
document.write(‘HEIGHT=”100%”‘);
document.write(‘CODEBASE=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab”‘);
document.write(‘ID=Flashmovie>’);

document.write(‘<PARAM NAME=”MOVIE” VALUE=”‘ + videoID + ‘” />’);
alert(“HERE TO LOAD=”+videoID);

document.write(‘<PARAM NAME=”PLAY” VALUE=”true”>’);
document.write(‘<PARAM NAME=”LOOP” VALUE=”false”>’);
document.write(‘<PARAM NAME=”QUALITY” VALUE=”high”>’);
document.write(‘<PARAM NAME=”SCALE” VALUE=”SHOWALL”>’);

document.write(‘<EMBED’);
document.write(‘NAME=”Flashmovie”‘);

document.write(‘SRC=”‘ + videoID + ‘”‘);
alert(“SRC=”+videoID);

document.write(‘WIDTH=”100%”‘);
document.write(‘HEIGHT=”100%”‘);

document.write(‘PLAY=”‘ + videoID + ‘”‘);
alert(“PLAY=”+videoID);

document.write(‘LOOP=”false”‘);
document.write(‘QUALITY=”high”‘);
document.write(‘SCALE=”SHOWALL”‘);
document.write(‘swLiveConnect=”true”‘);
document.write(‘PLUGINSPAGE=”http://www.macromedia.com/go/flashplayer/”>’);
document.write(‘</EMBED>’);
document.write(‘</OBJECT>’);
document.write(‘</td>’);
document.write(‘</tr>’);
document.write(‘</table>’);
</SCRIPT>[/CODE]

Appreciate for any info!

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @valerie99 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...