Flex application and component talk to each other?

Hi all.

I have built on a large flex project and try to condense a little downwards out of the code and put it in the individual components.  Can I call then.  Not only to reduce the number of lines of code, but to also make it easier to make improvements, and if others get involved with the project that they may be charged a component rather than all of the code.  In my view, it is logical to try to work this way.

I should point out that I am using Flash Builder 4.

To try it, I worked on an example.

What I hoped to do, it is to pass variables and the values of a component to the main application, is it possible?

That's what I've tried but I get an error the main code can not see the text field in the component.

Code in the main file

<? XML version = "1.0" encoding = "utf-8"? >
" < = xmlns:fx s:Application ' http://ns.Adobe.com/MXML/2009 "
xmlns:s = "library://ns.adobe.com/flex/spark".
xmlns:MX = "library://ns.adobe.com/flex/mx" minWidth = minHeight = "955" "737" height = "600" width = "470" xmlns:ns1 = "*" >
< s: states >
< name s: State = "on" / >
< name s: State = "two" / >
< / s: states >
< fx:Declarations >
<! - Place non-visual elements (e.g., services, items of value) here - >
< / fx:Declarations >

< fx:Script >
<! [CDATA]

private function btn_submit (): void
{
If (txt_user.text = 'Hello')
{
currentState = "two";
}
on the other
{
currentState = "a";
}
}

[]] >
< / fx:Script >

< s:Label x = "10" y = "10" text = "Test Log In on component" width = "717" textAlign = "center" fontWeight = "bold" fontSize = "18" / >
< ns1:Loginform = "190" x y = "71" >
< / ns1:Loginform >
< / s:Application >

The component code

<? XML version = "1.0" encoding = "utf-8"? >
" < = xmlns:fx s:Group ' http://ns.Adobe.com/MXML/2009 "
xmlns:s = "library://ns.adobe.com/flex/spark".
xmlns:MX = "library://ns.adobe.com/flex/mx" width = "400" height = "300" >
< fx:Declarations >
<! - Place non-visual elements (e.g., services, items of value) here - >
< / fx:Declarations >
< s:TextInput = "53" x = "62" width = "298" id = "txt_user" / >


< s:Button = "281" x = "92" label = "Button" click = "btn_submit ()" / >
< / s:Group >

I don't know if I want to do (spend data from a component to the application main and rear) is possible.

If someone could develop on it, I would be grateful!

If the "publishName" of the component property is writable, then Yes.

Two solutions:

-First if you always use the same file name:


-So if you want to change it, you can always use:


And then in the Script code:

myRecorder.fileName = "myFileNameOrWhateverStringHere";

If the property is not writable, because it has no Set accessor, you must provide one (that is if you can change the code of the component).

Tags: Flex

