Flash components in Flex

I have built an interface in Flash CS3 and now have the need
to port it over to Flex. I am trying to do it with as little
re-build as possible, so I need to port the Flash components over
with it. I exported a SWC with all of the components I am using,
and added it to the Library Path of an AS project.
The build gives me no errors, but I do get a #2007 at
runtime. The error seems to be stemming from a Yahoo ASTRA Flash
component, which was included in the SWC.
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/drawBackground()
at fl.controls::LabelButton/draw()
at fl.controls::Button/draw()
at
com.yahoo.astra.fl.controls.tabBarClasses::TabButton/draw()
at fl.core::UIComponent/drawNow()
at com.yahoo.astra.fl.controls::TabBar/drawButtons()
at com.yahoo.astra.fl.controls::TabBar/draw()
at fl.core::UIComponent/callLaterDispatcher()
I have been searching around the net, and the majority of
people are saying that this happens when the skins aren't included
(so you need to set them before the component is added to the
stage). I am using customized programmatic skins, for which the
source files are included in the build, and the styles get set
before the component is added to the stage (I actually replaced the
default ones in the class).
Does anyone have any other ideas as to how I could fix this?
PS - It is an ASTRA TabBar component that is giving me
issues. I know that Flex has a TabBar and TabNavigator, but I can't
find any documentation on how to use these from an AS project (no
MXML). I will simply rebuild using the native Flex controls if
necessary, and if possible, but would prefer to fix the issue as it
currently stands. (I might go back to Flash at some point, and
don't want to tie myself to a particular solution, considering I
can't use Flex components in Flash).
PPS - If you are wondering why I am porting to Flex right
now, especially if I am considering taking it back to Flash in the
future, it is because I have the need to begin building in
FlashPlayer 10 functionality, and the only way you can build to
FP10 right now (as its in beta) is with a nightly build of
Flex.

"rritchey" <[email protected]> wrote in
message
news:g8ua6d$qu6$[email protected]..
> bump: Was I not clear in my question? Or does no-one
know the answer?
You might want to try in the flexCoders Yahoo! group.

Similar Messages

  • 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 IDE Components in Flex 3 Design Mode. Can they be visible there?

    Hi,
    Im exploring Flex to get a grasp on its concepts and am currently looking into building components in the Flash IDE. Though i guess its likely that when you're more familiar with Flex you build your components in Flex, like said Im exploring its concepts and like to know where and how the Flash IDE fits in its workflow.
    I made a simple Flex Component in the Flex IDE, which shows up fine when I run the Flex project. But it does not show in Flex Design Mode.
    I have exported the component from Flash as an SWC and added the SWC to the Flex library path. The symbol in the Flash IDE extends UIMovieClip. Now I read in 'Using Adobe FlexBuilder 3' (p.67) that the Flex Components panel only lists visible components, according to the documentation 'components that extend UIComponent'.
    Note that my question is about being visible on the stage in Design Mode, not in the component panel. As UIMovieClip doesnt inherit from UIComponent (and the UIComponent class doesnt seem to be available in the Flash IDE), is this also the cause that the Flash IDE component is not visible on the Flex stage in Design Mode?
    Can someone confirm, or deny this?
    Regards,
    Marcel

    Hi Latha,
    thanks for your feedback. Reading it back though, Im still not sure whether Flex components build in the Flash IDE (using the Flex Component Kit for Flash CS3) can be visible in Flex 3 Design Mode.Maybe you can be a bit more specific and save a lot of Flex beginners a lot of headaches.
    I understand that MXML components can be used in Design Mode. I also understand that if your component is AS you have to create a Library and link that to your project to make them visible in Design Mode. I also understand that Flash Builder 4 does "support rendering of UIMovieClip objects which are in library (swc) and added to the project build path"
    This actually doesnt answer my question really. Does this mean there is no way to render Flex components build in the Flash IDE (using the Flex Component Kit for Flash CS3)  in Flex 3 Design Mode?
    Regards,
    Marcel

  • 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.

  • 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.

  • Flash Components market

    Hi!
    Can Adobe comment current situation and plans about supporting of Flash Components? Will Adobe software support Flash Components in feature or will move to Flex components? Is Flash Components deprecated?

    radu_cosma,
    > I start using a few flash components (combo, list) and
    it seems
    > they are too big, aprox 65k.
    For all the benefits brought by components, their KB weight
    is
    definitely a drawback. That said, the ActionScript 3.0
    components weigh
    less then their ActionScript 2.0 counterparts.
    > Probably there's a common library used for all user
    interface
    > components and that is imported in the project always.
    You nailed it. In fact, if you study the components in the
    ActionScript
    2.0 Components Reference or the ActionScript 3.0 Language and
    Components
    Reference, you'll see the hierarchical "family tree" common
    to all
    comonents, then common to groups of related components.
    > Is there any way to reduce the size of the swf, maybe
    import
    > ONLY what is needed, do we have that option?
    Unfortunately, you don't have that option. When you import a
    component,
    it weighs whatever it weighs; you're already importing the
    minimum that
    component needs. On the bright side, when you import a second
    component,
    the combined total KB is usually considerably less than the
    sum of each
    component's individual weight.
    David Stiller
    Co-author, Foundation Flash CS4 for Designers
    http://tinyurl.com/5j55cv
    "Luck is the residue of good design."

  • Problem with flash components in director  tollbox

    1- I have 2 buttons named "makeQst1BT" in frame 1 and  "chkQst1BT" in frame 2,  which both are draged from toolbox.
    First the user gets a random question in frame 2 andhas to answer it, When the user clicks "chkQst1BT" its visible is to disappear after answering. it is done nicely  and button disappears.by  the follwing code.
    sprite("chkQst1BT").visible =false
    then later when user navigates back to a frame 1 again and wants to make a new question and presses "makeQst1BT" this button is to set the visible of "chkQst1BT" to true again by this code:
    sprite("chkQst1BT").visible =true
    BUT here I get script error  indicating that PROPERTY #visible not found.
    Why this happens? and how can I set the visible of  chkQst1BT back to true?
    ( I get many similar script errors saying PROPERTY #text not found in the same movie)
    2- I have draged many textArea flash components from toolbox, then want to change their ink from copy to background transparent, it appearantly accepts this choice but it is still displayed like "copy" with white bakgr.( I do it from property inspector window)
    What is strange is that only one of text Areas changes appearance when ink changed to background transparant but not others.
    Any ideas?
    Thanks in advance!

    First off, you should know that the flash components aren't that predictable/stable to begin with, but anyway.
    1 If the sprite only exists in frame 2 you can't change it's properties in frame 1. What you can do, and I'm reasonably sure you don't need to, is to put the visible code in a on begin sprite handler for a script on the sprite which should be run every time you enter frame 2.
    2. Works fine here so I can only speculate on what's causing your problem. My guess is that the text areas share sprite channel with some other component during your movie and that component has it's ink set to copy. Move the flash text area component to their own channels or add a behavior script to them that sets the ink in the on begin sprite handler.

  • Problem in loading Flash Components

    Hai,
    I have a problem in loading flash components using
    actionscript.
    Example( List Components).
    I can load List components dynamically using frame script
    like.
    import mx.controls.List;
    var myList:List = createObject("List","nList",10);
    But I can't load dynamically from inside a class file like.
    import mx.controls.List;
    class testClass{
    private var myList;
    function testClass( ){
    myList = createObject( "List","nList",10 );
    But it is not working i don't know why ?
    If any one knows Please reply me.
    Thank you.

    The over flash file works if i'm loading images direct from a
    path but, i'm using php script to pull the files in binary format
    and, it's causing problems in in firefox..

  • Flash components in  VC

    We upgraded to EHP1 SP6 to get the flash component working in VC.
    I uploaded the BO flash meters I found in a PDF  (/people/amir.mimran/blog/2009/09/11/flash-components-for-visual-composer-70--flexibility-is-the-name-of-the-game)
    I can add them to the storyboard and connect the input fields. Only after I deploy the model the gauge meter shows up without the range colors and with the value 50. when I click on it, it changes to 0 but it never shows the value (10) I set in the storyboard.
    The same goes with all the other BO flash components from the PDF
    They seem fine in the storyboard and they look fine in the deployed model except no values/wrong values are visible and they doesn't do much at all.

    Press F5 again to reload the page.

  • Flash components+VB isssue

    Hi,
    I am doing a project which involves flah UI ,XML and VB. The
    UI has two major Tree Compnents,One menu bar and a few Accordions.
    All of these are populated with XML. Now this is embedded in a VB
    application. The Flash swf will send data to the VB shell and the
    VB writes the XML data with the changes , what ever the user had
    done in the tree or accordion..(Adding or removing nodes or some
    thing like that).All works fine ..But when user reloads the
    application ..by clicking on a language selection menu item(To
    change the language), the flash application goes awry. All the data
    is loaded every field and compnents are populated with their
    corresponding XMLs ..But Nothing is clickable!.
    Tree nodes don't open, menu items dont open, accordions are
    not collapsing.But they all are showing data.
    Basic functionalites attached to simple buttons are
    working..but other that that no other component works in a way how
    it needs to work.
    The strange things is that, if we create an VB alert while
    changing the lanuage and reloading it again..IT WORKS.
    We tried with delays and reloading and all. Nothing solves
    the issue.
    Can anybody please tell me where the issue is?
    Note : The Project Worked well when it was deployed in a
    webserver with jsp as the backend.The only change made was in the
    way in which you send values to the backend.. apart from this the
    flash code is the same.
    Thanks And Regards,
    BlueSquid

    radu_cosma,
    > I start using a few flash components (combo, list) and
    it seems
    > they are too big, aprox 65k.
    For all the benefits brought by components, their KB weight
    is
    definitely a drawback. That said, the ActionScript 3.0
    components weigh
    less then their ActionScript 2.0 counterparts.
    > Probably there's a common library used for all user
    interface
    > components and that is imported in the project always.
    You nailed it. In fact, if you study the components in the
    ActionScript
    2.0 Components Reference or the ActionScript 3.0 Language and
    Components
    Reference, you'll see the hierarchical "family tree" common
    to all
    comonents, then common to groups of related components.
    > Is there any way to reduce the size of the swf, maybe
    import
    > ONLY what is needed, do we have that option?
    Unfortunately, you don't have that option. When you import a
    component,
    it weighs whatever it weighs; you're already importing the
    minimum that
    component needs. On the bright side, when you import a second
    component,
    the combined total KB is usually considerably less than the
    sum of each
    component's individual weight.
    David Stiller
    Co-author, Foundation Flash CS4 for Designers
    http://tinyurl.com/5j55cv
    "Luck is the residue of good design."

  • Flash components & XML

    Hi all,
    I am working on a new project that I can't seem to find any
    help resources for. I am using the Flash Components, binding and
    schemas to link together text fields, drop downs(ComboBox), and a
    button to the XML Connector. The part I can't figure out is if
    there is a way to make the button dynamically change it's
    destination URL when the subject of the dropdown(ComboBox
    component) is changed. In the XML file, I have nodes for all the
    components to accept. Is there any way for the Component button to
    accept the different <URL> nodes as I change the parent node
    with the drop down box? I thought maybe a variable or an instance
    name in the XML Connector or Button Component bindings or schema
    area could work. But no luck yet. Thanks in advance.

    huh! I'v tried searching for that phrase exactly & have
    had few matching results!! How did you do that?? Thats magic that
    is! Thanks alot! (Found one on the first result!)

  • Questions about supporting TLF with Halo components in Flex 4.1

    We recently decided to upgrade to the Flex 4.1 SDK after a year or so at 3.2.  We have been asked to not use the new SPARK components yet because our products would then have a mistmatch of Halo and Spark components in the UI.  We have built support for our Halo components to display html through the ".htmlText" property for the Text components.  For example, we can display strings such as "<p>Choose <b>one</b> option:</p>".  With the upgrade to Flex 4.1 a couple of questions about supporting bi-directional text have come up.  My understanding is that in order to support bi-directional text we need to use the Text Layout Framework.  Does anyone have a suggestion on how we can utilize the TLF with the Halo components in Flex 4.1?    Can we still use the ".htmlText" property somehow or is there a new property that understands the TextFormat markup?  We would love to still be able to use the limited html tags that are supported for the "htmlText" property.  Is there an option where that syntax is still understood?
    Thanks in advance!
    David

    The halo components use TextField, and the spark components use TLF. Both sets have support for some html markup to import and export text. To use bidi text, you have to use TLF; TextField won't work properly.
    It is possible to use TLF to build your own components, and this can work well particularly for applications with specialized needs. But if you need bidi support for advanced components like DataGrid and List, then you should use the spark components.
    Thanks!
    - robin

  • 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.

  • Using Flash Components in multiple SWCs inside AS-only project

    Ok, this is a somewhat complicated issue dealing with SWCs and compilers. I've outlined steps to reproduce the problem below. I'm using the method outlined here to bring in Flash content to my project. I have 15-20 SWCs already, and it's working fine for those assets, the problem is specifically related to Flash's components (ComboBox, RadioButton etc.) If anyone has *any* advice on this, please let me know as we are completely stumped at this point!
    The issue we're having involves using multiple external SWC files which contain AS3 components from Flash CS4. When two SWCs are linked to an ActionScript project (using Flash Builder 4 Beta (build 4.0.0)) there are collisions in the referenced classes which cause the most recently published SWC to knock out any duplicate classes in the other SWCs. A simple way to replicate this is as follows:
    1. Create one FLA, called 'compA', drag one ComboBox, RadioButton and TextInput component onto the stage. Select all and convert to symbol, marking the symbol for export with a class name of Test1.
    2. Create a second FLA, called 'compB', drag one ComboBox, Label and UIScrollbar onto the stage. Convert these to a symbol with a classname of 'Test2'.
    3. Create a new ActionScript-only project in Flash Builder, called 'ComponentTest'.
    4. Create a 'libs' folder in this new project. Select 'Project -> Properties -> ActionScript Build Path' and add the libs folder as a new SWC folder in the Library Path window.
    5. Go back to compA.fla and right click the Test1 symbol in the library. Select 'Export SWC file...' and save it as compA.swc in the libs folder.
    6. Do the same thing for compB.fla.
    7. Edit ComponentTest.as and in the constructor, create an instance of Test1 and Test2, placing each on the stage.
    8. Run the app, and the ComboBox will only be functional in one instance (whichever was published last.) The other ComboBox will behave like a MovieClip, cycling over the two frames in the stage asset (avatar and skin.) It will have no association to anything in the fl.* package.
    Looking at the 'Referenced Libraries' in Flash Builder, compA may show it contains classes for the RadioButton and TextInput, but no ComboBox classes are referenced (sometimes it will show no classes at all, but this appears to be an unrelated bug with refreshing external libraries in Flash Builder.)
    Unzipping the SWC files and examining their catalog.xml manifests shows all the necessary classes are listed (i.e. ComboBox is in both.)
    Removing either SWC will cause the remaining one to work properly, so the problem appears to be in compiling the ComponentTest project which includes both.
    Attempted Workarounds:
    1. Create a new FLA, drag all components used in both files onto the stage and export a SWC called 'components.swc'. Add this SWC to the project's libs folder. In both compA and compB FLA files, add this SWC as an external library in the ActionScript 3.0 Publish settings. Re-export both SWCs. The theory is that the compiler will look for the required classes in the components.swc first, and thus not include them in the export, however this is not the case.
    2. Same as above, deleting ComponentShim from both FLAs before exporting. The result is that no component classes are included, so all components act like MovieClips.
    3. Add the Components source folder to the external library path of both FLAs, assuming the compiler will favor classpath references over compiled class references (ComponentShim). Same result.
    Summary: We have been unable to find a way to use Flash Components in a project if they are referenced in more than one asset library. If we were able to import them once, and have all SWCs which need those classes use a single source, this might not be an issue, but the compiler does not appear to handle this (and we are admittedly not advanced enough to even know if this is possible.)

    Hi!
    I'm having the same problem. Any news on the matter?
    Also, this looks like a very similar problem.
    Best regards,
    X_AmonPL.

  • How to cusomize in Flash: components User Interface Button?

    Flash Componants> User Interface> Button
    How to cusomize components?
    The button works, but where is the code that is making it work?

    Connect recorded session on workig with flash components https://admin.adobe.acrobat.com/_a295153/p49752948/?launcher=false&fcsContent=true&pbMode= normal
    Using the Button component http://www.adobe.com/devnet/flash/quickstart/button_component_as3/
    Simple to modify the UI is to double click on the button and modify its skin in different states as per ur requirements

Maybe you are looking for

  • How to remove large message stuck in the adapter engine?

    Hi experts, We have a large message abt 100 MB stuck in the adapter engine which is causing the J2EE server to restart continuously. I have tried increasing the heap sizes and the number of threads in config tool, but no luck. My question here is how

  • Photoshop CC will not print to my Epson r2400

    When I try to print from PS, I get the error window "There was an error opening your printer. Printing functions will not be available until you have selected a printer and reopened any documents". I am using a Mac OS X 10.10.2 and my Photoshop CC 20

  • How i authurize my computer

    how do i authorize my computer?

  • Goods Movement for Inspection

    We are in need automatic proposal of goods movement on Goods Receipt against purchase order. If Material is active for QM, then it has to be proposed movement type 103 otherwise it proposed for 101.

  • Embedded image not displaying​...why?

    Greetings: In my post I embedded an image.  It displayed correctly when I saved the post, but going back to view the post now (from a different PC), I no longer see it but rather, a yellow triangle graphic instead.  When I float my cursor over that g