how to embed flash object into jsp page

I'm having a problem with flash and jsp pages. I am converting from one html web page (where the creator has used java script to create a flash object on the page) into a jsp page. To be honest im not really sure how to create a flash object in a jsp page. I have seen the use of <object> tag when i have searched this forum but in not sure how to use some of the values that I have in the javascript. to make it clearer here is the javascript that creates the flash object in the HTML page.

<div>
      <script type="text/javascript" src="./javascript/flashobject.js"></script>
        <script type="text/javascript">
        // <![CDATA[
        var fo = new FlashObject("./slideshow/slideshow.swf", "header-slideshow", 526, 135, 6, "#d7dee8");
        fo.addVariable("xmldir", "./slideshow/");
        fo.addVariable("imagedir", "./images/");
        fo.addVariable("xmlFile", "header.xml");
        fo.addVariable("XSize", "526");
        fo.addVariable("YSize", "135");
        fo.addVariable("picPause", "5");
        fo.addParam("quality", "high");
        fo.addParam("scale", "exactfit");
        fo.addParam("pluginspage", "http://www.macromedia.com/go/getflashplayer");
        fo.addParam("type", "application/x-shockwave-flash");
        fo.write("");
        // ]]>
        </script>    
      </div>

I can see the addParam would be sorted using the

<param name="" value=""> tag I think but i dont know a tag for the variable.

AceAdminAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bloodredsunCommented:
You can treat the flash code for the jsp exactly as you would for html. The extra benefit for using JSP is that you can dynamically assign parameters on the server using scriptlets as in this example where the quality level is set from a value hardcoded earlier.

e.g
<% String flashQuality = "high" ; %>

        <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="787" height="346">
            <param name="movie" value="home_page.swf">
            <param name="loop" value="false">
            <param name="menu" value="false">
            <param name="quality" value="<%= flashQuality %>">
            <param name="bgcolor" value="#000000">
            <embed src="home_page.swf" loop="false" menu="false" quality="high" bgcolor="#000000"
             width="787" height="346" type="application/x-shockwave-flash"
             pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash">

            </embed>
        </object>

0
AceAdminAuthor Commented:
what would i use for
fo.addVariable("YSize", "135");
I dont know what the tagname is.
would it be

<variable name ="" value="">
0
bloodredsunCommented:
It depends on what you are doing. In this case I would guess that it is the height variable so you would do somehting like this

<% String flashHeight = "346" ; %>

        <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="787" height="<%= flashHeight  %>">...

You are aware that you could just leave the javascript as it is. Javascript will run in jsp just as well as in HTML.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AceAdminAuthor Commented:
cheers it did work in the java script version after all.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JSP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.