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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:36:14+00:00 2026-05-23T04:36:14+00:00

I have a piece of Actionscript code that Implements MovieClip. I don’t seem to

  • 0

I have a piece of Actionscript code that Implements MovieClip. I don’t seem to be able to get it to display in my application.

What I’ve tried:
1) Using the class directly in my code via UIObject and Sprite. I can create the UIObject, add the Sprite and then add an instance of the class. Nothing displays in my app.

2) Putting the class in as a flex library (swc). The compiler won’t let me import it or use it as a display object.

3) Putting the class in as a flex project (swf). The file runs fine stand alone but gives me the same “broken” icon when I try to use it in my app.

Im missing some key factor here. Suggestions?

EDIT: Got the add-in class to display via a library. It compiles to a .SWC file. Unfortunately it’s using the full screen as its ‘stage’ dimensions. The issue I was having before with it not being visible was actually (or so I think) that it was off the right side of the display window. I put break points in the drawing routines and could see that it was being refreshed. So now Im trying to get it to accept some dimensions.

  • 1 1 Answer
  • 1 View
  • 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-23T04:36:15+00:00Added an answer on May 23, 2026 at 4:36 am

    You can create a UIComponent instead of UIObject and add the movieclip to the UIComponent. I have always used UIComponent instead of UIObject and my sprite is always displayed correctly 🙂 mxml and code below:

    <mx:UIComponent>
        <mx:Yoursprite></mx:Yoursprite>
    </mx:UIComponent>
    

    or coded in actionscript:

    private function createSpriteInFlex():void
    {
        var _uiComponent:UIComponent = new UIComponent();
        addElement(_uiComponent);
    
        var _sprite:YourSprite = new YourSprite();
        _uiComponent.addChild(_sprite);
    }
    

    EDIT

    You can just add an mxml line like this.

    <com:myUIComponent width="100%" height="100%"></com:myUIComponent>
    

    So the myUIComponent is actually a class that you can code yourself. I will demonstrate how you can add a sprite or movieclip below:

    package com.myUIComponent
    {
        public class myUIComponent extends UIComponent
        {
            public function myUIComponent()
            {
                super();
    
                addEventListener(Event.ADDED_TO_STAGE, init);
            }
    
            private function init(e:Event):void
            {
                removeEventListener(Event.ADDED_TO_STAGE, init);
    
                //ADD YOUR SPRITE HERE
                var mySprite:YourSprite = new YourSprite();
                addChild(mySprite);
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a piece of code (below) that can get the text of an
I have a piece of code that was written by someone else before the
I have a piece of Python code that is supposed to open a new
Here's an interesting architectural query. I have a piece of code that needs to
i have piece of code that works fine on my local test server but
I have a piece of code that hides an element on mouseout. The code
I have below piece of code in my actionscript file (defined in a function)
I have a piece of Perl code for searchnig a directory and display the
I have piece of Code in Form that works: public class Form1 : System.Windows.Forms.Form
I have piece of code that works without making it a function. But, when

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.