• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling one mxml file from another

 
Neelima Mohan
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

Can we call 1 mxml from another mxml? How to we do it?
Any pointers to it would be much appreciated.

Thanks,
Neelima
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Create an instance of whatever component your mxml file defines and there you go.
 
Neelima Mohan
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 1 mxml file which contains couple of components...this is like 1 screen...on clicking the next button it should call another mxml with a different set of components like 2 textfield etc....how to implement this navigation?

Thanks,
Neelima
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What type do these mxml files define? Canvases? Panels? Applications?

 
Neelima Mohan
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
one file is 1 mxml with an application tag and a canvas within it. I want to call this mxml to call yet another mxml which again has a canvas details inside an application tag. this is to emulate a screen flow.

Visualize this requirement as a data entry form. On screenload the user types in data into the fields defined in the first mxml. There is a next button. On click of the next button the next mxml will be called and the fields defined in that second mxml gets displayed to the user. User types in the details and then finally clicks the save button to make a call to the service layer.

I am not able to get information on how to call 1 independent mxml from another mxml.

Thanks,
Neelima
 
Narender Reddy Soma
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think States would help, try googling Flex States.

and Inorder to call one mxml from another, you can do in two ways.

one is you can import the mxml as other class like Panel,Canvas etc and invoke method on it.
and another is compiling the dependant mxml and embed as local file.

Think which option would fit your requirement?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic