I have never had a need to have multiple files in a project but now i do and i have no idea the corect way to do it.
I have my main flex project file "test.xmxl" which contains the code below.
What i would like to do is create another file say "otherfile.???". So that what i want to do specifically is only in that file and not done in test.xmxl.
Two things come to mind.
#1) what is the name of the new file i would make. is it a XMXL Application, Component, Module or Action Script File, Class ?
#2) When i do make this new file how can i deal with items that are in test.xmxl file from otherfile.???
I.E. in test i have a TextArea, but i want to be able to change that text from within otherfile.??? how is that done ?
<?xml version="1.0" encoding="utf-8"?>
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
protected function button1_clickHandler(event:MouseEvent):void
<!-- Place non-visual elements (e.g., services, value objects) here -->
<s:Button x="424" y="239" label="Button" click="button1_clickHandler(event)"/>
<s:TextArea id="mytext" x="574" y="92"/>
I think you want MXML Component. Then copy and paste what you need from other files.
Tried that but did not work. Its like its does not know that the function is in antoher file.
Each MXMLComponent is separate class. You may need a reference to an instance of the class to call a public function in it.