Similar Questions

  • Can Photoshop and InDesign talk to each other?

    I work on a document in InDesign, you use an image that I have edited in Photoshop. Is there a way I can make changes to the image of PS and make them appear in ID, without having to place the image again?

    To change the image of InDesign, you right click on the placed image and choose to "Edit original". It will open in Photoshop. When you save or close the image in Photoshop, it will automatically update in the InDesign document.

    If you change the image without interaction InDesign (going directly in the file system), you can easily update the link in the links of InDesign Panel. Obsolete links will be a yellow warning icon.

  • Can we have three VM servers with software very often talk to each other.

    Hi, I'm new user who started looking for in VM yesterday. I have a requirement where I would like to split a server using VM in 5-6 servers. I would use a VM to install SAP R/3 IDES, another to install SAP CRM IDES, third to install BO and the fourth where I access these three applications. These three programs should talk to each other very frequently. Please let me know if this is possible. These three will be will have separate IP address?

    Please also let me know that all the software are required. If I can get VMware free so what's the advantage with VMware eSphere which cost a lot (for personal use).

    This I do for the self-study that I need to install 2-3 software on separate machines so please be easy on the cost.

    I suggest buying a Dell/HP/IBM server 1 Quad Core with 8 GB of RAM and a SATA drive at least 2.

    Check compatibility on http://www.vmware.com/resources/compatibility

    With 4 cores and 8 GB of RAM, you can run all your VMS and something else (like the gateway VPN or TS, a domain controller for your Windows environment,...)

    André

  • Cannot get 2 nodes VM talk to each other on OEL7

    Greetings-

    I intend to install RAC 11 GR 2 on OEL7. I got the Oracle VM operational machines. I can access the internet successfully without any problems. If I'm on the node-1 and ping its IP address, it also works very well.
    But when I try to do a ping of virsa node-1 node-2 and vice, I get the message cannot.

    Here is my configuration of hots of installation:

    [oracle@racdev01 Desktop] $ cat/etc/hosts

    Loopback #.

    127.0.0.1 localhost.localdomain localhost

    # Public

    192.168.56.71 racdev01.localdomain racdev01

    192.168.56.72 racdev02.localdomain racdev02

    # Private

    192.168.10.1 racdev01 - priv.localdomain racdev01-priv

    192.168.10.2 racdev02 - priv.localdomain racdev02-priv

    # Virtual

    192.168.56.81 racdev01 - vip.localdomain racdev01-vip

    192.168.56.82 racdev02 - vip.localdomain racdev02-vip

    # SCAN

    192.168.56.91 rac - scan.localdomain rac-scan

    192.168.56.92 rac - scan.localdomain rac-scan

    192.168.56.93 rac - scan.localdomain rac-scan

    Rattling, public and private maintains for lack of node-1 node-2 IPs and vice versa:
    $ ping racdev02
    $ ping racdev02-priv


    > > My network:
    Node-1: Ethernet (enpOs8) = > 192.168.56.71 (public)

    Node-1: Ethernet (enpOs9) = > 192.168.10.1 (private)

    Node-2: Ethernet (enpOs8) = > 192.168.56.72 (public)

    Node-2: Ethernet (enpOs9) = > 192.168.10.2 (private)


    This is the configuration for my 3 adapters:

    Adaptor-1.jpgAdaptor-2.jpgAdaptor-3.jpg


    I tried for days to get these 2 nodes to talk with each other. I would really appreciate your help to solve this problem... I can't installing RAC, unless I get these machines talk to each other...

    Thank you very much!

    @AJ

    First of all, thanks to you all for the heads up, I tried your suggestions, which was a good experience of troubleshooting since I am just a DBA not a network Admin however, I solved the problem and I share the solution below.

    Initially after a successful installation of OEL7 on Node1, I did not perform a fresh install of OS OEL7 on Node2, instead, I took the short cut by saving Node1 via VM - Box > file > Export device and then reimported into a new host name & configured network connections accordingly. But, since a clone of Node1, Node2 machines will have the same MAC address and so they may never talk to each other because I understand is the address MAC is what distinguishes them from material level.  Now, you should have a good idea what is my problem...

    There is a quick fix & fix liked - the longer fix would have been to install a new OEL7 on Node2, the miracle solution is below which I was working with success:

    1 I changed my MAC address last 2 digits for all 3 node-2 and make unique cards and not the same addresses MAC on Node1 because they were copied from Node1.

    2. to: VM - Box > settings > network > adapter 1 > advanced > change the 2 digits of the MAC address here also with the same 2 numbers I did on step 1

    3 step 2 apply for Adapter 2 and 3 of the adapter, but make sure you use the same last 2 numbers you did on step 1 for Adapter 2 and 3 of the adapter

    Exp: 1 MAC adapter: 08:00:27:96:72: 85 -adapter 2 MAC: 08:00:27:96:72:86 - 3 MAC adapter: 08:00:27:96:72:87 > Note: they must all be unique and different from MAC @ on Node1

    4 on Node2 > Terminal > cd sysconfig / > , you should see, in my view, enp0s3, 8 and 9 may be different numbers according to your configuration. But once you change each of them, you should see a setting called [HWADDR] Exp: mine was: HWADDR = 08:00:27:96:72:84 - then I changed to the same number, I put it in step 1 above - to: HWADDR = 08:00:27:96:72:85.  Apply the same changes &

    5 restart services network as follows: service network restart - may have to restart...

    6 if everything is done correctly above, you should be able to ping both machines of vice versa - I could

    7 nothing succeeds like success! It took me 2 days to understand this point, but it was worth. I learned so much by testing a few things around. The other way is to perform a new installation of OEL7 on Node2, modify the connections accordingly and you don't need to mess with MAC address at all...

    I'll be happy to set up a small video or post screenshots so you can see it working.

    Please note, I've looked all over youtube BOF CARS on OEL7, most 2 knots BECAUSE I fell on were on OEL6.5 and below. I've seen some autonomous 12 c on OEL7, but no 12 c CARS on OEL7. If there are out there, please post the link. Now, I had 2 machines to talk to each other, I will perform with installation 12 c CARS on OEL7.

    See you soon

    @AJ

  • How to get 2 vm talk to each other?

    Guys,

    I'm on a 64 bit Windows 7 machine.  I have VMWare Workstation 7.1.4 and I try to get 2 Windows 7 64 bit VM to talk to each other without network connectivity.  At present, we have setup the network adapter for the two virtual machines as host only, and also two Windows firewalls are disabled.

    We put the IP (192.168.1.1 and 192.168.1.2) manual on both.  We connected to both and tried to do a ping to another, but it times out.

    What do we lack?

    TIA!

    In order to do a ping, let the firewall is turned on in the Win7 guests and allow ICMP traffic in the advanced settings in their firewall settings.

    André

  • With Movieclips talk to each other

    Hi all.

    I can't try to have a video clip to talk to each other. Essentially, I nested within a movieclip buttons. I want to do is have it such that when one of these buttons is activated, it tells an another movieclip I have on the stage to move to a certain range.

    So currently I have two clips on the stage - navStart and navArrow. I have a navStart button that reads:

    function goMoviesArrow(Event:MouseEvent):void {}
    gotoAndStop (1);
    navArrow.gotoAndStop ("movies")
    }

    Now when I click on the button I get an error message that there is an access of undefined property navArrow. I understand why this is... it is because in the movieclip navStart... There is no such thing as navArrow. So, how can I say that it resembles navArrow who is back on the main stage. I tried things like:

    parent.navArrow.gotoAndStop ("movies")

    and

    stage.navArrow.gotoAndStop ("movies")

    but in vain.

    So, how can I get these movieclips to talk with each other?

    The zip file is attached...

    Try:

    MovieClip (this.parent).navArrow.gotoAndStop ("movies")

  • I have a document composed of separate PDF files that reside in a folder and are related to each other through hyperlinks. Each pdf file is set to open with bookmarks displayed, however if I have a link to a PDF file to another and use the button "Previou

    I have a document composed of separate PDF files that reside in a folder and are related to each other through hyperlinks. Each pdf file is configurΘ for dΘmarrer with bookmarks displayed, however if I have a link to one PDF file to another and use the "back" button to return to my starting point bookmarks are replaced by "vignette". Is there anyway to prevent this?

    Hi Mike,.

    While the implementation of the links, if you choose to open the file in a new window then you will not experience this issue, then you can simply switch to the file view and previous bookmark will remain as it is.

    Is that what helps with your query?

    Kind regards
    Rahul

  • Flex application and several basic material

    Hello

    my company is developing an enterprise application pretty huge involving 4 Flex, BlazeDS, a server side Java-spring and frame matte on the client side.

    It works very well but as demand is growing bigger and bigger performance problems are a major concern for us... And our customers!

    We just noticed a performance problem and I could not find any resource from Google, it's here:

    It seems to us that no matter what the number of CPUS of your computer has, our Flex application always use only one. Accordingly, our application rolls over on a P4 core at 3 GHz computr processor than, say, on a core i7 with 8-processor 1, 6 GHz! Pretty strange isn't it?

    However, I learned that multicore of handfuls of Flash Player since version 9, so perhaps am I missing something simple? Is there something I should do to enable multicore processing? What is my application which is poorly designed? Or an operating system issue maybe?

    Any help would be greatly appreciated

    Thank you

    Matt

    ActionScript is single-threaded, so there is no advantage to try to spread his treatment between multiple cores.  Once the actionscript code has implemented the displaylist for a framework, certain aspects of the rendering of the display list can be distributed to the other cores or even a gpu.  Use the performance profiler to see where you as usage patterns are expensive and optimize.

  • Flex applications and user activity tracking

    Hello

    My question is simple: is there a way to monitor the activity of users within a Flex application?

    Best regards

    Thanks a lot David for explanations. I will apply this as soon as possible.

  • AE and creation of talk to each other?

    It's a shame all the characteristics of one are not included in the other, and perhaps they will one day but until then...

    I want to output images high resolution of the R3D files.

    First allow me to adjust the parameters of ISO metadata, AE is not (or I forgot how?)

    Æ allows me to output to a resolution which is not first. Then.

    I would like to import a R3D file in first, adjust the ISO, then open it in AE and export still images. All this without first, then re - export import into AE...

    How do I do that? And this metadata adjustment will transfer more to AE?

    Enough, please

    See this page for an overview of the ways to make a difference in both directions between After Effects. There are many ways, each have advantages and disadvantages.

    > First allows me to adjust the parameters of ISO metadata, AE is not (or I forgot how?)

    Please explain exactly how you do this. I'm not aware of any difference between After Effects and Premiere Pro in terms of what changes you can make to the ISO for the source files metadata.

    This page describes how to use XMP metadata in After Effects.

    > AE allows me to output to a resolution which is first

    What is the size of the image you export to?

  • If I had an xbox we and my friends just had an xbox 360. Would we be able to talk to each other

    My friends do not receive the xbox one and I am. I would still be able to talk about them on the 360 via the xbox one. Thank you.

    Hello

    It is not a community forum for Xbox.

    Try these resources to the Xbox:

    Xbox forums: http://www.xbox.com/en-US/forums

    Main problems Xbox: http://support.xbox.com/en-US/browse?product=xbox-360

    Xbox contact us: http://support.xbox.com/en-US/contact-us

    Don

  • Windows Vista &amp; Palm Centro 690 do not talk to each other

    After my other phone went through the washing machine I changed to this Palm unit.  Active, came home and installed the synchronization software, worked well.  A few days later tried to synchronize again, no luck.  I'm working on for a few weeks trying to get it working again!  I talked to the local office of Verizon, they suggested that I talk to a technical support.  Them, spent more than an hour on the phone with them the uninstallation of the software, called again, download the new software, once again, still nothing, done a reset and a format and still nothing.  Have been using the Palm as a normal phone and that's fine.  I was unable to figure out what to do.  I even talked to Hp technical support, is not their problem! talk to the people of palm.  So here, I looked through your forms but did not find everything that is related to the Centro and Vista.  I'm almost ready to try anything that seems reasonable.

    Thank you, who finally did the trick, don't know what the difference is / was, but I don't like as it works again. Next time I try a synchronization, I'll try the front USB port and see what happens.  Gluton for the trouble I guess!

    Once again, thanks a lot for your help.  He is LARGELY APPRECIATED.

    kenz5103

    Message relates to: Centro (Verizon)

  • ESXi 5.5 - VMs cannot talk to each other

    I have a single host ESXi 5.5 in one of our offices abroad. Virtual machines on it cannot ping or otherwise to reach out to the other (RDP, etc.). However, other hosts can communicate with the virtual machines and virtual machines have full out communication - can ping their DG, other addresses, etc.

    The host is a Dell 510 with two network adapters configured on the vSwitch, which is set up at the HP 2510 G - 48 as a trunk. The VLAN is the tag and set up on the single vSwitch with the hash of the IP-based routing.

    I tried to disable one of the network cards on the switch to see if it makes a difference and also to disable the firewall on virtual machines (all virtual machines are running Win2008R2 - a domain controller and Exchange server and machine monitoring PRTG), also with no luck.

    There is only one port of the VM group and a group of unique management ports.

    Virtual machines can ping on the ESXi host.

    Is there any other information I can provide to help diagnose this problem?

    Thank you

    Kurt

    Hello

    We have seen this behavior in clonned VMs, however in most of the changing scenarios the VMXNET to E1000 vNIC solves the problem.

    Please check the followng KB which has information on this behavior, and the patch from microsoft for the guest virtual machines.

    KB.VMware.com/kb/1020078

  • Can't get 2 computers to talk to each other

    Hello

    As the title says, I can not get a PC Windows Vista Home Premium to connect to a Windows XP Home Edition computer.

    The reason why I need to do this is to share a PRINTER and configure it to connect to the XP.

    The Vista and the XP they are in the same workgroup, I have an administrator access on both of them.

    On Vista, it has a password that I know.

    Now the problem starts,

    On the vista network folder, it shows my router, printer and the computer itself.

    On XP, I click on the view workgroup computers and I click on the Vista PC. Even if it shows here, it says that the network location is not found.

    How can I make them work somehow?

    Thank you

    Hello

    Did you change your computer?

    I suggest you to see the links and check.

    Windows wireless and wired network connection problems

    http://Windows.Microsoft.com/en-us/Windows/help/wired-and-wireless-network-connection-problems-in-Windows

    Network connection problems

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-network-connection-problems

    Networking of computers running different versions of Windows

    http://Windows.Microsoft.com/en-us/Windows-Vista/Networking-home-computers-running-different-versions-of-Windows

  • VLAN SRP527W do not talk to each other

    Hello everyone,

    I'll keep it simple for the sake of the discussion.

    I have a SRP527W router that is connected to a switch L2 (a TP-Link... I know, it's not a Cisco...). and a PC and a printer connected to the switch. Now, I want to have the PC and the printer on 2 VLANS.

    I created 2 VLANS on the PSR (192.168.1.0/24 and 192.168.2.0/24) and I assigned the Lan 1 port at a time. The RPS is a DHCP server so I have SRP 192.168.1.1 and 192.168.2.1 installation provides IP addresses to the 2 VLAN.

    I have Setup VLAN 1 and 2 switch, 2 port assignment in the VLAN 1 and VLAN 2 3 port (port 1 is the trunk and connects to the SRP).

    When I start the PC and the printer they get their correct addresses from VLAN respective (PC: 192.168.1.30 and printer: 192.168.2.30) but for the sake of Odin, I can't see the printer from the PC. ESP was Inter VLAN routing active. Moreover, the switch has address 192.168.1.2

    What I am doing wrong?

    Thanks for the ideas, you can provide.

    -Mike * start things in the Office *.

    No problem at all, don't send me an email. We can get something set up maybe tomorrow.

    -Tom
    Please mark replied messages useful

Maybe you are looking for

  • Calendar shows the wrong date in my dock

    The calendar in my dock icon is showing the date of December 30, yet when I open the app it shows today's date. How do I change so the icon displays the current date?

  • In the c# dll call problem

    Hello I am new to c#, but I have to write DLLs to LabVIEW that reads the information on windows processes. I prepared the code (work as a Win32 application), it built as a dll and call the library function to call it. I tried another code in C langua

  • 8630 ADF Duplex scanning

    Does anyone know if HP has changed the firmware in the 8630 allow ADF double face legal size analysis as previous OfficeJet Pro printers have before the firmware 8600 improved last year.

  • BlackBerry 10 what is the factory reset (erasing data) on the BB10 devices?

    Hi, I saw this article on the uselessness of resets factory Android. "Wipe factory" on Android devices is not actually get rid of your naked selfies - FierceCIO So my question is, are the BB10 factory resets any better?

  • BlackBerry Smartphones Q10 Wipe

    Well, something so simple turned into a nightmare! When I got my phone a couple of weeks, that my e-mail address has been struggling entered for the Blackberry ID, he didn't until I tried to download an application. So I called the customer service a