Passing parameter (s) to the fLex SWF compiled object

Recently, I found that by copying sources HTML generated by Flex in my own CFM page, I could add some process on the server side.

Now, I wonder if it is possible to change a parameter - or more than one - to the SWF object generated and compiled with Flex?

In the example; Let's say that I work in ColdFusion with a range of Session variable to store the current wording of the navigation of the user. I want to transmit this information in the SWF (Flex) in order to use this information through the different components of Flex that I use in the same SWF.

I found some little help on the NET talking flashvars. I don't really understand how to use what he has a name for the parameter variable.

I also found another link which talked about the addition of parameter at the end of the file name of the SWF file:

< object classid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
ID = "home" width = "100%" height = "100%".
codebase =" http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" > "
< param name = "movie" value = "accueil.swf? "SessionLang = #session.lang #" / >
< param name = "quality" value = "high" / >
< param name = "bgcolor" value = "#869ca 7" / >
< param name = "allowScriptAccess" value = "sameDomain" / >
< embed src = "accueil.swf? ' Quality SessionLang = #session.lang # "="high"bgcolor =" # ca 869, 7.
Width = "100%" height = "100%" name = "home" align = "middle".
play = "true".
Loop = "false".
allowScriptAccess = "sameDomain".
Type = "application/x-shockwave-flash".
pluginspage =" http://www.adobe.com/go/getflashplayer_fr" > "
< / embed >
< / object >

That's what I tried, but by forcing another value for Session.Lang, nothing happens. I'm suspicious that this is really working this way!

If anyone has any information on the passage of a SWF Flex object setting, let me know.

You should be able to use the flashvars to do this. This means that you need to change the code page of the flashplayer hosting html javascript.

There is a JavaScript method called AC_FL_RunContent script that must be modified as follows:

NOTE: This is not an example of ColdFusion, so please make changes accordingly.

AC_FL_RunContent)
'src', "Flex/CorporationContactDataEntry,"
"width", "100%."
"height", "100%."
"align", "middle",
'id', 'CorporationContactDataEntry ',.
'quality', 'high ',.
"bgcolor", "#869ca 7."
'name', 'CorporationContactDataEntry ',.
"flashvars", " < %="" #="" flashvars="" %=""> ,"
"allowScriptAccess", "sameDomain",.
'type', "application/x-shockwave-flash"
"pluginspage", "" http://www.adobe.com/go/getflashplayer_fr " "
);

the tag < %#flashvars="" %=""> finally is resolved to a string of name/value pairs as follows:

name1 = value1 & name2 = value2 & name3 = value3

In your Flex Application, you then have access to these settings as follows:

Application.application.Parameters.name1

and so on.

Shiv.

Tags: Flex

