Answers to questions about user-defined flex Components

Source: Internet
Author: User
Message content:It's about mxml (this is what we call it). I can see that there is a flexstore In the flex store example. checkout is embedded in mxml. mxml, productdetail. mxml and cartview. I have read the code several times for three mxml files. I don't find any ID or file name that can be used as an embedded symbol. I only know that it is in <mx: canvas>, I copied the Code as it is, but it cannot achieve the same effect.

Checkout. mxml, productdetail. mxml, and cartview. mxml are custom components in flex. they define their own functional features, which is equivalent"Class"Design, and embed these three components in flexstore. in the mxml file, the flexstore object (flexstore. mxml) uses the object instances of the preceding three component classes. Of course, the objects are generated at runtime.

For example, the namespace of the Flex standard canvas class used by <mx: canvas> is MX, so the class is marked with <mx: canvas>, if there are multiple such tags, you can use IDs to differentiate references. Custom components, such as checkout. mxml, you can use the <checkout/> flag. In this case, make sure that the flex runtime finds checkout. mxml file (or class library, custom components can be in other forms. as, or compiled class libraries), you can copy the class library to the FLEX system directory WEB-INF \ flex \ user_classes, or the same directory as the reference file (usually this way ), in addition, a custom component (that is, a custom class) can have a namespace. The <checkout/> label does not have a namespace. Therefore, you must add the namespace path to the referenced file, for example, <mx: Application xmlns = "*"> is equivalent to import *;

The above statement may be a bit ambiguous and I don't know if it can meet your requirements! Please leave a message. Thank you for your support.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.