Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6138297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:51:17+00:00 2026-05-23T17:51:17+00:00

I wrote a flex demo, customized spark TextInput skin with rounded corners and a

  • 0

I wrote a flex demo, customized spark TextInput skin with rounded corners and a search icon in it, like mac os x search box, it’s running good in browsers (by Flash Player browser plug-in) either .html or .swf, but error by flash player directly.

the error:

ReferenceError: Error #1056: Cannot create property allowCodeImport on flash.system.LoaderContext.
    at mx.core::CrossDomainRSLItem/completeCdRslLoad()
    at mx.core::CrossDomainRSLItem/itemCompleteHandler()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

there is the test demo, includes source: http://www.ycoder.com/wp-content/uploads/2011/07/CustomComponentSkinTest.zip

CustomTextInput

package component{
    import skin.CustomTextInputSkin;
    import spark.components.TextInput;
 
    [Style(name="icon", inherit="no", type="Object")]
    [Style(name="radius", inherit="true", type="Number")]
 
    public class CustomTextInput extends TextInput{
        [Embed(source="/images/search.png")]
        private const defaultIcon:Class;    
 
        public function CustomTextInput(){
            super();
            this.setStyle('icon', defaultIcon);
            this.setStyle('radius', 10);
            this.setStyle("skinClass", CustomTextInputSkin);
        }
    }
}

CustomTextInputSkin

<!-- border -->
 <!--- @private -->
 <s:Rect left="0" right="0" top="0" bottom="0" id="border" radiusX="{hostComponent.getStyle('radius')}" radiusY="{hostComponent.getStyle('radius')}" >
     <s:stroke>
         <!--- @private -->
         <s:SolidColorStroke id="borderStroke" weight="1" />
     </s:stroke>
 </s:Rect>
 
 <!-- fill -->
 <!--- Defines the appearance of the TextInput component's background. -->
 <s:Rect id="background" left="1" right="1" top="1" bottom="1" radiusX="{hostComponent.getStyle('radius')}" radiusY="{hostComponent.getStyle('radius')}" >
     <s:fill>
         <!--- @private Defines the background fill color. -->
         <s:SolidColor id="bgFill" color="0xFFFFFF" />
     </s:fill>
 </s:Rect>
 
 <!-- shadow -->
 <!--- @private -->
 <s:Rect left="1" top="1" right="1" height="1" id="shadow" radiusX="{hostComponent.getStyle('radius')}" radiusY="{hostComponent.getStyle('radius')}" >
     <s:fill>
         <s:SolidColor color="0x000000" alpha="0.12" />
     </s:fill>
 </s:Rect>
 <s:HGroup id="textGroup" gap="0" height="100%" paddingLeft="4" paddingRight="4">
     <!-- icon -->
     <s:Image id="icon" includeIn="normal" x="0" y="0" source="{hostComponent.getStyle('icon')}" verticalAlign="middle" height="100%"/>
     <!-- text -->
     <!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay -->
     <s:RichEditableText id="textDisplay"
                         verticalAlign="middle"
                         widthInChars="10"
                         left="1" right="1" top="1" bottom="1"  height="100%"/>
 </s:HGroup>

test case

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               xmlns:component="component.*"  >
    <s:VGroup paddingLeft="20" paddingTop="20">
        <s:TextInput />
        <component:CustomTextInput  />
        <component:CustomTextInput  radius="12" icon="images/device.png" text="ABC Test ... hohoho" editable="false" />
    </s:VGroup>
</s:Application>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:51:17+00:00Added an answer on May 23, 2026 at 5:51 pm

    The reason is: Flex SDK 4.5 support only flash player 10.2+, and my standalone flash player version is 10.0., my flash player plug-in version is 10.2.. thinks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I skin alert box in flex 4? I am not interested in
I've been working on a Flex component and I'd like to write some automated
I wrote a flex application that get the host string from the browser using
I wrote a trivia game in Flex (flash). The site is written entirely in
If you add an Accordion navigation component to Flex Application, like this: <mx:Accordion x=14
I just wrote a Flex app which handles some Wikipedia text content as strings.
I am having trouble in using flex. I wrote a C file happy.c as
An application I wrote for a client almost 2 years ago using Flex 2
I wrote a simple assembler using flex and bison . It worked perfectly until
How i write the inline conditional statement in Flex with two expressions(case) like text={expression,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.