Solved

My Flex 3 main.mxml code is getting very messy, is there a "include" in flex3 so I can seperate my code in several files?

Posted on 2007-11-21
5
2,361 Views
Last Modified: 2009-02-12
My Flex 3 main.mxml code is getting very messy, is there a "include" in flex3 so I can seperate my code in several files?

Like php INCLUDE.
0
Comment
Question by:Octalys
  • 2
  • 2
5 Comments
 
LVL 23

Assisted Solution

by:Siva Prasanna Kumar
Siva Prasanna Kumar earned 100 total points
ID: 20329259
0
 
LVL 19

Expert Comment

by:Gary Benade
ID: 20329272
include "[path]filename.as"
0
 
LVL 23

Expert Comment

by:Siva Prasanna Kumar
ID: 20329279
As Far As I know there is nothing like include in Flex 2.

The only way to achieve such thing is to use custom components check

http://www.adobe.com/devnet/flex/quickstart/building_components_in_mxml/
0
 
LVL 19

Accepted Solution

by:
Gary Benade earned 150 total points
ID: 20329302
Or you can move your actionscript into external files and include like
<mx:Script source="Box.as" />

0
 

Assisted Solution

by:Vype
Vype earned 150 total points
ID: 20372628
You can save your code elements as components in flex, to do this select the code snippet you want to separate and goto File> new Flex Component and copy the code in and then save as whatever you want the component to be named as, for instance Form.mxml.

to include you component you just use the keyword 'import' and then your file name (depends on where its stored)

so for example if your components where stored in a folder called forms your import would be

import forms.myform;


I hope this helps.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
This article outlines why you need to choose a backup solution that protects your entire environment – including your VMware ESXi and Microsoft Hyper-V virtualization hosts – not just your virtual machines.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question