How to access FlashVars or URL Query String

I am a bit of a rookie with Flash/AS3 and I need help trying to access FlashVars or URL in Object/Embed tags. I've searched in the Internet and the forums but cannot get my head around how to implement this.  Here is my example.
1) ACTION SCRIPT - I have created a simple flash banner with clickable button (sparkle) with a mouse down event.
The action script (AS3) for the button is the following:
sparkle.addEventListener(
    MouseEvent.MOUSE_DOWN,
    function(evt:MouseEvent):void {
        var url:String = "http://www.[site_url].com/as/img.cfm";
      var request:URLRequest = new URLRequest(url);
        var variables:URLVariables = new URLVariables();
        variables.gphc = "382";
        request.data = variables;
        request.method = URLRequestMethod.GET;
      navigateToURL(request);
     *** the core issue to resolve is how to make the line above (variables.gphc = "382";) to be set dynamically.  I would like for the variable to come from the FlashVars or the URL vars
2) OBJECT/EMBED - my object/embed code with include FlashVars and URL Query String
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" ID="bannerAD" WIDTH="728"  HEIGHT="90">
     <PARAM NAME="movie" VALUE="http://www.[site_url].com/images/imgs/flash_ad.swf?gphc=382">
    <PARAM NAME="quality" VALUE="high">
    <PARAM NAME="bgcolor" VALUE="#FFFFFF">
    <PARAM NAME="FlashVars" value="gphc=382" />
    <EMBED src="http://www.[site_url].com/images/imgs/flash_ad.swf?gphc=382" quality="high"WIDTH="728" HEIGHT="90" TYPE="application/x-shockwave-flash"  PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" FlashVars="gphc=382" />
</OBJECT>
Questions that I need answered ... How do we access the FlashVars or the URL Query String?  I have found many references to loaderInfo but no clear way to implement that I'm able to understand. So if the loaderInfo is the key, where do I add in the loaderComplete() function into my action script above in #1?
function loaderComplete(myEvent:Event)
  var flashVars=this.loaderInfo.parameters;
  gphcTextField.text=flashVars.gphc
this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
Any help is much appreciated.

Thank you for your input.  I implemented your sugguestion in the following way without any success.  Notice below in the addEventListner that I have added the snippet of code.  Is this a good place (correct place) to set the local_var?  I did confirm that the FlashVars and URL variables were set.
sparkle.addEventListener(
     MouseEvent.MOUSE_DOWN,
     function(evt:MouseEvent):void {
         var url:String = "http://www.[site_url].com/as/img.cfm";
         var request:URLRequest = new URLRequest(url);
         var variables:URLVariables = new URLVariables();
         var local_gphc:String = LoaderInfo(this.root.loaderInfo).parameters.gphc;
         variables.gphc = local_gphc;
         request.data = variables;
         request.method = URLRequestMethod.GET;
       navigateToURL(request);
Thank you for your help.

Similar Messages

  • How to pass parameter to the Query String of the Named Queries'SQL

    Firstly to say sorry,I'm a beginner and my English is very little.
    Now I want to know
    How to pass parameter to the Query String of the Named Queries'SQL in the Map editor.
    Thanks.

    benzi,
    Not sure if this is on target for your question, but see #5 in the link below for some web screencasts that show how to pass an input text form field value to the bind variable of a view object. If you're looking for something different, maybe provide some more details such as what you are trying to accomplish and what technology stack you are using - for example, ADF BC, JSF, etc.
    http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html
    Also see section 5.9 and chapter 18 in the developer's guide.
    thanks

  • URL query string block?

    I was asked recently if there is a way to "block" the potential for someone to hijack a SWF by spoofing a variable via a URL query string.
    For example, if there was a path variable hardcoded in the SWF that is pointing to data XML file, but someone found your path variable and typed in:
    http://www.mysite.com/myFlash.swf?dataFile=maliciousdata.xml
    That could change the variable in the SWF correct? Is there a way to block this behavior? Maybe a trick? Was thinking of delaying the declaration of the variable in the SWF in order to "void" anything coming in via the query string but want to know if there are other methods that could be used.
    Thanks!

    Hi,
    in the old (AS1) days, url variables could become program variables. With AS3, you need to specifically retrieve them from an object
    Of course, if you create your swf to do that (perhaps to see different data files during testing), someone else could abuse the feature

  • CiscoIPPhoneExecute with URL query strings

    Has anyone successfully used the CiscoIPPhoneExecute xml object with URLs that contain query strings? Specifically, I'm wondering how to pass query string values that include spaces.
    I'm able to successfully execute a URL such as:
    http://<webaddress>/PushPage.asp?Field1=Value1&Field2=Value2
    However, when I try to execute a URL like:
    http://<webaddress>/PushPage.asp?Field1=Value with space&Field2=Value2
    The phone displays an error message that says "Not Available", and the url that is pushed never gets executed.
    I have tried representing spaces in the query string values using both the conventional "+" symbol, and I have also tried using "%20". Neither of these escape sequences seems to work.
    Thanks for any advice.
    -Mike

    Thanks for the response. As I stated above, I know that ampersand (&) must be escaped, and I am properly escaping that character in the XML packets. I'm not having any problems pushing URLs that contain ampersand.
    What I can't figure out is how to push URLs with *SPACES* included in the query string values. Please see the example URLs I posted in my original message, specifically the second URL. Again, I omitted the necessary ampersand escape sequence there for clarity.
    -Mike

  • Include XML payload as URL query string

    Hello Gurus -
    I have a business requirement that I'm hoping you all can help me with:
    Scenario: Send XML message from SAP XI to a third party system via the Receiver Plain HTTP Adapter
    I need to include the actual XML message as a query string in the target URL at the time of posting. The content of the XML message is determined within XI message mapping and will not be known until runtime, so the URL determination will need to be dynamic.
    For example - a target URL with the "xmldata=" query string:
    http://server01/receiver.asp?xmldata=<?xml version="1.0" encoding="UTF-8"?><headertag><tag1><value1></tag1></headertag>
    Does anyone know how to do this - Is there some communication channel configuration and/or programming that would work?
    Thanks to all!
    Chad

    Hi,
    This is very similar to our scenario. By manipulating some of the Plain HTTP Adapter parameters, my colleague was able to post using xmldata. He set content type to text/plain then set the prolog to xmldata=. Let me know if this worked.
    Regards

  • Howto read url query string? Help :(

    Hi everyone, I am trying to read the query string from within an applet loaded from a URL. I am loading netscape with the following URL
    "http://localhost/mypage.html?param1=help"
    I am using code:
    System.out.println(getDocumentBase().getQuery());
    and all I am getting is a null?
    This works with appletviewer so could someone tell me what is going on. I have searched the forum but it seems no answer yet exists for this. Perhaps its not possible?
    Info:
    OS: Redhat Linux 8
    java version "1.3.1_02"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
    Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)

    hi,
    can it be that there is a problem with netscape?
    it would suggest to try on ie, but you use linux and i dont think theres an ie-version for linux available ;P
    i would try it on a different browser like opera or something.
    thats my suggestion.
    hope this helped
    cu Errraddicator

  • Portal URL Query String

    I am creating a Portal component and I want to catch the query string passed thru Portal url.
    Example:
    Suppose If user login thru this URL
    http://localhost:50000/irj/portal?userID=test
    I want to catch this userID=test in my component.
    Is it possible?
    Many Thanks,
    B Das
    Message was edited by: B Das

    Hi Das,
    HttpServletRequest Object contains many methods like
    HttpServletRequest servletRequest = request.getServletRequest();
    servletRequest.getRequestURL();
    servletRequest.getQueryString(); -->
    servletRequest.getParameter();
    servletRequest.getProtocol(); etc..
    Hope this helps..
    Regards,
    Karthick K Eswaran

  • HELP INPUT TYPE = hidden  values SEEN IN URL QUERY STRING!!!

    Trying to do session management using hidden fields.
    The fields that are suppose to be hidden show up in the query string of the URL.
    I have included the code, the output to the web page
    and the URL with the "hidden" fields please help.
    HIDDEN FIELDS IN URL QUESRY STRING
    http://localhost:8080/myApp/servlet/Servlet077?firstName=Sandra&item=Michael
    WEB PAGE OUTPUT
    Enter a name and press the button
    Name:
    Your list of names is:
    Michael
    Sandra
    JAVA SOURCE CODE
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Servlet077 extends HttpServlet{
    public void doGet(HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException{
    //An array for getting and saving the values contained
    // in the hidden fields named item.
    String[] items = req.getParameterValues("item");
    //Get the submitted name for the current GET request
    String name = req.getParameter("firstName");
    //Establish the type of output
    res.setContentType("text/html");
    //Get an output stream
    PrintWriter out = res.getWriter();
    //Construct an HTML form and send it back to the client
    out.println("<HTML>");
    out.println("<HEAD><TITLE>Servlet07</title></head>");
    out.println("<BODY>");
    //Substitute the name of your server or localhost in
    // place of baldwin in the following statement.
    out.println("<FORM METHOD=GET ACTION="
    + "\"http://localhost:8080/myApp/servlet/Servlet077\">");
    out.println("Enter a name and press the button<P>");
    out.println("Name: <INPUT TYPE=TEXT NAME="
    + "\"firstName\"><P>");
    out.println("<INPUT TYPE=submit VALUE="
    + "\"Submit Name\">");
    out.println("<BR><BR>Your list of names is:<BR>");
    if(name == null){
    out.println("Empty<BR>");
    }//end if
    if(items != null){
    for(int i = 0; i < items.length; i++){
    //Display names previously saved in hidden fields
    out.println(items[i] + "<BR>");
    //Save the names in hidden fields on form currently
    // under construction.
    out.println("<INPUT TYPE = hidden NAME=item "
    + "VALUE=" + items[i] + ">");
    }//end for loop
    }//end if
    if(name != null){
    //Display name submitted with current GET request
    out.println(name + "<BR>");
    //Save name submitted with current GET request in a
    // hidden field on the form currently under
    // construction
    out.println("<INPUT TYPE = hidden NAME=item "
    + "VALUE=" + name + ">");
    }//end if
    out.println("</body></html>");
    }//end doGet()
    }//end class Servlet07

    1. Change <form name=xxx action="your_servlet" mathod="Get"> to
    <form name=xxx action="your_servlet" mathod="POST">
    2. Add the following lines of code to your servlet.
    public void doPost(HttpServletRequest req, HttpServletResponse res)
            throws ServletException, IOException {
            doGet(req,res);
            return;
    }Sudha

  • On Demand process get url query string

    Hi,
    When I call On Demand process , is there way inside that process get url query sting or whole url did call On Demand process?
    I did try below but it returns null
    owa_util.get_cgi_env('QUERY_STRING')Regards,
    Jari

    You'd know this better than me - but I seem to recall there are 2 Oracle sessions involved in normal page processing - one for the request and one for the response. wwv_flow.show seems to correspond to the response session, not the request session (that might have the env variables you're looking for). Could that explain what you're seeing?

  • How to get values from a query string in URL in a jsf page?

    if i have a url, http://my.com/?name=john+smith, how do i get the values from that url in a jsf page and then pass those values to a servlet?
    i know how to do that in jsp using "request.getParamter("name")" and save it in a bean and then forward to a servlet. But what about in jsf?

    Hello,
    Try this:
    Map requestMap = FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
    String name = (String) requestMap.get("name");If isn't worked one of these methods probably will solve your problem.
    FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
    FacesContext.getCurrentInstance().getExternalContext().getRequestHeaderMap();hth.

  • How to display report from SQL query string

    <p>I am a new user at this forum, my name is Muneer.</p><p>I have a doubt please help me</p><p>I am develoing an Institute Management System (Plat form VB.Net 2003), that can add participant details, course details, Account details so and so....</p><p>my problem is i have a VB.net form ,that form include combo box and flex grid.</p><p>when i select a text from combobox, data will be display in flexgrid its ok. but i want same out in Report.</p><p>when i try to make it showing all data please help me asap. how can i pass data to report.</p><p>I am using ADODB.Connection method with Access Database.</p><p>waiting ur valuable reply</p><p>Muneer</p>

    This sample passes ado data to a report.
    [http://diamond.businessobjects.com/node/2052Â | /node/2052]
    Rob Horne
    Rob's blog - http://diamond.businessobjects.com/blog/10</p>

  • HTTP Sender Adapter - URL / Query String - Posting problems ?

    Hi All,
    Scenario: Partner sending order request via HTTP adapter to XI
    I have configured my scenario and this is a sample URL I gave to Partner but when they try to post, they get "Connection Failed" error.
    http://server.cmpny.com:1234/send/test/message?
    service=Send_Order
    &namespace=urn%3Asap-com%3Adocument%3Asap%3Aidoc%3Amessages
    &interface=ORDERS.ORDERS05
    &party=ABC&qos=EO/
    Party Name : ABC
    Service : Send_Order:
    Interface: ORDERS.ORDERS05
    Namespace: urn:sap-com:document:sap:idoc:messages
    This partner has been "successfully" exchanging data for other messages using the same hostname/userid/passwd, so is there any problem my URL encoding ?
    Any help is appreciated
    Bob

    Hey
    i m not sure how u generated the URL for the scenario but the best approach would be to use the following HTTP test tool for it
    /message/266750#266750 [original link is broken]
    just use the code given by Mr.Stefan Grube .
    secondly instead of host name ,give the IP address of the XI server.
    Thanx
    Aamir

  • How to Access DB2 MQT (Materialized Query Table) in Crystal 10

    DB2 V8 has a new construct called a Materialized Query Table (MQT) that is essentially a table containing the data represented by a view. This MQT does not appear in the Database List in Crystal under Table, View or Synonym. I assume it is due to the Database Type in DB2 (M). How can I make Crystal recognize the MQT so I can use it in a report?

    Hi Linda,
    This question was posted internally and OLE dB is the work around but no version of CR was noted so not sure if this will work for you. If it doesn't work in CR 10 then you'll have to upgrade to a more current version.
    Because MQT is new to DB2 Crystal 10 OLE dB driver may not know how to handle them.
    Thank you
    Don

  • Encoding URL Query String .

    Suppose my url is
    Now i dont want my url to look exactly like this but instead of these alpabets abc some special charaters should appear on the querry string in url .
    If any body could help please .
    Thanx in advance .

    Don't be silly, of course you can! You just need a little JavaScript.
    Somewhere in your document header put a short script like this:<SCRIPT>
    function doPost(val1,val2,val3,val4){
       var f = document.formName;
       f.FirstVal.value = val1;
       f.SecVal.value = val2;
       f.ThrdVal.value = val3;
       f.FrthVal.value = val4;
       f.submit();
    </SCRIPT>Your form will look something like this:<FORM NAME="formName" METHOD=POST ACTION="some.action">
    <INPUT TYPE=HIDDEN NAME="FirstVal" VALUE="">
    <INPUT TYPE=HIDDEN NAME="SecVal" VALUE="">
    <INPUT TYPE=HIDDEN NAME="ThrdVal" VALUE="">
    <INPUT TYPE=HIDDEN NAME="FrthVal" VALUE="">
    </FORM>And your links will look something like this:<A HREF="javascript:doPost(1,2,3,4);">Link1</A>
    <A HREF="javascript:doPost(3,4,5,6);">Link2</A>
    <A HREF="javascript:doPost(4,5,6,7);">Link3</A>

  • Project server URL Query strings

    Hello,
    I'm trying to auto populate Project Server with project details, but I can't find the strings for name and Descriptions, 
    Trying: http://servername/pwa/Project%20Detail%20Pages/ProjectDetails.aspx?NewProject=yes&EntProjectTypeUID=8e006270-7ea1-e311-93f7-00155d01206a
    using &name=test
    Didn't fill in the name
    any Idea.
    Thanks
    tony
    Antoine AL Ibry

    Antoine,
    A little more detail would help. What are you using actually to auto-populate?
    The Name, and other properties in Project Server are "fields", and not page properties (not sure if I am using the right terminology here, but hope you get the idea).
    My guess is that you will have to use one of the PSI methods to do this.
    http://msdn.microsoft.com/en-us/library/office/ms457477(v=office.14).aspx
    Also you might get better answers if you post to the Project Customization and Programming forum.
    Prasanna Adavi,PMP,MCTS,MCITP,MCT http://thinkepm.blogspot.com

Maybe you are looking for

  • Oracle 9.2.0.8 Red Hat 5.3

    Hi all, The Oracle 9.2.0.8 is compatible with Red Hat Enterprise Linux 5.3? Thank you

  • Spry HTML Dataset not loading in DW CS4 wizard

    Does anyone have any idea as to why my HTML data set (a table) will not load in the Create Spry Dataset wizard (DW CS4). It is saying that there are no valid data containers. I followed the tutorials exactly and I also added an ID column to my HTML t

  • Migrating system/apps to new SSD?

    As above, I just bought a new 240GB SSD drive and I would like to migrate my system from the existing HD in the Mac Pro to the new SSD and boot from that SSD.  The HD will then become a simple data drive.  How can I do this with the least hassle? Reg

  • My macbook shuts down alone what can I do

    my macbook shuts down alone what can I do?

  • Error updating camera raw

    When I use Lightroom (4.4) on my MacBook Pro (OsX 10.6.8) and export to Photoshop it tells me to update Camera Raw. In Photoshop when I Help- >Updates -it says "download" then, afterward "What can I do to complete the install?