Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
2,369 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 23

Assisted Solution

by:Siva Prasanna Kumar
Siva Prasanna Kumar earned 400 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 600 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 600 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

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…
Read on to get a few ideas on how to promote your next corporate event.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

704 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