Passing variable from php into flash, help please

Here are what I'm having:
<?PHP
$testVal = "This is a test";
$test = urlencode($testVal);
$out = "test=". $testVal;
echo $out;
?>
// and this is my flash file
function getData() {
// Prepare request
var urlReq:URLRequest=new URLRequest("http://localhost/test.php");
urlReq.method=URLRequestMethod.GET;
var loader:URLLoader = new URLLoader();
loader.dataFormat=URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, completeHandler);
loader.load(urlReq);
function completeHandler(evt:Event) {
var vars:URLVariables = URLVariables(evt.target.data);
trace(" TEST = ", vars.test);
trace(" TEST = ", unescape(vars.toString()));
// and below is the ouput
TEST = undefined
TEST = test=This is a test
I've tried with several different ways to get ONLY the value of the variable - that means I only want to have "This is a test" returned, but I either got "undefined" or the whole thing "test=This is a test", instead.
I'm new to Flash and PHP. Please help.
Thanks

There's no need to write any fake variables out, Flash does not need that. OK, here's a simple PHP script like yours - I called it test.php
<?PHP
     $testVal = "This is a test";
     $out = "test=". $testVal;
     echo $out;
?>
And the AS to call it:
var myLoader:URLLoader = new URLLoader();
myLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
myLoader.load(new URLRequest("http://www.mydomain.com/test.php"));
myLoader.addEventListener(Event.COMPLETE, dataLoaded, false, 0, true);
function dataLoaded(e:Event){  
    trace( e.target.data.test);
You will see 'This is a test' traced to the output window.
HTH

Similar Messages

  • Passing variables from php to flash and the opposite

    Hi guys, im trying weeks now to solve this problem but nothing yet
    If someone could just tell me how to pass variables from flash to php and the opposite i would be thankful!!! Please help!

    I have recently had to learn this, so this may not be the best way but it worked for me
    I suggest looking at the code below stripping out everything you don't need (e.g. the databse stuff) and just get a simple string going back and forward
    have a go and post any problems here and I'll try and help
    in flash i have
    private function getBalanceAndXP():void
              var request:URLRequest = new URLRequest("utils.php");
              request.method = URLRequestMethod.POST;
              var variables:URLVariables = new URLVariables();
              variables.func = "getBalance";
              variables.fbid = userID;
              request.data = variables;
              var loader:URLLoader = new URLLoader();
              loader.dataFormat = URLLoaderDataFormat.VARIABLES;
              loader.addEventListener(Event.COMPLETE, onBalanceComplete);
              loader.load(request);
    private function onBalanceComplete(e:Event):void
              var loader:URLLoader = e.target as URLLoader;
              loader.removeEventListener(Event.COMPLETE, onBalanceComplete);
              var variables:URLVariables = new URLVariables(loader.data);
              _balance = parseInt(variables.balance); // class variable
              _experience = parseInt(variables.experience); // class variable
    public function setBalanceAndXP(balance:int, experience:int):void
                _balance = balance;
              _experience = experience;
              var request:URLRequest = new URLRequest("utils.php");
              request.method = URLRequestMethod.POST;
              var variables:URLVariables = new URLVariables();
              variables.func = "setBalance";
              variables.fbid = userID;
              variables.balance = _balance;
              variables.experience = _experience;
              request.data = variables;
              var loader:URLLoader = new URLLoader();
              loader.dataFormat = URLLoaderDataFormat.VARIABLES;
              loader.load(request);
    and then I have my php file
    <?php
    $func = $_POST["func"];
    $fbid = $_POST["fbid"];
    $balance = $_POST["balance"];
    $experience = $_POST["experience"];
    $numVariables = 0;
    $link = mysql_connect("localhost","username","password");
    mysql_select_db("databaseName");
    if ($func == "getBalance")
              getBalance($fbid);
    else if ($func == "setBalance")
              setBalance($fbid, $balance, $experience);
    mysql_close($link);
    function getBalance($fbid)
              $query = "SELECT balance, experience FROM tableName WHERE fbid = '".$fbid."'";
              $result = mysql_query($query);
              $row = mysql_fetch_row($result);
              writeVariable("balance", $row[0]);
              writeVariable("experience", $row[1]);
    function setBalance($fbid, $balance, $experience)
              $query = "UPDATE tableName SET balance = ".$balance.", experience = ".$experience." WHERE fbid ='".$fbid."'";
              mysql_query($query);
    function writeVariable( $name, $value )
              global $numVariables;
              if ( $numVariables > 0 )
                        echo "&";
              echo $name . "=" . urlencode($value);
              $numVariables++;
    ?>

  • Passing variables from PHP to Flash

    I have a contact form that works. The user enters their info,
    hits submit, and their info is emailed to me. I need to figure out
    how to have the PHP script send back a confirmation that the email
    was actually sent. I can't get the php to echo just a "yes" or
    "no". Here is what I have so far:
    Flash code to bring in PHP variable to notify user if mail
    has been sent or not:
    function receive_response(e:Event):void
    var loader:URLLoader = URLLoader(e.target);
    var email_status = new URLVariables(loader.data).success;
    if(email_status == "yes")
    status_txt.text = "Success! Your message was sent.";
    timer = new Timer(500);
    timer.addEventListener(TimerEvent.TIMER, on_timer);
    timer.start();
    else
    status_txt.text = "Send failed! Please email or call us";
    and here is my entire PHP Code. The code in bold at the bottom
    is where it is supposed to pass the "yes" or "no" as the variable
    success
    <<meta http-equiv="content-type"
    content="text/html;charset=utf-8">
    <?php
    // Create local PHP variables from the info the user gave in
    the Flash form
    $senderName = $_POST['userName'];
    $senderEmail = $_POST['userEmail'];
    $senderMessage = $_POST['userMsg'];
    // Strip slashes on the Local variables
    $senderName = stripslashes($senderName);
    $senderEmail = stripslashes($senderEmail);
    $senderMessage = stripslashes($senderMessage);
    $to = "info@*******.com";
    // change this to reflect your site
    $from = "contact@*********.com";
    $subject = "Contact from ***********.com";
    //Begin HTML Email Message
    $message = <<<EOF
    <html>
    <body bgcolor="#FFFFFF">
    <b>Name</b> = $senderName<br /><br />
    <b>Email</b> = <a
    href="mailto:$senderEmail">$senderEmail</a><br
    /><br />
    <b>Message</b> = $senderMessage<br />
    </body>
    </html>
    EOF;
    //end of message
    $headers = "From: $from\r\n";
    $headers .= "Content-type: text/html\r\n";
    $to = "$to";
    if (mail($to, $subject, $message, $headers))
    echo “success=yes”;
    else
    echo “success=no”;
    exit();
    ?>
    Thanks

    I have a contact form that works. The user enters their info,
    hits submit, and their info is emailed to me. I need to figure out
    how to have the PHP script send back a confirmation that the email
    was actually sent. I can't get the php to echo just a "yes" or
    "no". Here is what I have so far:
    Flash code to bring in PHP variable to notify user if mail
    has been sent or not:
    function receive_response(e:Event):void
    var loader:URLLoader = URLLoader(e.target);
    var email_status = new URLVariables(loader.data).success;
    if(email_status == "yes")
    status_txt.text = "Success! Your message was sent.";
    timer = new Timer(500);
    timer.addEventListener(TimerEvent.TIMER, on_timer);
    timer.start();
    else
    status_txt.text = "Send failed! Please email or call us";
    and here is my entire PHP Code. The code in bold at the bottom
    is where it is supposed to pass the "yes" or "no" as the variable
    success
    <<meta http-equiv="content-type"
    content="text/html;charset=utf-8">
    <?php
    // Create local PHP variables from the info the user gave in
    the Flash form
    $senderName = $_POST['userName'];
    $senderEmail = $_POST['userEmail'];
    $senderMessage = $_POST['userMsg'];
    // Strip slashes on the Local variables
    $senderName = stripslashes($senderName);
    $senderEmail = stripslashes($senderEmail);
    $senderMessage = stripslashes($senderMessage);
    $to = "info@*******.com";
    // change this to reflect your site
    $from = "contact@*********.com";
    $subject = "Contact from ***********.com";
    //Begin HTML Email Message
    $message = <<<EOF
    <html>
    <body bgcolor="#FFFFFF">
    <b>Name</b> = $senderName<br /><br />
    <b>Email</b> = <a
    href="mailto:$senderEmail">$senderEmail</a><br
    /><br />
    <b>Message</b> = $senderMessage<br />
    </body>
    </html>
    EOF;
    //end of message
    $headers = "From: $from\r\n";
    $headers .= "Content-type: text/html\r\n";
    $to = "$to";
    if (mail($to, $subject, $message, $headers))
    echo “success=yes”;
    else
    echo “success=no”;
    exit();
    ?>
    Thanks

  • Cannot pass variables from PHP to actionscript 3.0

    I am using CS3 and I write the following code as to pass variable to flash from PHP
    Actionscript
    var myLoader:URLLoader = new URLLoader();
    myLoader.dataFormat = URLLoaderDataFormat.TEXT;
    var myRequest:URLRequest=new URLRequest("http://localhost/moodle/value.php");
    myLoader.load(myRequest);
    myLoader.addEventListener(Event.COMPLETE,onCompleteHandler);
    var myValue: String;
    function onCompleteHandler(e:Event):void{
              var myvariable: URLVariables = new URLVariables(e.target.data);
              myValue = myvariable.values;
                      trace(myValue);
    PHP file
    <?php
       echo ('values = 8');
    ?>
    But I always get the error and cannot get the values by using trace();
    Before i try to use "myLoader.dataFormat = URLLoaderDataFormat.VARIABLES;" I still get the same error.
    Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs
              at Error$/throwError()
              at flash.net::URLVariables/decode()
              at flash.net::URLVariables$iinit()
              at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    Can anyone help me?

    The error is fixed.The new version is like that
    Actionscript
    var myLoader:URLLoader = new URLLoader();
    myLoader.dataFormat = URLLoaderDataFormat.TEXT;
    var myRequest:URLRequest=new URLRequest("http://localhost/moodle/value.php");
    myLoader.load(myRequest);
    myLoader.addEventListener(Event.COMPLETE,onCompleteHandler);
    var myValue: String;
    function onCompleteHandler(e:Event):void{
              var myvariable: URLVariables = new URLVariables(e.target.data);
              myValue = myvariable.values;
                      trace(myValue);
    php file
    <?php
       echo "values=8";
    ?>
    The output finally is "null" in flash file. Why does it happen? It should give me 8 when I input trace(myValue);

  • Best way to pass vars from html into flash?

    I've read a variety of pages that describe how to pass a variable into a flash movie (AS3, player = v9) from the html in which it is embedded.  This page describes AS3 but neglects to mention what to do with the object and embed tags in the noscript section. Furthermore, I'm not sure the javascript I see generated in my page looks like the example there (the js in my page doesn't check AC_FL_RunContenta against zero).  This page is quite long and appears to deal mostly with AS1 and AS2 approaches which I have used before and neglects entirely the newish javascript approach which appears to be used to embed flash these days (i.e., the javascript function AC_FL_RunContent).
    I was wondering if someone could spell out the proper way to pass in a variable from HTML so that flash can see it in such a way that works even if javascript is disabled, in all browsers, etc., etc.
    I've attached the HTML generated by the Flash IDE to this topic.  Any help would be much appreciated.

    You'll have to search for that concise and thorough list of steps or figure it out using the information you now have, which is sufficient to get it done.  It's not that hard--add the FlashVars in the embedding code in the three places and use the various examples you have links to to add the code in the Flash file to access and use the FlashVars.
    Your Flash will be embedded in a web page depending on the visitors settings... if they allow javascript then the javascript portion will be used.  If they don't, then either the object or embed sections will be used depending on their browser.
    As far as javascript changes go, don't sweat 'em until you have a problem... use whatever code your Flash-created html page creates to embed the file in the page.

  • Loading Variables from ASP into Flash

    I can find plenty of tutorials detailing how to load
    variables from a defined asp page into Flash, but here's my
    dilemma...
    I have an asp page that is reading a URL with a unique
    identifier in it (www.sampleURL.com?id=123456), and then turns the
    id number from the URL into a variable. On the same page then, sits
    my swf where I need to use LoadVars to pull in that ASP variable
    via Actionscript. If I don't have a static asp page to pull the
    variables in from and I want to pass the variable within the same
    asp page the swf is located on, how do I do it? Many thanks in
    advance...

    "bonzomn65" <[email protected]> wrote in
    message
    news:ej0630$pjh$[email protected]..
    >I can find plenty of tutorials detailing how to load
    variables from a
    >defined
    > asp page into Flash, but here's my dilemma...
    >
    > I have an asp page that is reading a URL with a unique
    identifier in it
    > (www.sampleURL.com?id=123456), and then turns the id
    number from the URL
    > into a
    > variable. On the same page then, sits my swf where I
    need to use LoadVars
    > to
    > pull in that ASP variable via Actionscript. If I don't
    have a static asp
    > page
    > to pull the variables in from and I want to pass the
    variable within the
    > same
    > asp page the swf is located on, how do I do it? Many
    thanks in advance...
    >
    You don't need LoadVars for this at all. You can just pass
    the variable to
    your Flash movie by specifying a query string when you are
    calling the
    movie.
    If you are using the straight object, embed method then it
    would look
    something like this:
    <param name="movie" value="movie.swf?id=11111">
    <embed src="movie.swf?id=11111" ... >
    If you are using the ActiveContent JavaScript for your movie
    then you just
    leave off the .swf... so
    "name", "movie?id=11111"
    Then, in flash you can access the value of id from the _root,
    like
    var idInFlash:Number = _root.id;
    Of course in the above example you would replace 11111 with
    the proper
    syntax for printing a variable's value in ASP.

  • Passing Variables From PHP to Java Applet ?

    I took one page of a project which was written entirely in PHP, and translated it into a JAVA applet, so as to support better GUI funcitonalities (immediate calculation and display of Time/Billing data, on LostFocus events...stuff like this).
    In any case - I need to pass four variables from the php scripts, to the Java Applet. I had initially, written them out from the php scripts to an html file on the server, and read them in from the applet doing something like this:
    .     this.m_TheURL = new URL(url);
         InputStream in = m_TheURL.openStream();
         DataInputStream data = new DataInputStream(new BufferedInputStream(in));
         while ((unparsed = data.readLine()) != null)
    // parsed the strings here and got my variables
    The URL I read from, was the same file I wrote out to from the PHP scripts. This worked fine - until I told my boss about it, and realised that this wasnt going to work - because the applet updates a MySql database, and issues regarding multiple users became apparent.
    The Applet has to get these variables from the previous PHP page, the same way it had - before my applet was an applet, and it was just another PHP script page.
    The PHP pages are passing variabes using CGI, and a PostGet function. My applet has to do the same thing.
    Anybody know how I can do this - safely ?

    Updated some code... in case people wanted to use it....
    <?php
    class JavaApplet {
         var $param;
         function setParam($name, $value) {
              $temp1 =  array("name" => $name, "value" => $value);
              $this->param = array_merge($this->param, $temp1);
         function delParam($name) {
             foreach ($this->param as $key => $value) {
                  if ($key = $name) {
                       unset( $this->param["$id"]);
         function echo_html() {
              echo '<applet code=TimeEntry.class width=600 height=90 >';
              foreach ($this->param as $value) {
                   foreach ($value as $key => $value2) {
                        echo '<param name="' . $key . '" value="' . $value2 . '">';
              echo '</applet>';
    $applet = &New JavaApplet;
    $applet->setParam("name1", "value");
    $applet->setParam("name2", "value");
    $applet->setParam("name3", "value");
    $applet->echo_html();
    ?>

  • Load variables from XML into Flash

    I was wondering how to load variables from an XML document to
    a Flash file? I am familiar with the code to do it for a text file,
    but was wondering how to do it for XML.
    Many thanks in advance!
    JJ

    Thanks for the recommendation on the site. What I am trying
    to do is load varaibles from an XML file into text boxes in my
    flash movie.
    Here is my loading:
    var my_xml = new XML();
    my_xml.ignoreWhite = true;
    my_xml.onLoad = function(success){
    if (success) {
    gotoAndStop("slide01");
    my_xml.load("narration.xml");
    this is what I have on my frame with the text boxes (the text
    boxes are also have the variable name in the variable area)
    var narration = my_xml.picture01;
    var my_title = my_xml.my_title;
    var my_date = my_xml.my_date;
    should I do my_date.text = my_xml.my_date; instead?
    my xml doc looks like this
    <?xml version="1.0" encoding="iso-8859-1"?>
    <picture01>This is the text for picture
    01</picture01>
    <picture02>This is the text for picture
    02</picture02>
    <my_title>Las Vegas</my_title>
    <my_date>October</my_date>
    Any help on this would be GREATLY appreciated!
    Text
    my_date.text = my_xml.my_date;

  • Passing variables from PHP to AS3

    I am trying to get variables retrieved from a MySQL database
    by a PHP script into my ActionScript 3.0. script. To test I have
    created a simple instance of dynamic text called date_txt, and put
    the AS3 code below into the actions layer:
    All I want to do now is replace the hardcoded date values
    with variables passed from the PHP script (also shown below).
    Can anyone suggest a VERY simple way of passing the PHP
    variables $tgt_year, $tgt_month and $tgt_day into the AS3 code and
    let me know what modifications I need to make to the PHP to make
    the variables available to Flash?
    Thanks, Will

    Hi dzedward,
    I tried the code you posted at
    http://forums.flashgods.org/viewtopic.php?f=41&t=98
    with a little problem. Why is it that the value from event.data
    after complete loading has the value of the entire script of PHP
    script?
    At first, I have this error:
    The markup in the document following the root element must be
    well-formed.
    I replace the following codes: ########
    XML.ignoreWhitespace = true;
    var theResult:XML = new XML(event.target.data);
    var lastName = theResult.client.lname;
    With this one: ########
    trace(event.target.data);
    and has this output: #########
    <?Php
    echo "<?xml version=\"1.0\"?><clients>";
    echo "<client><lname>test
    sdfsaf</lname></client>"
    echo "</clients>";
    ?>
    instead of this output: #########
    <client><lname>test
    sdfsaf</lname></client>
    Please help me out.
    Thank you

  • Passing variable from html to flash

    Hi I have built a flash movie with buttons...depending on
    which button is clicked it loads a different flash movie due to
    variable setting. I am able to set and call the variable s in flash
    fine
    But now i have an html page that needs to blend with this
    flash...So i created buttons on my html page to look like the
    flash...But when i click a certain button i want it to know the
    variable going into the flashpage and load correct movie...not just
    go to the beginning of my flash movie then user will have to choose
    the button again...
    How can i do this?
    thank you in advance
    reno

    well, between the post to forum and this link below i got
    this to work for me
    Just needed to know about the javascript....along with
    putting the value/variable in url as posted..thanks
    http://noscope.com/journal/2003/12/query_string
    thanks for replying with suggestions!
    reno

  • Passing variables from AS3 to PHP

    Hi there
    I am having some trouble in passing variables from AS3 to PHP. I am using flash and php both in the same file [try.php].
    I've stuck with this for two days.. Here's what I have done. Please help!!!
    header.fla [Actionscript in the timeline]
    stop();
    import flash.events.Event;
    import flash.display.Sprite;
    import flash.net.*;
    var url:String = "http://localhost/0000/try.php";
    var req:URLRequest = new URLRequest(url);
    var loader:URLLoader = new URLLoader();
    var variables:URLVariables = new URLVariables();
    send_btn.addEventListener(MouseEvent.CLICK, sendForm);
    function sendForm(evt:MouseEvent):void
        // add the variables to our URLVariables
        variables.asd = "value";
        // send data via post
        req.method = URLRequestMethod.POST;
        req.data = variables;
        loader.dataFormat = URLLoaderDataFormat.TEXT;
        // add listener
        loader.addEventListener(Event.COMPLETE, onLoaded);
        loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
        //send data
        loader.load(req);
    function onLoaded(evt:Event):void
        var result_data:String = String(loader.data);
        if (result_data)
            trace(result_data);
        else if (!result_data)
            trace("error");
    function ioErrorHandler(event:IOErrorEvent):void
        trace("ioErrorHandler: " + event);
    try.php
    <body>
    <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="563" height="280">
      <param name="movie" value="header.swf" />
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <param name="swfversion" value="6.0.65.0" />
      <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
      <param name="expressinstall" value="../Scripts/expressInstall.swf" />
      <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="header.swf" width="563" height="280">
        <!--<![endif]-->
        <param name="quality" value="high" />
        <param name="wmode" value="opaque" />
        <param name="swfversion" value="6.0.65.0" />
        <param name="expressinstall" value="../Scripts/expressInstall.swf" />
        <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
        <div>
          <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
          <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
        </div>
        <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>
    <?php
    if($_POST['asd'])
    echo "value of var1 is <b>".$_POST['asd']."</b>";
    else
    echo "bad luck";
    ?>
    </body>
    BIG THANKS!!

    the problem is nothing your showed.   did you see a security warning that you ignored?
    to test, if that's the problem go here and adjust your security settings:  http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.ht ml
    if that fails, upload your files to a server and confirm everything works.  then start working on your local configuration.

  • Passing variables from one swf to another

    I am facing problem to pass variable from one swf to another.
    I am using loadMovie to load another swf. how can I pass a variable
    value to another swf. Can anyone help me plz? It is somewhat
    urgent.
    thanx in advance.

    first of all:
    this is the Flash Media Server and your problem is not
    related to FMS....
    second thing related to the "somewhat urgent" :
    we, users on this forum, are not there to do your job... so
    calm down otherwise no people will answer your question. This forum
    is a free support forum that community of Flash developer use to
    learn tricks and to solve problems.
    Possibles solutions:
    If the two swf are seperate you can use LocalConnection to
    establish a connection between different swf.
    If you load a second swf into the first one you can interact
    like a standard movieClip(only if there from the same domain or if
    you a policy file on the other server)
    You can use SetVariable(via Javascript) to modify a root
    variable on the other swf and check with an _root.onEnterFrame to
    see if the variable had changed in the second swf.
    * MovieClipLoader will do a better job, in your specify case,
    than the loadMovie. Use the onLoadInit event to see when the swf is
    really totaly loaded into the first one otherwise you will have
    timing issues.
    My final answer(lol) is the solution 2 with the
    notice(*)

  • OBIEE 11g How to pass variable from one prompt to another prompt in dashboard page.

      How to pass variable from one prompt to another prompt in dashboard page.
    I have two prompt in dashboard page as below.
    Reporttype
    prompt: values(Accounting, Operational) Note: values stored as
    presentation variable and they are not coming from table.
    Date prompt values (Account_date, Operation_date)
    Note:values are coming from dim_date table.  
    Now the task is When user select First
    Prompt value  “Accounting” Then in the
    second prompt should display only Accounting_dates , if user select “operational”
    and it should display only operation_dates in second prompt.
    In order to solve this issue I made the
    first prompt “Reporttype” values(Accounting, Operational) as presentation
    values (custom specific values) and default presentation value is accounting.
    In second prompt Date are coming from
    dim_date table and I selected Sql results as shown below.
    SELECT case when '@{Reporttype}'='Accounting'
    then "Dates (Receipts)"."Acct Year"
    else "Dates (Receipts)"."Ops
    Year"  End  FROM "Receipts"
    Issue: Presentation variable value is not
    changing in sql when user select “operation” and second prompt always shows
    acct year in second prompt.
    For testing pupose I kept this presentation
    variable in text object of dashboard and values are changing there, but not in
    second prompt sql.
    Please suggest the solution.

    You will want to use the MoveClipLoader class (using its loadClip() and addListener() methods) rather than loadMovie so that you can wait for the file to load before you try to access anything in it.  You can create an empty movieclip to load the swf into, and in that way the loaded file can be targeted using the empty movieclip instance name.

  • Passing variable from one JSP to another

    Hi....
    I am working on customizing Oracle Application(istore).
    I need to pass variable from 1 JSP to another.
    JSP 1 contains the following line of code:
    <INPUT type="HIDDEN" name="soldtoCustPartyName" value="<%=soldtoCustPartyName%>">
    How can I pass this to another JSP Page. The other JSP should take the 'soldtoCustPartyName' and find out the primary address country.
    So please help me in getting variable passed from 1st JSP to next.
    By default, 1st JSP is not fwded to 2nd JSP.
    This is very very urgent...Please help.....

    When you push the submit button on jsp1 - it goes to jsp2?
    ie
    // in jsp1.jsp
    <form action="jsp2.jsp">
    <INPUT type="HIDDEN" name="soldtoCustPartyName" value="<%=soldtoCustPartyName%>">
    <input type="submit">
    </form>
    //Then in jsp2.jsp all you need is
    request.getParameter("soldtoCustPartyName");This will pick up the value that is coming from the hidden field on jsp1

  • How can I pass variables from one project to another using Javascript?

    Hi all, I am trying to do this: let learners take one course and finish a quiz. Then based on their quiz scores, they will be sent to other differenct courses.
    However, I wish keep track on their previous quiz scores as well as many other variables.
    I found this nice widge of upload/download variables by CPguru (http://www.cpguru.com/2011/05/18/save-and-load-data-widget-for-adobe-captivate-4-and-adobe -captivate-5/). However, this widget works by storing variables from one project in local computer and then upload it to another project.
    My targeted learners may not always use the same computer though, so using this widget seems not work.
    All these courses resided in a local-made LMS which I don't have access to their code. Therefore, passing variables to PHP html files seems not work.
    Based on my limited programing knowledge, I assume that using Javascript to pass variables may be the only possible way.
    Can someone instruct me how to do this?
    Thank you very much.

    If you create two MIDlet in a midlet suite, it will display as you mentioned means you can't change the display style.

Maybe you are looking for