Pass Flash Variables To Javascript, How????

How can I pass variables to be used on the page the flash is embed?

See ExternalInterface:
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInter face.html
Create a JavaScript method which handles the variables flash sends out.
ExternalInterface.call('JavaScriptMethod',arguments);

Similar Messages

  • Using Flash variable in Javascript problem

    I want Flash to load a rss feed and hand it to Javascript
    which will do the parsing and rendering. AFAIK Javaswcript can't
    load external documents and include them into the current html page
    for some security reasons. So I try this approach.
    I attached the code I have. My Problem is that Flash does
    pass the variable to javascript but the document.write overwrites
    everything else in the current html document.
    I don't want to work with popups for obvious reasons. The
    variable must be included in the _current_ document.
    Can anyone give me a hint how to get this working properly?

    What is happening is the XML file is getting cached by the browser.
    There are a few different ways to fix this, but this is what I have found to be the easiest.
    In the Actionscript, where the call to load the xml is, append a random string to the end of the call.
    so:
    (This is AS2 code - so a conversion is necessary if using AS3)
    myXML.load("http://path/to/xml.xml?r="+Math.round(Math.random()*99999999999999999999999999999999999999999999999));
    What this will do is tell the browser that you are calling a unique file every time you try to load the xml, which will forcefully bypass the cached version.

  • Pass flash variables to server - the best way?

    I am using URLVariables at the moment to pass flash variables to the server via php script and update a database rows.
    var variables:URLVariables = new URLVariables();
    At the moment around 9 variables are sent which are then updated in the mysql db.
    I have read that calls to the database via php are the main source of traffic or at least one of them. I am talking about 100 - 500 concurrent users.
    Obvously I am going to need expert help medium term but I would like to give things a go myself.
    I have read about amfPHP but I don't seem to understand it too well.
    Also, I can cut down the amount of php calls per user as I have them all over the place for lots of games and mini exercises.
    BUT is it possible to get those nine variables into an object and pass the object. Would one object be faster than passing 9 variables and would that object be placed into one cell of the mysql databse.
    What would that look like? At the moment I can read my db easily but if there is an object in there, how do you read that?
    Is that what serializning is? Passing an object and all the data is converted to binary etc...
    As you see I'm a little lost.
    Thanks in advance.

    Just my two cents.
    URLVariables is one of the ways to construct url query. There is no difference in doing it either way (second way is faster):
    var request:URLRequest = new URLRequest("http://www.google.com/page.html");
    var variables:URLVariables = new URLVariables();
    variables.var0 = 3;
    variables.var1 = "blah";
    request.data = variables;
    sendToURL(request);
    OR JUST
    sendToURL(new URLRequest("http://www.google.com/page.html?var0=3&var1=blah"));
    I guess object serialization will be less efficient because, I suspect, it will be a larger string and it is much more processor intensive of both Flash and server side.
    I also suspect that http servers have a very efficient way to parse and process requests and variables that come with it - after all this is server's first and the most important duty.
    My point is that I don't believe there is anything better than sending data with query string unless there is a need for obfuscation.
    As a proof - the fact that large volume and frequent updates sites like advertising servers never use anything but plain old query strings attests to the above points.
    As far as DB updates speed goes - it has nothing to do with the means info is sent but rather is a consequence of server and DB performance aspects. It's just a matter of money :-)

  • Updating Flash Variables with JavaScript

    I am looking to update a Flash Variable that I created in my Xcelsius Component by using JavaScript.
    I would like to know if this is possible and if so an example would be great.
    Thanks in advance

    Hi Christopher,
    This is possible.  To get a brief idea of what FlashVars look like in the HTML:
    1) In Xcelsius, add a FlashVar connection and bind it to a range
    2) Export your project to HTML
    3) Open the HTML in notepad and notice the FlashVar properties in the Object and Embed tags.
    Basically your JavaScript  will control the variable that go into your FlashVar parameters. I have attached a basic example for you.
    In this example, the value input updates the flash variable which is linked to the gauge component.
    Best regards,
    Jon Teopaco

  • Passing Flash Variables to ASP

    Hello everyone,
    New problem, I even read other peoples posts. I am working on
    a program that would send a subject to an .asp form, but the
    subject line doesn't want to pass.
    The code that I have in my flash program in the last frame
    is:
    mySendVars = new LoadVars();
    mySendVars.Subject = "Subject Line";
    mySendVars.send("mail.asp", "_self", "POST");
    It is to open the mail.asp form, which it does, but alas, no
    subject line.
    The script that I have to accept the subject line is:
    <% @Language = "VBScript" %>
    <%
    Option explicit
    Response.Buffer= true
    Response.Expires = -1441
    Session("Email")=("[email protected]")
    Session("Subject")
    %>
    <html>
    <head>
    <title><% Response.Write (Session("Subject"))
    %></title>
    <link rel="stylesheet" type="text/css" href="l.css">
    <script LANGUAGE="JavaScript">
    code to process if the form is filled out properly
    <p align="center">You have successfully completed the
    <% Response.Write (Session("Subject")) %>Program.
    To do the evaluation<a href="otherprogram.asp">click
    here</a>.</p>
    The evaluation also opens, but there is no subject
    line....which isn't a surprise if the subject variable isn't
    passing.
    Any help would be appreciated!
    Thank you all in advance!

    I'm working on a similar problem where the asp script won't
    send the email body. What I'm wondering about your problem is
    whether the way you specify the subject ("Subject Line") is an
    instance name or variable of the text field. The asp script I'm
    using utilizes instance names.
    So my question is, do you have the subject text field named
    properly in your Flash movie?

  • Passing jsp variable into javascript.....

    Hai friends,
    Look this code.....
    var mywindow= window.open( ......)
    mywindow.<%= loc%>.style.visibility = "hidden";     
    loc is my jsp variable passing dyanamically to the script....
    But it is not taking....
    when i assign jsp var into javascript like
    mywindow.somehardcodedvalue.style.visibility = <%= loc%>;     
    it is working fine ....
    pl reply me.......

    Hi,
    It is not working.My code is like....
    String loc=(String)arrStr;
    %>
    <script language="JavaScript" type="text/JavaScript">
    mywindow.<%= loc%>.style.visibility = "hidden";     
    </script>
    <%

  • Passing a variable from Javascript to java variable in a JSP.

    Here is simple test Ive been messing around with.
    How do I assign the value that was selected in the radio button to a java variable in my JSP here. Javascript being client side and JSPs being serverside makes this difficult.
    <html>
    <head>
    <SCRIPT LANGUAGE="JavaScript">
    function valbutton(thisform)
         myOption = -1;
         for (i=0; i<thisform.myradiobutton.length; i++)
              if (thisform.myradiobutton.checked)
                   myOption = i;
         if (myOption == -1)
              alert("You must select a radio button");
              return false;
         alert("You selected button number " + myOption + " which has a value of " + thisform.myradiobutton[myOption].value);
         thisform.submit();
    </SCRIPT>
    <title>CreateCategoryContent</title>
    </head>
    <body>
    <BR>
    <center>
    <%
         for(int i = 0; i < 10; i++)
    %>
    <form name="myform">
    <table border="1" bordercolor="#C0C0C0" width="50%" cellpadding="0" cellspacing="0" bgcolor="white">
         <tr>
         <td><%=i%><input type="radio" VALUE="<%=i%>" name="myradiobutton"></td>
         </tr>
    <%
    %>
    </form>
    <input type="submit" name="submitit" onclick="valbutton(myform);return false;" value="Validate" />
    </table>
    </center>
    <!--//T2-->
    </body>
    </html>
    Thanks dudes.

    Please excuse me for appearing dim but my JSP skills are rather weak.
    I dynamically create rows in a table from an Iterator. If the mainTopic is news then I need a third column to appear with radio buttons. I have all this done. When a radio button is selected and the UPLOAD button is selected I need to know which of the values in the table was selected.
    When I ran the test below the selected value was null. Can you help me?
    Thanks.
    <%@ page session="false" %>
    // imports etc
    <%@ page errorPage="../com/digisoft/common/Error.jsp" %>
    <html>
    <head>
    <SCRIPT LANGUAGE="JavaScript">
    function valbutton(thisform)
         myOption = -1;
         for (i=0; i<thisform.myradiobutton.length; i++)
              if (thisform.myradiobutton.checked)
                   myOption = i;
         if (myOption == -1)
              alert("You must select a radio button");
              return false;
         alert("You selected button number " + myOption + " which has a value of " + thisform.myradiobutton[myOption].value);
    thisform.selected.value=thisform.myradiobutton[myOption].value;
         thisform.submit();
    </SCRIPT>
    <title>CreateCategoryContent</title>
    <LINK REL="stylesheet" HREF="<%=request.getContextPath() + "/stylesheets/digihostnews.css"%>" TYPE="text/css">
    <%
    HttpSession session = request.getSession(false);
    String mainTopic = request.getParameter("mainTopic");
    String subCategory = request.getParameter("subCategory");
    String subCategoryId = request.getParameter("subCategoryId");
    String subCategoryToBeDeleted = request.getParameter("subCategoryToBeDeleted");
    String selection = request.getParameter("selection");
    // other initializations etc
    %>
    </head>
    <body>
    <BR>
    <!--Another table-->
    <center>
    <table border="1" bordercolor="#C0C0C0" width="90%" cellpadding="0" cellspacing="0" bgcolor="white">
         <tr>
              <td class="blue">Select Topic</td>
         </tr>
         <tr>
         <td class="insidebox2">
         <BR>
              <form action="NewsUpdate.jsp" method=post>
              Select Topic
              <select NAME="mainTopic" class="dropdown">
              <%
                   Iterator menuItems = myLombardiaMgr.getMainCategories();
                   while(menuItems.hasNext())
                        MainCategory aMenuItemCategory = (MainCategory)menuItems.next();
                        String menuItem = aMenuItemCategory.getMainCategory();     
                        if(!menuItem.equalsIgnoreCase(mainTopic))
              %>
                        <option VALUE="<%= menuItem %>" ><%= menuItem %></option>
              <%
                        else
              %>
                        <option SELECTED VALUE="<%= menuItem %>" ><%= menuItem %></option>
              <%
              %>
         </select>
         <INPUT type=submit class="newsbutton" value="LOAD" name=Submit>
    </form>
    <form action="AddCategoryDescription.jsp" method=post>
    <INPUT TYPE=HIDDEN NAME="mainTopic" VALUE="<%=mainTopic%>">
    <INPUT type=submit class="newsbuttonlong" value="EDIT DESCRIPTION" name=Submit>
    </form>
    </td>
    </tr>
    </table>
    </center>
    <!--//Another table-->
    <!--T2-->
    <center>
    <table border="1" bordercolor="#C0C0C0" width="90%" cellpadding="0" cellspacing="0" bgcolor="white">
         <tr><td class="blue">Categories</td></tr>
         <tr>
              <td class="insidebox2">
              <BR>
              <form action="NewsUpdate.jsp" method=post>
                   Add Category
                   <input type="text" name="subCategory" class="dropdown" id="catId" value=""/>
                   <INPUT TYPE=HIDDEN NAME="mainTopic" VALUE="<%=mainTopic%>">
                   <%      
                   if (mainTopic != null)
                        %>
                        <INPUT type=submit class="newsbutton" value="ADD" name=Submit>
                   <%
                   else
              %>
                   <INPUT type=submit class="newsbutton" value="ADD" name=Submit disabled>
                   <%
                   %>
              </form>
                   <!--T3-->
         <table id="categoryTable" border="1" bordercolor="#035C98" width="60%" height="60%" cellpadding="0" cellspacing="0" bgcolor="white">
         <tr>
         <td colspan="1" class="result"><b>Category Name</b></td>
         <td colspan="1" class="result"><b></b></td>
         </tr>
    <%
              if(myApplicationDetails != null)
                   myApplicationDetails = myLombardiaMgr.getAllApplicationDetails();
                   Iterator myMainCategories = myApplicationDetails.getMainCategories();
              while(myMainCategories.hasNext())
                   MainCategory aMainCategory = (MainCategory) myMainCategories.next();
                   if(aMainCategory.getMainCategory().equalsIgnoreCase(mainTopic))
                        Iterator subTopics = aMainCategory.getSubTopics();
                        while(subTopics.hasNext())
                             SubTopic aSubTopic = (SubTopic) subTopics.next();
                   %>
                        <form action="NewsUpdate.jsp" method=post>
                             <tr>
                             <td class="result"><%=aSubTopic%></td>
                             <td class="result">
                                  <INPUT type=submit class="newsbutton" value="REMOVE" name=Submit>
                                  <INPUT TYPE=HIDDEN NAME="subCategoryId" VALUE="<%=aSubTopic.getId()%>">
                                  <INPUT TYPE=HIDDEN NAME="subCategoryToBeDeleted" VALUE="<%=aSubTopic%>">
                                  <INPUT TYPE=HIDDEN NAME="mainTopic" VALUE="<%=mainTopic%>">
                                  <INPUT TYPE=HIDDEN NAME="subCategory" VALUE="<%=aSubTopic%>">
                             </form>
                        <form action="EditStoryItem.jsp" method=post>
                             <INPUT TYPE=HIDDEN NAME="subCategory" VALUE="<%=aSubTopic%>">
                                  <INPUT TYPE=HIDDEN NAME="subCategoryId" VALUE="<%=aSubTopic.getId()%>">
                                  <INPUT TYPE=HIDDEN NAME="mainTopic" VALUE="<%=mainTopic%>">
                                  <INPUT type=submit class="newsbutton" value="EDIT" name=Submit>
                             </form>
                             <%
                                  if(mainTopic.equalsIgnoreCase("News"))
                             %>
                                  <td class="result">
                                       <INPUT type="radio" name="newsitem" VALUE="<%=aSubTopic%>" >
                                       <INPUT TYPE=HIDDEN onclick="valbutton(myform);return false;" NAME="selection" >
                                  </td>
                             <%
                             %>
                   </td>
                             </DL>
                                  </tr>
                        <%
                             } // end of if
                        %>
         </table>
         <table border="0" bordercolor="#C0C0C0" width="60%" cellpadding="0" cellspacing="0" bgcolor="white">
         <tr><td align="right">
         <form action="../../../../../../servlet/UploadXmlFiles" method=post>
         <% if(myApplicationDetails == null )
         System.out.println("******************* selection "+selection);
    %>
              <INPUT type=submit class="newsbutton" value="UPLOAD" name=Submit disabled>
    <%
         else
    %>
    <INPUT type=submit class="newsbutton" value="UPLOAD" name=Submit>
    <%
         System.out.println("******************* selection "+selection);
    %>
         </form>
         </td>
         </tr>
         </table>
         <!--//T3-->
         </td>
         </tr>
    </table>
    </center>
    <!--//T2-->
    </body>
    </html>

  • Passing CFGrid variable to Javascript

    I am trying to capture a value in my cfgrid and send it to a
    javascript attached to a button.
    <cfinput type="button" name="viewMemo" value="View
    Safetrace Memos" tooltip="Click here to view memos "
    onclick="getURL('javascript:openNewWindow(
    my_grid.dataProvider[my_grid.selectedIndex][ITEM]');"
    bind="my_grid.dataProvider[my_grid.selectedIndex][ITEM]">
    When I drop the bindVariable into the javascript in the
    getURL I get a ton of Flex engine errors. I've tried all kinds of
    syntax variations and still errors. Could someone lend me a hand?
    Thanks.
    Mark F

    Hi Mark,
    You can try this example. If it works then you can try to
    replace the txtSource with your my_grid.dataProvider ...
    <script>
    var newwin;
    function executejava(strValue1, strValue2) {
    alert(strValue1);
    alert(strValue2);
    </script>
    <cfform format="flash">
    <cfformitem type="script">
    public function openURL(strSource):Void {
    getURL("javascript:executejava('" + strSource + "','my
    window','_blank')");
    </cfformitem>
    <cfinput name="txtSource" type="text" label="Source">
    <cfinput name="btnClick" value="Click" type="button"
    onclick="openURL(txtSource.text)">
    </cfform>
    Hope it helps
    Cheers,
    Keiko

  • Passing variables to Javascript

    Does anyone know how to pass a variable to javascript in As2? Thank you!

    Javascript / Flash Communication
    Here's a link that provides some information on that...
    http://kb2.adobe.com/cps/156/tn_15683.html

  • Passing variable from javascript to servlet!!!

    Hi all,
    I have one doubt,
    can we pass a variable from javascript to servlet???
    In Brief,
    i am getting some values in javascript through jsp and the same values i
    want to use in servlet.
    Yes, i know i can get these values in servlet by using request.getParameter("");
    But these values are dynamically generated so i dont know how many varaible are they!. so i am trying to put some array list so that i can forward this values to servlet.
    But i can't get this array which is declared in javascript!! :( so any buddy can help me how to get this dynamically generated values in servlet!!!
    Thanks in Advance!! :)

    can you post a sample of your code?
    remember to put it between tags                                                                                                                                                                                       

  • How can i pass a variable instead of a table name in the Select statement.

    Dear all
    how can i pass a variable instead of a table name in a select statement ?
    Example :-
    Begin
    P_get_procedure_tname (aap_name,otable_name);--It will take an application name and will return a table name
    Select col1 into ocol1
    from  ---- here i want to pass the variable OTABLE_NAME
    End;How can i pass this ?

    Hi,
    You can use dynamic sql.
    EXECUTE IMMEDIATE 'SELECT COL1 INTO ' || OCOL1 || ' FROM " || OTABLE_NAME;
    {code}
    cheers
    VT                                                                                                                                                                                                                                                                                                   

  • Using Flash Variables in Excelsius

    Dear Experts.
    I have a dashboard in Xcelsius which has multiple sheets(60 Sheets) where navigation to every other page is done using the push buttons " Back and Next ". This functionality is working fine without creating any issues. Now, the customer wants to print the various sheets at one shot. But, this functionality cant be incorporated in Xcelsius as we can print only one sheet at a time. Hence they decided to use Crystal reports to build the whole functionality again. Now, i thought of a solution where, if we could pass Flash variables for the push buttons from Xcelsius to Crystal reports 2008 and embed this particular SWF into CR, then we could somehow build these different sheets in CR and get the print out at one shot.
    Please give me tips on how to use the Flash Variables both in Xcelsius and Crystal Reports.
    Thanks in Advance,
    Kishan

    Hi:
       1. For configure flash var under Xceslius designer:
         1.1 Open xceslius.
         1.2 Click "Manage Connection".
         1.3. Choose "Flash Variable".
         1.4. Create variable and give name and binding to excel range.
         1.5. Export to swf.
       2. Consume flash var under crystal report 2008
         2.1 Open crystal report.
         2.2 Click "Insert Flash Object".
         2.3 Browser the swf you just created and add it into crystal report designer.
         2.4 Right click the flash object and right click your mouse.
         2.5 Choose "Flash Data Expert..."
         2.6 Click "+" button to add flash variable. and input your custom data. (note the flash variable name should be the same with defined in swf)

  • How to pass a variable from HTML to Flash

    I have built my flash ad banner in Flash 9 and now want the
    HTML code to pass the url over to the flash movie that it should
    jump to when clicked.
    The info in the help file seems out of date for the latest
    HTML template as it uses mainly JavaScript to get round IE's
    dreadful embeding issue. So my problem is, how do I pass a variable
    from the HTML to the actionScript specified int he Help file
    (running on a full screen button) as shown below?
    myButton_btn.onRelease = function() {
    if (clickTAG.substr(0, 5) == "http:") {
    getURL(clickTAG);
    via the html code now used by Flash 9 which is like this:
    <!-- saved from url=(0013)about:internet -->
    <html lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Advert_long</title>
    <script language="javascript"> AC_FL_RunContent = 0;
    </script>
    <script language="javascript"> DetectFlashVer = 0;
    </script>
    <script src="AC_RunActiveContent.js"
    language="javascript"></script>
    <script language="JavaScript" type="text/javascript">
    <!--
    // Globals
    // Major version of Flash required
    var requiredMajorVersion = 9;
    // Minor version of Flash required
    var requiredMinorVersion = 0;
    // Revision of Flash required
    var requiredRevision = 115;
    // -->
    </script>
    </head>
    <body bgcolor="#ffffff">
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <!--
    Coping
    with
    Growing
    Audio
    Series
    Theraputic stories
    for children aged
    4 to 9
    -->
    <script language="JavaScript" type="text/javascript">
    <!--
    if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
    alert("This page requires AC_RunActiveContent.js.");
    } else {
    var hasRightVersion = DetectFlashVer(requiredMajorVersion,
    requiredMinorVersion, requiredRevision);
    if(hasRightVersion) { // if we've detected an acceptable
    version
    // embed the flash movie
    AC_FL_RunContent(
    'codebase', '
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0',
    'width', '120',
    'height', '600',
    'src', 'Advert_long',
    'quality', 'high',
    'pluginspage', '
    http://www.macromedia.com/go/getflashplayer',
    'align', 'middle',
    'play', 'true',
    'loop', 'true',
    'scale', 'showall',
    'wmode', 'window',
    'devicefont', 'false',
    'id', 'Advert_long',
    'bgcolor', '#ffffff',
    'name', 'Advert_long',
    'menu', 'true',
    'allowScriptAccess','sameDomain',
    'allowFullScreen','false',
    'movie', 'Advert_long',
    'salign', ''
    ); //end AC code
    } else { // flash is too old or we can't detect the plugin
    var alternateContent = 'Alternate HTML content should be
    placed here.'
    + 'This content requires the Adobe Flash Player.'
    + '<a href=http://www.macromedia.com/go/getflash/>Get
    Flash</a>';
    document.write(alternateContent); // insert non-flash content
    // -->
    </script>
    <noscript>
    // Provide alternate content for browsers that do not support
    scripting
    // or for those that have scripting disabled.
    Alternate HTML content should be placed here. This content
    requires the Adobe Flash Player.
    <a href="
    http://www.macromedia.com/go/getflash/">Get
    Flash</a>
    </noscript>
    </body>
    </html>

    You should use SWFObject to embed your Flash. Not only does
    it make
    embedding more straightforward, it makes passing query
    parameters very easy.
    Check out:
    http://code.google.com/p/swfobject/
    Dave -
    www.offroadfire.com
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • How to pass a variable from HTML to Flash 9

    I have built my flash ad banner in Flash 9 and now want the
    HTML code to pass the url over to the flash movie that it should
    jump to when clicked.
    The info in the help file seems out of date for the latest
    HTML template as it uses mainly JavaScript to get round IE's
    dreadful embeding issue. So my problem is, how do I pass a variable
    from the HTML to the actionScript specified int he Help file
    (running on a full screen button) as shown below?
    myButton_btn.onRelease = function() {
    if (clickTAG.substr(0, 5) == "http:") {
    getURL(clickTAG);
    via the html code now used by Flash 9 which is like this:
    <!-- saved from url=(0013)about:internet -->
    <html lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Advert_long</title>
    <script language="javascript"> AC_FL_RunContent = 0;
    </script>
    <script language="javascript"> DetectFlashVer = 0;
    </script>
    <script src="AC_RunActiveContent.js"
    language="javascript"></script>
    <script language="JavaScript" type="text/javascript">
    <!--
    // Globals
    // Major version of Flash required
    var requiredMajorVersion = 9;
    // Minor version of Flash required
    var requiredMinorVersion = 0;
    // Revision of Flash required
    var requiredRevision = 115;
    // -->
    </script>
    </head>
    <body bgcolor="#ffffff">
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <!--
    Coping
    with
    Growing
    Audio
    Series
    Theraputic stories
    for children aged
    4 to 9
    -->
    <script language="JavaScript" type="text/javascript">
    <!--
    if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
    alert("This page requires AC_RunActiveContent.js.");
    } else {
    var hasRightVersion = DetectFlashVer(requiredMajorVersion,
    requiredMinorVersion, requiredRevision);
    if(hasRightVersion) { // if we've detected an acceptable
    version
    // embed the flash movie
    AC_FL_RunContent(
    'codebase', '
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0',
    'width', '120',
    'height', '600',
    'src', 'Advert_long',
    'quality', 'high',
    'pluginspage', '
    http://www.macromedia.com/go/getflashplayer',
    'align', 'middle',
    'play', 'true',
    'loop', 'true',
    'scale', 'showall',
    'wmode', 'window',
    'devicefont', 'false',
    'id', 'Advert_long',
    'bgcolor', '#ffffff',
    'name', 'Advert_long',
    'menu', 'true',
    'allowScriptAccess','sameDomain',
    'allowFullScreen','false',
    'movie', 'Advert_long',
    'salign', ''
    ); //end AC code
    } else { // flash is too old or we can't detect the plugin
    var alternateContent = 'Alternate HTML content should be
    placed here.'
    + 'This content requires the Adobe Flash Player.'
    + '<a href=http://www.macromedia.com/go/getflash/>Get
    Flash</a>';
    document.write(alternateContent); // insert non-flash
    content
    // -->
    </script>
    <noscript>
    // Provide alternate content for browsers that do not
    support scripting
    // or for those that have scripting disabled.
    Alternate HTML content should be placed here. This content
    requires the Adobe Flash Player.
    <a href="
    http://www.macromedia.com/go/getflash/">Get
    Flash</a>
    </noscript>
    </body>
    </html>

    You should use SWFObject to embed your Flash. Not only does
    it make
    embedding more straightforward, it makes passing query
    parameters very easy.
    Check out:
    http://code.google.com/p/swfobject/
    Dave -
    www.offroadfire.com
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • How to pass a jsp variable into javascript??

    <p><%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
    <p><%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
    <p><html>
    <p><c:set var="binrmapi" value="http://localhost/paas-api/bingorooms.action;jsessionid=XXXXXX?userId=TEST2&sessionId=1&key=1" />
    <p><c:import var="testbinrm" url="${fn:replace(binrmapi, 'XXXXXX', jsessionid)}"/>
    <p><c:set var="tuples" value="${fn:split(testbinrm, '><')}" />
    <p>Time until next game
    <p><c:forEach var="tuple" items="${tuples}">
    <p><c:if test="${fn:contains(tuple, 'row ')}">
    <p> <p><code>
    <p> <c:set var="values" value="${fn:split(tuple, '=\"')}" />
    <p> <font color="blue">
    <p> <c:out value="${values[17]}" />
    <p><c:set var="remainingtime" value="${values[17]}" />
    <p> </font>
    <p> </code>
    <p></c:if>
    <p></c:forEach>
    <p><form name="counter"><input type="text" size="8" name="d2"></form>
    <p><script>
    <p>var milisec=0
    <p>var seconds=eval("document.myForm.remaining").value;
    <p>function display(){
    <p> if (milisec<=0){
    <p> milisec=9
    <p> seconds-=1
    <p>}
    <p>if (seconds<=-1){
    <p> milisec=0
    <p> seconds+=1
    <p> }
    <br>else
    <p> milisec-=1
    <p> document.counter.d2.value=seconds+"."+milisec
    setTimeout("display()",100)
    <p>}
    <p>display()
    <p></script>
    <p></body>
    <p></html>
    <p>This is my code that i was working on, in the jsp part of the script, i get a api call and save a value of time in the variable remainingtime.. and in the javascript, i try to have a countdown clock counting down the remaining time.. but i guess it doesnt work.. how can i get that working? thanks alot
    Message was edited by:
    hamham3001
    Message was edited by:
    hamham3001
    Message was edited by:
    hamham3001
    Message was edited by:
    hamham3001

    Re: How to pass a jsp variable into javascript??Here is the sameple one, hope it will solves your problem.
    <html>
    <body>
    <form name=f>
    <%!
    String str = "A String"
    %>
    <script>
    var avariable = <%=str%>
    <script>
    </form>
    </body>
    </html>
    Let me know if you face any problem

Maybe you are looking for

  • Addition of two more column in Operation overview of inspeciton plan

    Dear Experts, I want to add two more additional column in operation overview of Inspeciton plan. Please suggest & how it has to be achieved. Thanks in advance.

  • CSS okay in IE but not recognized by FF and Safari

    I have a style sheet for image floats that is attached to a html document within a php file that is recognized by IE but is not recognized by Firefox and Safari. I have attached it as an internal style sheet as well as an external style sheet and nei

  • JTextArea within a JScrollPane

    Hi! I've searched through the Project Swing archive and found lots of questions regarding how you ensure that when text is entered into a JTextArea control (via the append() method) the JScrollPane automatically scrolls to the position where the text

  • Is it possible to locate a point using Latitude and Longitude or UMT coordinates in MAP?

    Is it possible to locate a point in Maps using lattitude and longitude or UMT coordinates on my iPhone?    

  • ESSO Reporting

    Hi all, Someone has implemented ESSO-Reporting? I have installed ESSO 11.1.1.1.0 (LM,PR,Reporting). In the Reporting database I can see the LM events, but SSOUserId field was not populated, however i found it's a bug; What's the correct format for th