Passing FlashVars via SWFLoader

hello!
I want to use SWFLoader to instead of the below code, but I don't know how to set vars and get vars.
Is there any way to pass FlashVars via SWFLoader, and how to get the variable?
Thanks!
AC_FL_RunContent(
        "src", "HelloWorld",
        "FlashVars", "par1=a&par2=b"
);

I recommend looking at the Cairngorm Task library – http://sourceforge.net/adobe/cairngorm/wiki/CairngormLibraries/#Task – to manage the flow of the tasks you need to perform on start up.
Follow the sample applications and guidelines here for other application structure examples and recommendations.
http://sourceforge.net/adobe/cairngorm/wiki/CairngormGuidelines/

Similar Messages

  • Changing FlashVars in SWFLoader

    Hi,
    I have a SWF loaded into my Flex application via SWFLoader, and use the source URL to append FlashVars.
    My question is, can I change those FlashVars without having to reload the SWF itself? Does the Flex app keep the SWF in memory, and simply reinitialise if I change the source to have different FlashVars, or does it download the SWF again when I change the source?
    If the latter, is there a way of changing the FlashVars without having to re-load the SWF?
    Thanks,
      Alex.

    New,
    > how can I pass the Flash Vars into the root variables of
    the flash file
    > running AS3?
    In AS3, those variables go to a different place now, no
    longer the root.
    Here's a brief article that, I hope, will help you get your
    bearings. Write
    back if you need additional help.
    http://www.quip.net/blog/2007/flash/how-to-retrieve-flashvars-data-in-actionscript-30
    David Stiller
    Co-author, Foundation Flash CS3 for Designers
    http://tinyurl.com/2k29mj
    "Luck is the residue of good design."

  • Pass flashvars to an AIR app?

    I'm converting a Flex app to an AIR app.
    The current flex app uses the SWFObject inthe html template
    to pass in flashvars...
    var so = new SWFObject("myappp.swf", "myappp", "${width}",
    "${height}", "9.0.115");
    so.addVariable("XMLData",
    getXML(document.getElementById("MyXMLData")));
    so.write();
    ...where MyXmlData is defined in the html template as
    follows....
    <div style="display:none;" id="MyXMLData">
    <video>
    <clip url="rtmp://cpxxx.edgefcs.net/500k/myflv"
    hideSkin="false">
    </clip>
    </video>
    </div>
    In my ActionScript I get the flashvars as follows...
    if (!loaderInfo.parameters.hasOwnProperty("MyXMLData"))
    throw("Error: Missing XML Data");
    How would I do this with AIR? Is there a way to pass the XML
    to the loader when the AIR app is starting up? To put it another
    way... How would I pass flashvars to an AIR app?
    Thanks!
    Chris

    It depends on how your application is being launched. If it's
    being launched from a web page via the browser API, you can pass
    arguments to the launch call. That's not really appropriate for an
    entire XML file, but you could pass e.g. a URL to one.
    However, if your application is being launched directly by a
    user on the desktop, then there's no way to pass arguments to it.
    Stepping back a bit, it might be more useful to think about
    your use case and how to make it work, rather than focusing
    immediately on Flashvars, which is just a feature.
    Oliver Goldman | Adobe AIR Engineering

  • Calling a new browser window with WD Abap and passing data via POST

    Hi there,
    does anybody know whether passing data via POST method is possible when opening a new browser window from within a Web Dynpro Component? In my case I use method IF_WD_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW for opening a new browser window. Now I want to pass a big amount of data which is only possible via POST method. How can I achieve that or is it not considered inside the Web Dynpro Framework?
    Kind regards,
    Albert

    Hi Priya,
    can you please explain a little bit more what you mean? I didn't get it..
    Kind regards,
    Albert

  • Pass parameters via POST in WDPortalNavigation.navigateAbsolute method

    Hi,
    how can i pass parameters via POST method from WD Application using WDPortalNavigation.navigateAbsolute method
    Should i pass the parameters as part of the NavigationTarget URL or they should be passed via different parameter?
    Thanks,
    Yuly Roberman

    What is the procedure to pass parameters via POST using WebDynpro ?
    I am required to pass XML Data via POST.
    I have gone through the following :
    a) http://help.sap.com/saphelp_nw04/helpdata/en/9e/a073001903c9419592b14c2aa63669/content.htm
    b) Inter Navigation Application in Web Dynpro
    However, I could not find any reference to do the same via POST.
    Can anyone throw light on the same ?
    Best Regards,
    Subramanian V.

  • Pass flashvars to swf in swf?

    I am loading a child swf inside a parent swf, and need to pass variables from the parent into the child.  I don't have control over the source code of the child, so I can't have the child pull data from the parent; the data needs to be passed to the child swf in a standard fashion, so that the child works just as if it were embedded in a page using flashvars.
    I've tried passing variables to the child as parameters on the URL:
    var ldr:Loader = new Loader();
    var urlReq:URLRequest = new URLRequest("http://mysite.com/child.swf?var1=aaa&var2=bbb");
    ldr.load(urlReq);
    addChild(ldr);
    This seems to work ok, but apparently Internet Explorer doesn't allow URLs longer than 2083 characters (http://support.microsoft.com/kb/208427).  I need to pass a fairly long string of parameters to the child which will likely exceed 2083 characters. So I'm trying to avoid passing the parameters directly on the URL, and wondering if there is any other way to populate the child swf with the variables that it will expect.  Is there any other way of passing flashvars to a swf-in-swf?
    Thanks,
    Dave

    Craig,
      Thanks for the reply.  I've tried this too but unfortunately, passing the data using URLVariables has the same limitation in IE.
    var ldr:Loader = new Loader();
    var urlReq:URLRequest = new URLRequest("http://mysite.com/child.swf");
    var variables:URLVariables = new URLVariables();
    variables.var1="aaa";
    urlReq.data = variables;
    ldr.load(urlReq);
    addChild(ldr);
    This still results in a request being made to http://mysite.com/child.swf?var1=aaa, since it's using HTTP GET.  If the entire URL (including the query string) is longer than 2083 characters, IE is unable to load the URL.
    Any way around this?
    Thanks,
    Dave

  • Passing flashVars with the html-wrapper command

    Hi,
    Is it possible to pass flashVars when the html template  is generated using the html-wrapper task? So that I dont have to edit  the html template to add flashVars?
    Something like this in the html wrapped swf?
    AC_FL_RunContent(
         "src", "TestApp",
         "flashVars", "myName=Danger&myHometown=Los%20Angeles",
         "width", "100%",
         "height", "100%",
         "align", "middle",
         "id", "TestApp",
         "quality", "high",
         "name", "TestApp",
         "allowScriptAccess","sameDomain",
         "type", "application/x-shockwave-flash",
         "pluginspage", "http://www.adobe.com/go/getflashplayer"
    The flashVars I want to pass when I run the html-wrapper task. 
    Thanks 
    Raghu Jakkula

    If this is still an issue please re-post your question To the Business Objects forum or purchase a support case on line and have a dedicated support engineer work with you directly.

  • Passing flashvars to standalone player

    How does one pass flashvars to the standalone player? The
    executable doesn't seem to take any arguments, doesn't parse URLs
    with variables (e.g. file://movie.swf?var=value), and doesn't make
    use of any environment variables I've tried.

    Yes this is possible with our Third Party Tool Jugglor.
    Read this
    http://flashjester.com/index.php?section=faq_search&search=command%20line#250
    Jugglor
    http://www.jugglor.com
    Regards
    FlashJester Support Team
    e. - [email protected]
    w. -
    http://www.flashjester.com
    There is a very fine line between "hobby" and
    "mental illness."

  • Passing Parameters via Post Method from Webdynpro Java to a web application

    Hello Experts,
    I want to pass few parameters from a web dynpro application to an external web application.
    In order to achieve this, I am referring to the below thread:
    HTTP Post
    As mentioned in the thread, I am trying to create an additional Suspend Plug parameter (besides 'Url' of type String) with name 'postParams' and of type Map.
    But when I build my DC, I am getting the same error which most of the people in the thread have mentioned:
    Controller XXXCompInterfaceView [Suspend]: Outbound plug (of type 'Suspend') 'Suspend' may have at most two parameters: 'Url' of type 'string' and 'postParams' of type 'Map'.
    I am using SAP NetWeaver Developer Studio Version: 7.01.00
    Kindly suggest if this is the NWDS version issue or is it something else that I am missing out.
    Also, if it is the NWDS version issue please let me know the NWDS version that I can use to avoid this error.
    Any other suggestion/alternative approach to pass the parameters via POST method from webdynpro java to an external web application apart from the one which is mentioned in the above thread is most welcome.
    Thanks & Regards,
    Anurag

    Hi,
    This is purely a java approach, even you can try this for your requirement.
    There are two types of http calls synchronous call or Asynchronous call. So you have to choose the way to pass parameters in post method based on the http call.
    if it is synchronous means, collect all the values from users/parameters using UI element eg: form and pass all the values via form to the next page is nothing but your web application url.
    If it is Asynchronous  means, write a http client in java and integrate the same with your custom code and you can find an option for sending parameters in post method.
    here you go and find the way to implement Asynchronous  scenario,
    http://www.theserverside.com/news/1365153/HttpClient-and-FileUpload
    http://download.oracle.com/javase/tutorial/networking/urls/readingWriting.html
    http://digiassn.blogspot.com/2008/10/java-simple-httpurlconnection-example.html
    Thanks & Regards
    Rajesh A

  • Loading a remote SWF via SWFLoader Issue

    I have a simple flex app which loads an external XML into an
    arrayCollection using HTTPService send method. This works fine as
    both a stand-alone, or when loaded into it's parent as a LOCAL file
    via the SWFLoader tag. However, when I place this child file onto a
    remote server and try to load it into the parent which resides on
    my desktop, the ArrayCollection default resultFormat of the send
    method triggers the following runtime error (listed below). I don't
    think it's a sandbox issue because when I change result format to
    e4x, it works fine remotely. I've been hitting a wall on this for
    days now... Any insight would be greatly appreciated and thanks to
    all in advance!!!
    PARENT SWF (resides on local desktop)
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="vertical" initialize="initData()">
    <mx:Script>
    <![CDATA[
    public var baseURL:String;
    public function initSWF(swfURL:String):void {
    remote_swf.load(swfURL);
    public function initData():void
    baseURL = "
    http://blahblahblah";
    Security.allowDomain(baseURL);
    ]]>
    </mx:Script>
    <!-- WORKS when loading child swf LOCALLY -->
    <mx:Button label="Load LOCAL SWF APP"
    click="initSWF('remoteSWF.swf')"/>
    <!-- DOES NOT WORK when loading child swf REMOTELY -->
    <mx:Button label="Load REMOTE SWF APP" click="initSWF('
    http://blahblahblah/remoteSWF.swf')"/>
    <!-- LOADER -->
    <mx:SWFLoader height="100%" width="100%" id="remote_swf"
    autoLoad="false" visible="true" scaleContent="false"/>
    </mx:Application>
    CHILD SWF (resides on remote server)
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" creationComplete="getXMLData()">
    <mx:HTTPService id="myTeams" url="
    http://blahblahblah/xml/myXML.xml"/>
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    import mx.rpc.events.ResultEvent;
    import mx.collections.ArrayCollection;
    public function getXMLData():void
    Alert.show(Security.sandboxType);
    myTeams.send();
    ]]>
    </mx:Script>
    <mx:Label text="THIS IS THE LOADED SWF WHICH HAS JUST
    PERFORMED A SEND ON HTTP SERVICE TO CREATE ARRAY
    COLLECTION"></mx:Label>
    </mx:Application>
    ------------ RUNTIME ERROR ---------------------------------
    ArgumentError: Error #1063: Argument count mismatch on
    Object/
    http://adobe.com/AS3/2006/builtin::hasOwnProperty().
    Expected 0, got 2.
    at mx.rpc.xml::SimpleXMLDecoder/decodeXML()
    at mx.rpc.xml::SimpleXMLDecoder/decodeXML()
    at mx.rpc.xml::SimpleXMLDecoder/decodeXML()
    at mx.rpc.http::HTTPService/
    http://www.adobe.com/2006/flex/mx/internal:rocessResult()
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::resultHandler()
    at mx.rpc::Responder/result()
    at mx.rpc::AsyncRequest/acknowledge()
    at :irectHTTPMessageResponder/completeHandler()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio
    n()
    at flash.events::EventDispatcher/dispatchEvent()
    at
    flash.net::URLLoader/flash.net:URLLoader:nComplete()

    After further investigations, it appears that the problem might be, due the fact that in the remote (loaded) swf, the following is null:
    var sm:ISystemManager = ISystemManager(SystemManagerGlobals.topLevelSystemManagers[0]);
    sm.swfBridgeGroup <----- equals null
    I tried creating the swfBridgeGroup in the local (loading) swf, but the loaded one still thinks it is null.
    Any ideas?

  • Unable to pass flashvars in application url in Flex 4.5.

    I am creating an application in which I have to pass variable in application URL like http://localhost/Test/test.html?name=testUser
    It works fine in flex 3.5 and can be read using Application.application.parameters['name']. But with flex 4.5 it is not detected unless declared in html wrapper.
    Problem is, since requirement changes dynamically so somehow its not possible to determine all parameters user want to use so can't be declared in html wrapper.
    Is there any work around for reading flashVars directly from application URL ? how about using browserManager's fragments for solving this problem??

    I am creating an application in which I have to pass variable in application URL like http://localhost/Test/test.html?name=testUser
    It works fine in flex 3.5 and can be read using Application.application.parameters['name']. But with flex 4.5 it is not detected unless declared in html wrapper.
    Problem is, since requirement changes dynamically so somehow its not possible to determine all parameters user want to use so can't be declared in html wrapper.
    Is there any work around for reading flashVars directly from application URL ? how about using browserManager's fragments for solving this problem??

  • Passing querystring via alias application call

    Hello everyone,
    first of all I'm not quite sure if this is the correct forum for my question so please excuse me if it's the wrong one.
    We're using short urls (alias) to call a application in our portal. For example http://sapportal/alias_test will be transalated to something like http://host:port/irj/portal?NavigationTarget=ROLES://portal_content/content/1/2/3
    So far so good. Now I want to pass a parameter via the alias (http://sapportal/alias_test?param=value). This will be translated into http://host:port/irj/portal?NavigationTarget=ROLES://portal_content/content/1/2/3?param=value. For some reason the parameter cannot be read via request->get_form_field( 'param' ). Calling the application with a parameter directly via the controller works just fine.
    You might need to know that http://host:port/irj/portal?NavigationTarget=ROLES://portal_content/content/1/2/3 is using an iView to execute the BSP application. In the settings for this iView I can define application parameters, however, this won't help since the value I want to pass with the alias is dynamic.
    Any idea how I could solve this issue?
    Please let me know if you need any further information.
    Thank you in advance.

    You're only 50% correct at what you're saying. I managed to find a solution on my own and it's working.
    In the controller I'm using request->get_header_fields to read the referer field. This contains the translated url including the querystring for the alias. Extracting the parameter is rather easy then.
    In other words: It's possible to read parameters for the situation given but it's not as easy as reading parameters passed by a form.
    For your Information: The link is used in an E-Mail where I don't want to have a full url. And even if I would use a full url (the translated url) it wouldn't help since the parameter would still not be passed to the application.
    Anyway. It's solved.

  • Pass Values to SWFLoader

    Hello,
    I need to pass variables and run functions of an embedded swf
    that is loaded using the SWFLoader component. Basically, my app
    lets user's "preview" animations using their data. The user enters
    in the data they would like to incorporated into the animation and
    can then "preview" the animation w/in the application (it is inside
    an SWFLoader component). Essentially I need to pass variables to
    and run the init() function of the embedded SWF (swf built using
    Flash).
    Thanks in advance for any help you can provide!
    Thanks!
    Patrick

    Hey Matt,
    Thanks for the information. I was however hoping to pass more
    complicated data (like XML Objects) and also wanted to avoid
    reloading the same SWF every time a user wants to "preview". I came
    across this post ...
    http://www.cflex.net/showFileDetails.cfm?ObjectID=690
    Its a little involved however and I don't quite exactly
    understand all of the syntax. I also wanted to embed the swf into
    the app by doing something like this in the SWFLoader.
    source="@Embed('assets/mySWF.swf')"
    Thanks again for all your help already.
    Patrick

  • Pass data via hyperlink

    Can a Flex app read a variable passed to it through a
    hyperlink?
    I am trying to create a chart page that reads its data from
    XML pages (using HTTPService). I want to have the chart page
    determine which of several XML pages to use for data based on the
    hyperlink clicked to launch the chart page.
    On a normal HTML page there might be three links:
    http://www.webpagename.com/chart.html?page=sales
    http://www.webpagename.com/chart.html?page=profit
    http://www.webpagename.com/chart.html?page=ltdebt
    Can the Flex app get information from the URL scope and use
    it within the app?

    Yes. You pass the values into flex from the html wrapper
    using flashvars, and access them in flex using the
    Application.parameters object, which is an associative array.
    Tracy

  • Passing Objects via Request

    I have a very simple problem that is bugging me to death. I've created a simple logon page that authenticates against an ldap directory. Once the authentication has completed successfully I create a user detail object which. Upon success the action returns success and I need to pass that UserDetails object to the forwarding page to display the data. What is the best method to do this? Thanks for the help guys.

    If you're forwarding from one view to another via navigation, then in the action that submits the form, store the object in the RequestMap or SessionMap:
    FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(<name>,<object>);or
    FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(<name>,<object>);You can then refer to this object via the expression #{requestScope.name} where name was the value you used when storing in the map.

Maybe you are looking for

  • How to configure the date format in toolbar of ADF Calendar

    Hi, In the weekly view of the ADF Calendar, the date on the toolbar of the calendar component is something like this "May 1,2011 - May 7,2011". Is there a way to configure this. What changes need to be done to show this as "1 May 2011 - 7 May 2011".

  • Can't install Adobe Reader 11

    Once I have finished downloading the .exe file for Adobe Reader 11, an error message pops up saying the .exe file is not a vaild Win32 application. I am running Windows 7 64-bit. I uninstalled a version of Adobe Reader 10 because it was unable to ope

  • Import Electronic Bank Statement Automaticaly?

    Hello, Currently we are using transaction FF_5 for importing bank statements manually from some folder on our server into SAP ERP system. Now we are working on a cooperation with some company that will make sure that we will get bank statements from

  • USB internet dongle connection

    I have a mobile telephone with sim card. I have an old USB dongle. I put the sim card in the usb dongle and use it to surf the net. Question is what is best / quickest / cheapest : to use the Huawei Modem over the phone number *99# or to use the "Mob

  • Google tv wont play youtube/videos

    I have google tv I can no longer watch any videos or stream music & a pop up comes up stating I need to get flash player , but when I click on the link it says I alredy have flash player instaled on my gooogle chroome browser. So how do I fix this be