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,357 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
Comment Utility
0
 
LVL 19

Expert Comment

by:Gary Benade
Comment Utility
include "[path]filename.as"
0
 
LVL 23

Expert Comment

by:Siva Prasanna Kumar
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How popular is Java FX these days? 5 327
flex4 : css styles 1 475
How width columns automaticaly 4 401
how can i learn adobe flex step by step 4 80
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…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 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

11 Experts available now in Live!

Get 1:1 Help Now