Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
meekgeek #1
Problem including mxml code
I want to keep my code clean and I would like to include my code in other
seperate files.
What would be the mxml script equivalent of an actionscript #include?
I tired placing
<Mypage />
in my code that would refrence Mypage.mxml, but I get a URI error.
Am I doing this wrong?
meekgeek Guest
-
How does on Sharing data between main.mxml and a renderer.mxml
I have a value set in my main mxml file. public var calDate:Date = new Date(); How can I use this value in my renderer mxml file? if... -
Need "View States/Transitions" tutorial MXML code
Hello Flexers, I've been going through the Flex tutorials and have hit a roadblock in the 4th tutorial. I need the full MXML source code for the... -
including php code
hi ist it possible to include php code in an swf, so that i can build up/change an dynamic link online? alex -
Can I embed external MXML in another MXML file?
Hi - I'm new to this so please bear with me. I'm trying to do something like you do in JSP's with a JSP include where I can import prewritten code... -
Problem with including a header
I have the following file structure: / header.asp test.asp /subDir testpage.asp /images I would like to have header.asp to be usable from... -
Jason R. Weiss #2
Re: Problem including mxml code
meekgeek wrote:
<Mypage xmlns="*"/> will read it in from the root level. Remember, Flex> I want to keep my code clean and I would like to include my code in other
> seperate files.
>
> What would be the mxml script equivalent of an actionscript #include?
>
> I tired placing
>
> <Mypage />
>
> in my code that would refrence Mypage.mxml, but I get a URI error.
>
> Am I doing this wrong?
>
is all about XML namespaces.
HTH,
Jason
--
Jason Weiss
Cynergy Systems, Inc.
Macromedia Flex Alliance Partner
[url]http://www.cynergysystems.com[/url]
Email: [email]jason.weiss@cynergysystems.com[/email]
Office: 866-CYNERGY
Mobile: 1.832.444.2246
Jason R. Weiss Guest
-
meekgeek #3
Re: Problem including mxml code
Thank you for your reply.
I had the files under my /flex folder. Would the root level be the one on top
of that?
Also could you point me to some more info on xml namespaces?
Any help would be greatly appreciated.
meekgeek Guest
-
ntsiii #4
Re: Problem including mxml code
I believe in this context, "root" means the current folder, the one the
application mxml file is in.
You CAN use <mx:Script source="myFile.as" /> to include an actionscript file,
but I do not reccomend it because of the 32k limit issues.
Instead, create a "helper class" with the AS code in it. I typically have one
for UI manipulation and one for data-oriented stuff. then, in the mxml file,
do:
<UIFunc id="ui" app={this}.../>
And access your helper class members:
ui.myPublicFunc();
ui.myPublicVariable;
Note I am passing a reference to the application scope into the class to make
it easier to work with app-level members in the helper class. To do this,
declare a public variable typed as the application name:
public var app:MyAppFileName;
Tracy
ntsiii Guest
-
meekgeek #5
Re: Problem including mxml code
Ok, I found this. I think this might answer my question and anybody else that was wondering too.
[url]http://www.cflex.net/showfiledetails.cfm?ChannelID=1&Object=File&object ID=291[/url]
meekgeek Guest



Reply With Quote

