Flash symbol in Flex

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>

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.

Similar Messages

  • Using Flash 8 Symbols in Flex

    Hi,
    I am creating some custom controls whose interface is a bit
    complicated (and hence would be far too much of an effort to create
    using graphics.draw methods). So I tried building the user
    interface as Flash 8 symbols. What I do is,
    - Create the symbols in Flash 8
    - Embed them in my Custom Control class
    - Create instances of the embedded class as a SpriteAsset
    object
    - Add it to the childrens list of my control class so that it
    is drawn
    So far, so good.
    The slight issue is that I also need to allow the user to
    modify the custom control interface (line color, fill color etc.)
    and I cant figure out how I can modify these properties on the
    Flash Symbol through the SpriteAsset class.
    Any ideas....

    The short answer is you can't do that. Flash 8 is
    ActionScript 2 while Flex 2 is ActionScript 3. When ActionScript 2
    is loaded into the Flash Player it is put into a separate virtual
    machine than the ActionScript 3 code. This is how the Flash Player
    maintains backward compatability. There isn't a way for the AS3
    code to reach in and tinker with the AS2 code and vice-versa.
    But all is not lost. You can use LocalConnection to
    communicate between the two virtual machines. Check my blog,
    there's an article about doing that:
    Using
    ActionScript 2 SWFs with Flex 2

  • Importing flash symbols from an external SWF using URLrequest

    Hello.
    I'm trying for several days now to properly import flash symbols into a flex application.
    i can't only @Embed because the swf file that contains the skins will not be available locally so i need to use URLRequest.
    This is what I've got so far.
    1. I created a flash file, lets call it foo.swf that contains several elements in the library and each element has both `Export for ActionScript` and `Export for runtime sharing` on. one of the elements is called 'test' which is a movieclip of an image.
    2. i created a flex project that creates the swf flashSkins.swf that contains the following Wrapper class:
            package
                import flash.display.Sprite;
                    public class Wrapper extends Sprite
                     [Embed(source="foo.swf",symbol="test")]
                        [Bindable]public static var test: Class;
    I tested to make sure that this class properly fetchs symbols from the flash file properly
    using the following code:
        <fx:Script>
            <![CDATA[
                public var wrapper:Wrapper;
            ]]>
        </fx:Script>
            <mx:Image source="{Wrapper.test}"/>
    it loads the image and shows it properly.
    3. I created another swf file that will fetch the flashSkins swf and import the Wrapper class from it. this is where i fail.
            public function loadSkins():void
                    bgLoader = new Loader();
                    var bgURL:URLRequest = new URLRequest('http://files.xpogames.com/flashSkins/flashSkins.swf');
                    bgLoader.contentLoaderInfo.addEventListener(Event.INIT,onLoaded);
                    bgLoader.load(bgURL);
                public function onLoaded(e:Event):void {
                    var clazz:Class = bgLoader.contentLoaderInfo.applicationDomain.getDefinition('Wrapper') as Class;
                    var a:Object = new clazz();
                    theimage.source=a.test;
            ]]>
          </fx:Script>
            <mx:Image id="theimage" />
    I tried using getDefinition with 'wrapper' or 'Wrapper' but on both cases i get an error that the variable is not defined.
    any ideas?

    Did you try using the Event.COMPLETE instead of Event.INIT?

  • Import Flash components into Flex

    Hy,
    I'm trying to create an AIR application. Until now I've watched and read a lot of tutorials but none had the answer I was looking for. So I have a few animations made in Flash as MovieClip symbols. They should react depending on the user's intentions. How can I import those symbols and control them with "gotoAnd" commands (i know how to use the AS in Flex but not how to import animations)? I'm starting to think Flex can't do this because I only found about skins or images or things not even close to what I want. If you know a way I would really apreciate a nice tutorial or a code sample.
    Many thanks !

    I think that what you're looking for is the Flex Component Kit for Flash CS3.
    By installing this kit you are able to export any movie clip from flash as a flex component.
    Then, you have full access to the objects inside the component by writing code in your Flex application.
    you can find it here : http://www.adobe.com/go/flex3_cs3_swfkit

  • Flash Symbol w/ filters + spark parents + Fade effect bug

    I've come across an interesting bug which I've narrowed down to a combination of:
    • Flash symbols containing 1 or more Filters (defined in the Flash IDE)...
    • Parented within certain Spark components (ex. symbol in Group that's in another Group)...
    • Modified by an effect like spark.effects.Fade
    What you see when you combine those elements above is a 1-frame, fully-opaque flicker after the Fade has completed (if fading out) or before it begins (if fading in). This flicker is noticeable and obviously not an intended part of the animation.
    Here's a small test project that reproduces what I'm talking about. If you change the VGroup component to a VBox the flicker stops happening (at least for me). The same is true if you remove the middle DataGroup component. (The bug may not stop altogether but it does occur less frequently in that case.)
    Application.mxml
    <?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:local="*">
         <fx:Script>
              <![CDATA[
                   import mx.collections.ArrayCollection;
              ]]>
         </fx:Script>
         <fx:Declarations>
              <s:Sequence id="sequence">
                   <s:Fade target="{ vbox }" alphaTo="0" />
                   <s:Fade target="{ canvas }" alphaTo="1" />
                   <s:Fade target="{ canvas }" alphaTo="0" />
                   <s:Fade target="{ vbox }" alphaTo="1" />
              </s:Sequence>
         </fx:Declarations>
         <!-- If you replace the VGroup with a VBox, this bug does not show itself. -->
         <s:VGroup id="vbox" horizontalAlign="center" horizontalCenter="0" verticalCenter="0">
         <!--<mx:VBox id="vbox" horizontalAlign="center" horizontalCenter="0" verticalCenter="0">-->
              <!-- Changing this DataGroup to a regular Group lowers the frequency of the bug, but it still occurs. -->
              <s:DataGroup id="dataGroup" dataProvider="{ new ArrayCollection( [ BasicSymbol, SymbolWithGlow, SymbolWithBevel ] ) }">
                   <s:layout>
                        <s:HorizontalLayout verticalAlign="middle" />
                   </s:layout>
                   <s:itemRenderer>
                        <fx:Component>
                             <local:DataGroupItemRenderer />
                        </fx:Component>
                   </s:itemRenderer>
              </s:DataGroup>
              <s:Button label="Play" click="sequence.play()" />
         <!--</mx:VBox>-->
         </s:VGroup>
         <mx:Canvas id="canvas" width="200" height="200" horizontalCenter="0" verticalCenter="0" backgroundColor="0xCC6600" mouseEnabled="false" alpha="0" />
    </s:Application>
    DataGroupItemRenderer MXML
    <?xml version="1.0" encoding="utf-8"?>
    <s:ItemRenderer autoDrawBackground="false" width="70" height="70"
                    xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx">
         <fx:Script>
              <![CDATA[
                   override public function set data( value:Object ):void {
                        super.data = value;
              ]]>
         </fx:Script>
         <mx:Image source="{ data }" />
    </s:ItemRenderer>
    In addition to the below MXML, I am also happy to provide the FLA that I've created the symbols in as well as a video demonstrating the glitch. (I will try to attach the video as a follow-up comment.)

    Suppose not.
    Defect created: https://bugs.adobe.com/jira/browse/SDK-30475

  • Is this a bug in Flash Player or Flex?

    Compile and run this code (it is generated when you select New MXML Application) with FlashBuilder4.5:
    <?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" minWidth="955" minHeight="600">
    <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    </s:Application>
    If you are using IE, you will see a blue player control panel. But there should be nothing displayed because there is no
    visual components in the code above.
    If you are using FireFox, there is nothing displayed.
    Same behaves for mx:Application.
    I think it is a bug with Flash Player or Flex. How can Flex behave differently with different browsers?

    This is what I see in IE 9.0.8112.16421, but not in FF.

  • How to Edit Flash Symbol in Photoshop?

    In Flash CS4, I have a graphic of a long filmstrip with 24 pix in it. I need to edit the symbol in photoshop (to put all new pix in), and then replace the current filmstrip with the new filmstrip. How? This is CS4, not CS5.

    Add an image to a folder with your fla, image folder(with image inside) and then re import image to stage again then try 'EDIT' the file!
    Date: Sat, 24 Sep 2011 13:31:35 -0600
    From: [email protected]
    To: [email protected]
    Subject: How to Edit Flash Symbol in Photoshop?
        Re: How to Edit Flash Symbol in Photoshop?
        created by sneedbreedley in Flash Pro - General - View the full discussion
    Whe nI double click on the image, a Bitmap Properties window opens with no option to edit. When I right-clcik on the image and select Edit With and choose photoshop, an error message appears saying The file G:\web-02\Site\film120902.gif does not exist, uable to launch external editor.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/3936238#3936238
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/3936238#3936238. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Flash Pro - General by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Too small window size in standalone flash player in FLEX

    Hello,
    I have unchecked the option "generate html wrapper file" so I
    don't have to bother about closing the browser tab each time I make
    a small change to the code and rerun the application.
    This works fine as the standalone flash player closes when I
    terminate the application from Flex. However, the standalone flash
    player always starts in a fixed window size smaller than my
    application size so that I cannot see the whole application. So I
    have to enlarge the window size of the standalone flash player each
    time which is annoying!
    Is there a better solution?
    Maybe get Flex to close the browser tab after I terminate the
    application. I still prefer to use the standalone flash player
    during development as my application doesn't depend on the browser
    though.

    Adobe Newsbot hopes that the following resources helps you.
    NewsBot is experimental and any feedback (reply to this post) on
    its utility will be appreciated:
    Flex 3 - About the Flex development tools:
    Adobe Flex Software Development Kit (SDK) primarily provide
    XML files that you use ... When you use the debugger version of
    Flash Player or start your AIR
    Link:
    http://livedocs.adobe.com/flex/3/html/building_overview_2.html
    Adobe - Flex 3:
    While Flex applications can be built using only the free Flex
    SDK, developers can use ... Alert This content requires Flash.
    Download Flash Player now
    Link:
    http://www.adobe.com/products/flex/
    Flex.org - Rich Internet Application Development:
    I would like to extract data from my Flex application to a
    CSV file for loading into Excel. However, the current Flash player
    does not allow direct access
    Link:
    http://flex.org/
    Adobe - Flex Developer Center:
    Supports visual and code-centric development, code hinting,
    visual debugging, and so forth. Includes the Flex 3 SDK and Flash
    Player 9.
    Link:
    http://www.adobe.com/devnet/flex/
    moockblog: Flash Player 9, Flex 2, ActionScript 3.0: A Survey
    of:
    Flash Player 9's main new feature is full support for
    ActionScript 3.0 (but older ... Flex Builder 2 also includes a
    development framework known as the Flex
    Link:
    http://www.moock.org/blog/archives/000189.html
    Disclaimer: This response is generated automatically by the
    Adobe NewsBot based on Adobe
    Community
    Engine.

  • Flash Builder and Flex 4 Press Coverage

    Could someone post some links to some of the  BIG BANG press coverage of the Flash Builder and Flex 4 releases ?

    What is an example of the code that is the source of the error?

  • Attaching movieClip from Flash(SWF) to Flex

    Hi,
    Please tell me -'How to attach movieClip of Flash file in
    Flex Application ?'
    I shall be very thankful to you
    Hoping for a favorable reply
    Thanks in Advance

    Use the Flex component kit for Flash.
    https://www.adobe.com/cfusion/entitlement/index.cfm?e=flex_skins

  • Does [Embed(source="assetname")] work in Flash or just Flex?

    Does [Embed(source="assetname")] work in Flash or just Flex?
    Thanks!

    Thanks for the link.  But that sucks.  When I import a mp3 file into the flash library there is a slight delay when it loops.  But if I bring in a AIFF file into the library and let Flash encode it then there is no delay.  I was hoping to not have to have Flash encode my music loops every time I test my game.  Many game sites don't want external assets, everything has to be in one swf.  I could load external swfs with linked music loops, but like I said, most game sites want everything in one swf.  I wish Adobe would either fix this very old loop bug or allow the flash IDE to use Embed : (

  • How to display rich content with URL in adobe flash builder and flex for mobile apps?

    Hi,
      In Apple IOS SDK, I used the WebView control to display the rich text with Bullets, different font style, images within the text and the URLs also within the text as HTML content.
    Clicking on the URLs automatically opens the respective webpage in Safari.
    In Adobe Flash Builder, I don't see any control straight away equivalent to Apple WebView control.
    How to implement the same using adobe and flex?

    Thanks for your reply, its nice to know its not just me.
    the error i got when submitting to the App store where due to native support for IPHONE 5 which is now mandatory (from May 1st), looking around the internet the common soloution seemed to be upgrading to Air 3.7.
    The strange erorrs on 3.7 revolve around compiling a standard / production build (fast build works fine)
    the error is always the same (snippet shown below):
    Error occurred while packaging the application:
    Undefined symbols for architecture armv7:
      "__ZN7avmplus8Debugger9debugLineEi", referenced from:
          __ZN7avmplus9MethodEnv9debugExitEPNS_13CallStackNodeE in AOTBuildOutput-4.o
          __ZN7avmplus11BaseExecMgr22debugEnterExitWrapperNEPNS_9MethodEnvEiPj in AOTBuildOutput-4.o
    I have completly failed to work out why, but my gut feeling is its something to do with how the mac is compiling the code in standard build and unable to find a library it needs.
    cheers
    Toby

  • Developing Iphone App using Flash Builder and Flex Air Mobile

    I started developing an Iphone app using the trial version of Flash Builder and was pretty impressed with how easy it was, then i hit problems:
    Trying to submit my app, I was getting invalid binary, using google i tracked this down to a change in the Apple App Store meaning that all apps needed to have native iphone 5 support, which meant updating to Air SDK 3.7
    Updating to AIR SDK 3.7 was a nightmare (mainly as a result of my failure to read the small print)
    Once I got SDK 3.7 to  work with flash builder / flex mobile i though i was there.
    However now i can produce a fast build but everytime i try and produce a standard / production build i get strange errors (air 3.8 does the same).
    My Question is - before i actually buy Flash Builder has anybody actually achieved the following:
         Building an Iphone App using:
         Flash Builder 4.7    (running on OSX)
         Flex Mobile 4.6
         Air 3.7
    If so how ?
    cheers
    Toby

    Thanks for your reply, its nice to know its not just me.
    the error i got when submitting to the App store where due to native support for IPHONE 5 which is now mandatory (from May 1st), looking around the internet the common soloution seemed to be upgrading to Air 3.7.
    The strange erorrs on 3.7 revolve around compiling a standard / production build (fast build works fine)
    the error is always the same (snippet shown below):
    Error occurred while packaging the application:
    Undefined symbols for architecture armv7:
      "__ZN7avmplus8Debugger9debugLineEi", referenced from:
          __ZN7avmplus9MethodEnv9debugExitEPNS_13CallStackNodeE in AOTBuildOutput-4.o
          __ZN7avmplus11BaseExecMgr22debugEnterExitWrapperNEPNS_9MethodEnvEiPj in AOTBuildOutput-4.o
    I have completly failed to work out why, but my gut feeling is its something to do with how the mac is compiling the code in standard build and unable to find a library it needs.
    cheers
    Toby

  • Develop Flash Movies in Flex ?

    Hi there,
    is it possible to develop 'classic' Flash movies just with
    Flex?

    It is
    possible but I wouldn't want to do it. Here's an example.
    Suppose you want to make a butterfly move around and flap its
    wings.
    In Flash, you've create a symbol for each wing and one for
    the butterfly body. Then you'd create a Butterfly MovieClip in
    which you animate the wings flapping using the timeline and
    keyframes.
    To move about the screen you place the Butterfly on one layer
    and create a guide layer for it. On the guide layer you'd use the
    Pencil tool to make an eratic line. The Butterfly will follow this
    line, flapping its wings as it goes.
    To do that in Flex would be quite an undertaking. You'd have
    to work with the ActionScript drawing commands (moveTo, drawTo) to
    make wings and the body. Then you'd have to figure out how to use
    the TweenEffect to get the wings to move correctly. Then you'd have
    to figure out some algorithm for moving it around the screen.
    I'd say the Flash version could be done in an afternoon or
    less. The Flex way - who knows?

  • Loading purchased swf into Flash Builder 4 Flex app

    I have purchased a Flash "fundraising thermometer" from an online Flash components site. It takes input from an xml file and displays a thermometer with the goal at the top and the current amount raised indicated. It came with the following files:
    thermometer.swf
    thermometer01.fla
    thermometer01.html (A sample that works.)
    xml/thermometer.xml (The source file: goal amount, current amount, mark interval, etc.)
    caurina/transitions (Mostly .as files.)
    Since the test html (thermometer01.html) works fine, I thought this would be a no-brainer.
    I first unzipped the files into a "thermometer" folder in my current project. I then went into Flash Builder and created a SWFLoader object as follows:
    <mx:SWFLoader 
    id="myLoader" source="../thermometer/thermometer.swf" complete="initThermometer();" autoLoad="true" scaleContent="false"/>\
     private function initThermometer():void { 
         Alert.show('Thermometer loaded');
    The Design view looks fine. I can see the thermometer default image (see below).
    When I run the app, I get no errors, just a broken image link in a box (see below). The alert box also never shows up.
    I'm new to Flex, so I may be doing something stupid that keeps this from working. I contacted the author of the thermometer widget but he doesn't know anything about Flex.
    Any help figuring out how to get this to work in a flex app would be appreciated.

    You should probably add more event handlers to see what's going on.  Especially "ioError". The complete list is below.  For coverage, add a handler for each event. You can also use in MXML
         complete="initThermometer(event)
    and add an argument to your Actionscript method, to find out details about the event.
    private function initThermometer(event:Event):void { 
         Alert.show('Thermometer loaded ' + event.type);}
    Events
        complete="No default"
        httpStatus="No default"
        init="No default"
        ioError="No default"
        open="No default"
        progress="No default"
        securityError="No default"
        unload="No default
    General info here:
         http://livedocs.adobe.com/flex/3/langref/mx/controls/SWFLoader.html
    I did not test my code suggestions, but it's probably close.

Maybe you are looking for