Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Flex > Flex 2 & 3

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-03-2009, 08:27 AM   #1
pradeepptp
Registered User
 
Join Date: Aug 2009
Posts: 25
Default can implement constructor in mxml

Hi all,

This is pradeep,
i have little bit confuse is
when we create mxml component mycanvas extends like canvas
in actionscipt we can write a constructor for mycanvas
but in case of mxml if i write in the script tag it shows an error.

Please let me know the bottom line of this core conecpt.

Regards,
Pradeep.
pradeepptp is offline   Reply With Quote
Old 11-03-2009, 10:06 PM   #2
flexexplorer
Registered User
 
Join Date: Aug 2009
Posts: 23
Default

You can't write a constructor inside an MXML file, because Flex adds one of its own. If you need to pass parameters to your MXML, consider creating public setters of variables in the MXML.
flexexplorer is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:58 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.