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 6604951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:13:30+00:00 2026-05-25T19:13:30+00:00

I have AS3 script bitfade.text.steel returning type Sprite. It works in Flash environment but

  • 0

I have AS3 script bitfade.text.steel returning type Sprite. It works in Flash environment but not in FLEX. In Flex it displays nothing. No errors appear. It looks like the attached code also works. I use Flex SDK 4.5

Can you give me a clue what the problem with this code might be?

English is not my native language.
If there are any errors please correct me.

Chris

<?xml version="1.0" encoding="utf-8"?>                                                                              
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"                                                     
                xmlns:s="library://ns.adobe.com/flex/spark"                                                         
                xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"                            
                creationComplete="creationComplete();" >                                                            
    <fx:Declarations>                                                                                               
        <!-- Place non-visual elements (e.g., services, value objects) here -->                                     
    </fx:Declarations>                                                                                              
    <fx:Script>                                                                                                     
        <![CDATA[                                                                                                   
            import bitfade.text.steel;                                                                              
            import flash.display.Sprite;                                                                            
            import mx.core.UIComponent;                                                                             

            function creationComplete(){                                                                            
                var textSteel = new steel("config.xml");                                                            
                if(textSteel is Sprite){                                                                            
                    trace("it is a sprite");                                                                        
                }                                                                                                   
                //var textSteelName:String = getQualifiedClassName(textSteel);                                      
                //trace(textSteelName);                                                                             
                textSteel.x = 150;                                                                                  
                trace("this is visible on the screen");                                                             
                var sprite:Sprite = new Sprite();                                                                   
                sprite.graphics.beginFill(0xFFCC00);                                                                
                sprite.graphics.drawCircle( 40, 40, 40 );                                                           
                sprite.graphics.endFill();                                                                          

                var wrapper:UIComponent = new UIComponent();                                                        
                wrapper.addChild(sprite);                                                                           
                wrapper.addChild(textSteel);                                                                        
                animationStage.addElement(wrapper);                                                                 
            }                                                                                                       
        ]]>                                                                                                         
    </fx:Script>                                                                                                    
    <s:Group id="animationStage" visible="true" x="50" y="50">                                                      
        <s:Label text="test">                                                                                       

        </s:Label>                                                                                                  
    </s:Group>                                                                                                      
</s:WindowedApplication>                                                                                            
  • 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-25T19:13:31+00:00Added an answer on May 25, 2026 at 7:13 pm

    If I switch your custom class to a Sprite, and draw something on it, it shows up. Therefore I Believe there is a bug within your steel class. A sprite won’t have any size until something is inside it with a size. There is no indication of the code you’ve shown what happens inside your steel class.

    My sample:

    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                           xmlns:s="library://ns.adobe.com/flex/spark" 
                           xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="creationComplete();">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
    
        <fx:Script>                                                                                                     
            <![CDATA[                                                                                                   
    //          import bitfade.text.steel;                                                                              
                import flash.display.Sprite;
    
                import mx.core.UIComponent;                                                                             
    
                public function creationComplete():void{                                                                            
                    var textSteel : Sprite = new Sprite();                                                            
                    if(textSteel is Sprite){                                                                            
                        trace("it is a sprite");                                                                        
                    }                                                                                                   
    
                    //var textSteelName:String = getQualifiedClassName(textSteel);                                      
                    //trace(textSteelName);                                                                             
                    textSteel.x = 150;                                                                                  
    
                    // JH Code added new
                    textSteel.graphics.beginFill(0xFFCC00);                                                                
                    textSteel.graphics.drawRect(0,0,100,100);                                                           
                    textSteel.graphics.endFill();                                                                          
    
                    trace("this is visible on the screen");                                                             
                    var sprite:Sprite = new Sprite();                                                                   
                    sprite.graphics.beginFill(0xFFCC00);                                                                
                    sprite.graphics.drawCircle( 40, 40, 40 );                                                           
                    sprite.graphics.endFill();                                                                          
    
                    var wrapper:UIComponent = new UIComponent();                                                        
                    wrapper.addChild(sprite);                                                                           
                    wrapper.addChild(textSteel);                                                                        
                    animationStage.addElement(wrapper);                                                                 
                }                                                                                                       
            ]]>                                                                                                         
        </fx:Script>                                                                                                    
        <s:Group id="animationStage" visible="true" x="50" y="50">                                                      
            <s:Label text="test">                                                                                       
    
            </s:Label>                                                                                                  
        </s:Group>      
    
    </s:WindowedApplication>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i don't have intellisense when writing AS3 script in flash cs4, and it's only
I have a working mic recording script in AS3 which I have been able
I'm having trouble with a XMLSocket script in AS3. I have a java server
I have two requirements, and im not sure is those things possible in AS3.
We have a Flash app (AS3). This is a desktop application that runs in
I have an AS3 class on my Flex project: package system { import mx.managers.PopUpManager;
I have a AS3 swf [1] that is loading another AS2 swf [2] which
Many library classes in AS3 have read only properties. Is it possible to create
In AS3 you have a function on a string with this signature: function replace(pattern:*,
I'm new to AS3 and have been working on an XML driven navigation system

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.