Similar Questions

  • Problem passing parameter by using the call to the JS function

    I was wondering if someone could help me with the following problem > I'm trying to pass the parameter fdd_lot_id of the index.php page in popup.php

    I can't make it work and I have tried for 6 hours now. I can pass the parameter very well when I work with normal pages but am unable to get it to work using the method below

    I only conditioned all the code that I'm fairly certain that the problem lies in my syntax on the starting window.open line

    This bit is contained between the head of <>< / head > tags

    < SCRIPT language = "JavaScript" >


    function newwindow()
    {
    Window.Open ('popup.php? id = <? php echo $row ['fdd_lot_id'];? > jav ',' ',' width = 300, height = 200, resizable = 'Yes);
    }

    < /script >

    The call to the function above is contained between the < body > < / body > tags:

    < a href = "Javascript:newwindow ()" > '. $row ['fdd_lot'].'    < /a > < table >

    In the header of the document:

    
    

    In the body of your page:

    )">
    
  • Any suggestion for the option of compiling the Flex Mobile of the project in Flash builder (Blackberry platform)

    I use Flex mobile project type to create a stand-alone for targeting blackberry and android application both versions.

    Depending on the configuration of my test application works ok in blackberry tablet Simulator. As I am new to blackberry AIR application development if anyone can help me for the compilation of project I currently put for my application is good or not?

    When I checked the project-> properties-> Flex compiler, I found "Flex Hero" as compilation same SDK, so I'm trying to pass the value of the configuration option available, that it won't allow me to set the 'Blackberry Tablet OS SDK 0.9.1 for Adobe AIR"- any suggestions?

    The question above, see attached screenshot.

    Hey Dounibiligda,

    He was right to what you saw originally in your settings. the default SDK should be the flex SDK Hero. If you want to add libraries specific blackberry, you must manually import the qnx - screen.swc which will give you most of the libraries QNX which are skinned to resemble the appearance of the standard playbook.

    so to summarize, keep the default Flex Hero sdk and manually import the qnx - screen.swc to your project. Good luck!

  • What causes the generation of the _globalStyle class? It's in my non - Flex SWF.

    Hello

    I'm working on an AS3, compiling with mxmlc from Flex 4 beta 2 SDK. I'm having a problem with mxmlc generating (what seems) Flex style classes and put them in my SWF file. I have noticed that this course when I'm viewing my SWF in a decompiler. It is the origin of the framework Flex be compiled into my SWF, which is about 150 k more. If I prevent flex classes are included via - external-library-path I obviously get a runtime error since the Flex classes are not available.

    The problem seems to be that I put class on the 2nd picture of my SWF using the [block] metadata tag heavily undocumented. If I remove this tag, the Flex style classes are not inserted in my SWF. How can I avoid that mxmlc inject of these classes in my SWF?

    I think we have a submitted bug on what we want in?

  • After passing parameter to other forms, how do you get the value?

    Hello

    I had created a parameter and Federal Archives. I added the record group in the Data_Parameter parameter and use the Call_Form to open another form and pass it
    pd_id with her.

    Some code this that look like this

    DECLARE
    pl_id ParamList;
    pl_name VARCHAR2 (10): = "Bank_Param";
    rg_name VARCHAR2 (40): = "Bank_RecGrp";
    RG_ID RecordGroup;
    ERRCODE NUMBER;
    BEGIN
    pl_id: = Get_Parameter_List (pl_name);
    IF Id_Null (pl_id) THEN
    pl_id: = Create_Parameter_List (pl_name);

    RG_ID: = Find_Group (rg_name);
    IF Id_Null (rg_id) THEN
    RG_ID: = Create_Group_From_Query (rg_name,
    "SELECT CODE, BANK CODE".
    ||' ORDER BY 1');
    END IF;
    Errcode: = Populate_Group (rg_id);
    Add_Parameter (pl_id, 'bank_query', DATA_PARAMETER, rg_name);

    CALL_FORM (BankForm, Hide, no_replace, no_query_only, pl_id);
    ON THE OTHER
    Message ("list of parameters ' |") pl_name | "exist already!");
    RAISE Form_Trigger_Failure;
    END IF;
    END;

    I want to get the parameter after the other open form and using the record group insert in one of the combobox that is in one of the Databock.

    When_New_Form_Instance trigger level both on the form

    DECLARE
    pl_id ParamList;
    pl_name VARCHAR2 (10): = "Bank_Param";
    list_id Item: = Find_Item("Block_Name.Item_Name');
    BEGIN
    pl_id: = Get_Parameter_List (pl_name);
    IF (pl_id) Id_Null is FALSE
    POPULATE_LIST (list_id, pl_id);
    END IF;
    END;

    I don't know is this correct?

    Thank you if someone could help me with that.

    Joel

    Andreas,
    You can actually spend a DATA_PARAMETER, but in all honesty, I've never used I always comes to pass a text parameter. There are examples in the forms help (which I believe is where the OP got their original code) show that passing a DATA_PARAMETER, but I could not find any examples of how to work with the DATA_PARAMETER in the form of receiver.

    Craig...

  • Run the Flex application function in Flash swf

    Hello

    I have Flash Web site (embed) calls my flex swf built (some form of contact). When I click on the button "submit" in my Flex application, I need to perform a function that is written on the side of Flash. So I need access to Flash public service so a side event could be triggered.

    Is this possible and how it's done.

    Thnx in advance

    Two options:

    One is to use LocalConnection between two sovereign wealth funds.

    Another is to use the external Interface of Flex to talk about javascript in the browser and then use javascript to describe the Flash swf file.

    Tracy

  • Pass the variable to the embeded swf format

    Hello

    I have a flash movie that uses a loader to load another flash animation. How can I pass variables from one film to the other, without using global variables?  For any help or suggestion would be greatly appreceated.

    If you load another as3 swf, you can reference variables using the correct path.  the main scenario for the loaded swf file is the property of content of your charger (cast as a movieclip).

    If you load an as2 swf, you must use localconnection to communicate between the two rulers.

  • How pass an array into a php url using the flex http service?

    How pass an array into a php url using the flex http service?
    im making something like this:
    http://localhost/flex_php/example_return_xml.php?id= {mylist}
    -mylist? TABLE
    -If I try to use a text variable it works for example. {myvar.text} where myvar is a text input

    Any idea!

    How can I get using XML?
    I tried to push the table in a textinput & sent the text of entry in php, it worked!

  • How to unload the external .swf file when pass the other section?

    Hello

    The following code provided by Mr. kglad works very well to load an external .swf file on stage. Now, when I click on Contact (button), the file external .swf to disappear completely. How to encode on contact (button) to get by.

    Gallery.addEventListener (MouseEvent.CLICK, GalleryClick);

    function GalleryClick(e:Event):void {}

    If (currentClip! = Gallery_mc) {}

    currentClip.visible = false;

    Gallery_mc. Visible = true;

    currentClip = Gallery_mc ;}

    var loader: Loader = new Loader();

    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, ClipLoaded);

    Loader.Load (new URLRequest ("Gallery.swf"));

    function ClipLoaded(e:Event):void {}

    Gallery_mc. AddChild (Loader);

    Loader.x = 0;

    Loader.y = 120;

    Loader.Width = 1000;

    Loader.Height = 700

    }}

    I tried the following code for Contact_btn unload the Gallery.swf file that launches an error message: 1120: access of undefined property loader.

    Contact.addEventListener (MouseEvent.CLICK, ContactClick);

    function ContactClick(e:Event):void {}

    If (currentClip! = Cotnact_mc) {}

    currentClip.visible = false;

    Cotnact_mc. Visible = true;

    currentClip = Cotnact_mc;

    Gallery_mc.removeChild (loader);}}

    unloadAndStop() is supported by flash player 10 or higher (fp 10 +).

    p.s. Please check the useful/correct, if there is.

  • Pass values JS in a Flex application in a new window

    I found how to pass values to JavaScript in a swf file embedded, but now I have a different scenario. I have a container ASP application that will launch a Flex application. The ASP application manages all security and users get the roles. When you click on a link to open the Flex application in a new window, I would like to pass the user name and the roles stored in the ASP JavaScript I think I need to use ExternalInterface.addCallback("IsStatic",IsStatic) on the side of Flex, but I have to do side Javascript in my ASP page?

    My JavaScript code in my ASP page looks like this:
    var launchedFlexApp = window.open("/apps/Flex/flexApp.swf","winFlexApp","width=850,height=600")

    Thank you
    Tedd

    Tracy,

    Passing values in the url param is the way that I had to make it work. I was able to access it in actionscript in the following way:

    tmpUserId = mx.core.Application.application.parameters.userId

    where the username after the .parameters is the name of the parameter in the query string that I went through the url.

    Thanks for your help

  • Target the main.swf and frame30 of charge

    Hello everyone,

    I recently built a new Web site and uses two different swf files. The main.swf in the main SWF is aligned on the toprightcorner of the Web page, and the other buttons.swf swf is at the bottom of the Web page. What I need now is the buttons.swf whenever a button is hit, the main.swf should play a particular frame. So when I press the button 1, frame 30 of main.swf should start playing.

    Is this possible? Or is it possible instead of using buttons.swf, I just add different gif images and somehow have these images identify the framework within the main.swf?

    I searched for a whole day and I can't seem to find anything. I'm quite new to Flash when it comes to adding features or a script.

    I hope someone can help me!

    Kind regards
    James

    James,

    > Thanks for the tip!

    Sure thing. :)

    > I downloaded a sample of the Adobe support site file to which
    > shows how to send the text from a swf file to another.

    Very well.

    > The only different thing is I want a swf file to another to say
    > go to section 10.
    >
    > I did experiences, but to be honest I have no idea what it
    > every word means in the code.

    Fair enough. It's hard, I admit, when you are just getting started.

    > I hope that's not rude, if I ask a sample of work.

    Rude not at all. :)

    > I do not plan to go further in programming with flash,.
    > That's all I need

    Heh, you sure about that? You're never going to use the MovieClip class
    to load various video clips how to behave? You're never going to use
    the Button class to assign functions to button events? ;)

    > so, if someone won't find it too much trouble help me with this
    > one thing I would really appreciate it.

    What file did you download? I'm looking at the LocalConnection class
    entry now and it is an example of source code which passes text, as
    describe you. The thing is, you can write that
    "receiving_mc.methodToExecute ()" function to do what you want. In the
    example, that I look at you, it does only one thing:

    result_txt. Text = param1 + param2;

    ... namely, to define a particular text field TextField.text property
    (here, result_txt) a combination of two passed parameters.

    In your case, you could use the same code, just drop the part the
    creates an instance of TextField...

    cut this
    This.createTextField("hello_txt",0,10,10,100,20) ("result_txt", 1, 10, 10, 100, 22);
    result_txt. Border = true;

    ... and change the methodToExecute() that this is why...

    receiving_lc.methodToExecute = {function (param1,:Number)}
    gotoAndPlay (param1);
    };

    ... then change the last line of the other code of sovereign wealth funds that it is for this
    ...

    sending_lc. Send ("lc_name", "methodToExecute", 10);

    ... which means that you are still sending a message on the line "lc_name", so
    take the floor; you always call the function of "methodToExecute"; but now.
    you want to send only a single parameter, and this time it is 10. Once again, on the
    end of reception, the function methodToExecute() (which could be called
    No matter what, but in this example, they used a self-descriptive name) is simply
    the function call native gotoAndPlay() instead to define a text field
    text. And passing this value 10 via the param1 parameter. Does
    that clarify a little?

    David Stiller
    Adobe Community Expert
    Dev blog, http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Get the date of compilation

    Hello

    Do you know if it is possible to get the date of compilation by programming? What I want to do is to show to the user, via the label, the date that this application has been built.

    Thank you.

    "Erxar" wrote in message
    News:gls2i6$LQS$1@forums. Macromedia.com...
    > I'm sorry but for me, a lemon, this response looks like this:
    >
    > - How to do X?
    > - Just do X and you will have X.
    >
    > Well... Thanks ;)
    >
    > I don't know if you me properly. I don't want this label value
    > the
    > day application starts (I would date to the text of the label
    (> creationComplete or something), but when it is compiled into the swf. Don't you
    > This means that I
    > put this manual before label every relese? Could you please be more
    > accurate?

    I couldn't see the response you are referring, but it seems to me you'll
    To do some kind of technology side server to read the date of the file, then
    Probably spend the value to Flex using flashVars.

    HTH;

    Amy

  • Dbms_parallel_execute.run_task of execution and pass several Params to the target procedure

    Hello

    I look for my hand on the dbms_parallel_execute package in Oracle 11 g Release 2 and needed help to find a way to pass additional parameters

    the target procedure when it is called from dbms_parallel_execute.run_task.

    Please see this link for an explanation of the use of the package:

    https://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:4248554900346593542

    Usage example:

    declare
      l_var NUMBER := 0;
    begin
      --Sample execution from above link
      dbms_parallel_execute.run_task
      ( task_name      => ‘PROCESS BIG TABLE’,
       sql_stmt       => 'begin serial( :start_id, :end_id ); end;',
       language_flag  => DBMS_SQL.NATIVE,
       parallel_level => 4 );
    
      --Desired execution
      dbms_parallel_execute.run_task
      ( task_name      => ‘PROCESS BIG TABLE’,
       sql_stmt       => 'begin serial( :start_id, :end_id, "HOW TO PASS l_var VARIABLE HERE" ); end;',
       language_flag  => DBMS_SQL.NATIVE,
       parallel_level => 4 ); 
    end;
    /
    

    Now, for the procedure of series, apart from the parameters start_id and end_id, we have additional params such as l_var.

    Can someone help me please to solve this problem?. Any help on this approach would be highly appreciated.

    Thank you

    Hardcode the parameters in the dynamic statement as literals. After all, these globals are set of constants for the task parallel, correct?

    Just make sure that you are coding explicit data type conversions. For example

    pqStatement := 'begin DoSerial( startRow => :start_id, endRow => :end_id, day=> to_date('''||||''',''yyyy-mm-dd'') ); end;';
    

    Of course, also explicitly caste global parameter to a string when concat'ing in the dynamic instruction of the PQ.

  • Captivate SWF Compilation error 7

    I use 7 Captivate on mac 10.9.2. I am getting this infuriating error message "failed to compile SWF: Please check if one of the actionscript keywords is used as a variable name. I managed 5 projects and put them to Blackboard using SCORM 2004 without problem. This is exactly the same, but died in the first slide that will not preview in the making, but the 2 slide, it shows a lot of five slides without problem. It justification seem not to be keywords as variable name actionscript - only 5 user variables and they are all pre-laoded ones.  Any ideas? This seems to be a common problem but the forums do not seem to have an answer.  If anyone can crack this, they will be a little hero.

    swferror.jpg

    Don't believe everything you see in the error messages from Captivate. The question may not necessarily be a real variable name.  It could be related in the name of a tip action, a screen object, or even a slide.  If the name of any object happens to transgress in territory of actionscript keywords, it can cause a problem.

    The other thing that can sometimes cause these errors using punctuation characters in names or fields or same CC text.

    From what you describe, the problem seems to be related to something on the first slide, or something that is loaded at the beginning of the project.

    What happens if you hide the first few blades?  He then publishes without problem?

  • Pass Siebel connector of the takeover bid of 10.3 to 10.4?

    Where can we find documentation on how to upgrade OPA 10.3 Siebel connector to use 10.4. rulebases?

    At this time have been uninstalled all the OPM 0.3 and 10.4 installed on it. The rulebases have been upgraded and release the built files.

    But we want more documentation on how to upgrade server OPA... Is there an easy way to do this? We use IIS.

    Basis of Frank would point out how dowe each of them for the "connector" or the siebel-determination-server, siebel-web- and siebel-WD-determination records...
    "
    Copy the files from the current server settings to a new location and open them in a text editor for the future copy and paste.
    I need to stop IIS.
    Then I need to copy the determinations of the Web and determinations on existing directories top server directories.
    Then, I need to go into the new files of parameters with a text editor and copy all my previous changes new parameter files.
    I need to delete every 10.3 rulesets server.
    Then I need to take all the rules and recompile it with 10.4 OPA and put the rulesets newly compiled in the deployment directory.
    Then I can restart IIS and test?
    "
    Concerning
    William

    William,

    The OPA for Siebel connector does not support the OPA 10.4 runtime. We are working on the OPA for 10.4 Siebel connector supporting 10.4 rulebases and executions, but until it's available, you must use 10.3 rulebases and DURATION.

    When the OPA connector for Siebel 10.4 is available there will be instructions on how to improve from 10.3 to 10.4

Maybe you are looking for