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,360 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Copy &  paste option in flex air application 20 871
Deleting Objects in flex 1 364
Can't get dispatchEvent to work when parent to talk to child AS3 3 548
Adobe Experience Manager 4 186
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…
There are many Password Managers (PM) out there to choose from. PM's can help with your password habits and routines, but they should not be a crutch you rely on too heavily. I also have an article for company/enterprise PM's.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

896 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now