5 Replies Latest reply on Jun 7, 2007 12:05 PM by peterent

    Flash symbol in Flex

    jimmy5804
      Following the instructions, I've been able to take a Flash symbol/class, convert it to a Flex component, and import into Flex. However, while the following code compiles without errors, nothing shows up on the display. I'm sure I'm probably doing something dumb, but I've searched and worked on this for several hours now without luck. Thanks to anyone who can point me in the right direction.


      <?xml version="1.0" encoding="utf-8"?>
      <mx:ApolloApplication xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns:bevy="*">
      <bevy:RedCircle id="please"/>
      </mx:ApolloApplication>
        • 1. Re: Flash symbol in Flex
          peterent Level 2
          I'd have to see your Flash file and any ActionScript code that goes with it to know what's really happening. Some things to check are:

          Is the RedCircle symbol's (0,0) in its upper-left corner?
          Do you have boundingBox symbol in RedCircle and if so, it is registered to (0,0). If you don't have a boundingBox symbol, don't put one in just yet. It also doesn't have to be at (0,0), just positioned properly.

          By 'nothing shows up on the display' do you mean you don't see it when you run your Flex app or that you don't see it in Design View in Flex Builder? It won't show up in Flex Builder 2's Design View.

          • 2. Re: Flash symbol in Flex
            jimmy5804 Level 1
            It's not showing up in the run or debug windows.

            I made sure the registration point is upper left. I also made sure the component name and .swc file aren't the same name since someone reported problems with that. The .as file is about as basic as you can get:

            package {

            import mx.flash.UIMovieClip;

            public class RCircle extends UIMovieClip {
            }
            }

            I'd attach the .fla if there was a way to do it, but it's about as basic as you can get too. I'm sure I'm doing something dumb, but I'm at a complete loss after spending a lot of time on this. Thanks for your help.
            • 3. Re: Flash symbol in Flex
              peterent Level 2
              Let's start at the beginning then. You made a symbol called RCircle - that's the way it shows up in your FLA's library. You selected it and picked "Make Flex Component" from the Flash menu. This modified its properties so that its exported name is RCircle. Then you picked the File->Publish function to build the SWC.

              Since your class name is RCircle you should use it as <bevy:RCircle xmlns:bevy="*" />

              Does that all make sense?
              • 4. Flash symbol in Flex
                jimmy5804 Level 1
                I think so. I think I have that all right. I'm declaring the namespace in the original mx:ApolloApplication tag as you can see in the code I pasted in my first post - is that sufficient? Flex Builder prompted me for RCircle when I typed Bevy, so I'm pretty sure it can see it and it compiles it just fine... just doesn't show up when I run it.

                Other information: the RCircle symbol was exported to AS and associated with the RCircle class before it was exported to Flex. The .swc, .swf, and .fla are all named FlComponents and are in the same directory as the main project .mxml files. I also explicitly imported the .swc into the project using project->properties->... I'm using the eval version of FlexBuilder upgraded to 2.01 if that matters.

                Also, I can take the Hello World app and plug the bevy line right into the middle of it and create a .air that runs fine - except that it doesn't show my symbol.
                • 5. Re: Flash symbol in Flex
                  peterent Level 2
                  Why don't you send me your FLA - I'd like to find out what's happening and may be it might be something others will run into: pent@adobe.com