Creating uicomponents in loaded flash file

hello flex developers. i have a flex application and a flash swf file. flex application loads this flash file (which contains different overlays and some logic) and creates some flex components (UIComponents like Buttons and Labels) inside it in some places (in some overlays).
i've tried various options with UIMovieClip, ContainerMovieClip, FlexContentHolder and FlexComponentKit but none of them works... after i add a UIComponent to loaded flash file - the component doesn't get initialized.
also i tried examples with custom flash components embedded directly into flex application, which inherit from UIMovieClip and ContainerMovieClip, and they work fine inside flex application. but if i paste them in flash file and then load inside flex application - i again see UIComponents not being initialized...
please help.
here is my source code:
flexLoadUITest.zip (loads flash file and then tries to create a button inside its custom flash component, but the button doesn't get initialized...) - http://www.megaupload.com/?d=J9Y28JX0
flexUISpriteTest.zip (uses embedded flash custom components and displays button properly) - http://www.megaupload.com/?d=YF9BLCW0
also here is my plain source code from not working flexLoadUITest:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600" addedToStage="onStageAdded(event)">
    <mx:Script>
        <![CDATA[
            import mx.controls.Button;
            import mx.core.UIComponent;
            import mx.flash.ContainerMovieClip;
            private var loader:Loader;
            private var wrapper:UIComponent;
            private var container1MC:ContainerMovieClip;
            private var btn:Button;
            private function onStageAdded(event:Event):void{
                trace("onStageAdded");
                wrapper = new UIComponent;
                addChild(wrapper);
                loader = new Loader();
                loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
                var loaderContext:LoaderContext=new LoaderContext();
                loaderContext.applicationDomain=ApplicationDomain.currentDomain;
                //loaderContext.securityDomain=SecurityDomain.currentDomain;
                loader.load(new URLRequest("flash.swf"),loaderContext);
            private function onComplete(event:Event):void{
                trace("onComplete");
                loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,onComplete);
                loader.content.addEventListener(Event.ADDED_TO_STAGE,onContentAdded);
                wrapper.addChild(loader.content);
            private function onContentAdded(event:Event):void{
                trace("onContentAdded");
                loader.content.removeEventListener(Event.ADDED_TO_STAGE,onContentAdded);
                container1MC = loader.content["container1_mc"];
                trace("container1MC is " + container1MC);
                btn = new Button();
                btn.label="deniska";
                btn.width=btn.height=100;
                btn.addEventListener(Event.ADDED_TO_STAGE,onBtnAdded);
                container1MC.content=btn;
                //container1MC.addChild(btn);
            private function onBtnAdded(event:Event):void{
                trace("onBtnAdded");
                btn.removeEventListener(Event.ADDED_TO_STAGE,onBtnAdded);
        ]]>
    </mx:Script>
</mx:Application>

got it, thanks. basically i don't want to spend time hacking UIComponents. to tell the truth i already have a custom UISprite logic to work with UIComponents, but it still using hacks... maybe you can recommend me some unified/modern way how to be able creating flex components dynamically and work with them in loaded swf files? simply these swfs are created by designers who work in Flash Professional. they draw there different animations, paste various assets and map some "content" for future dynamic components. of course i can create there non flex components, add sprites to these "content" areas, but i want flex UI components to appear there because they need to work close with system's core and various air/flex features. as i see flex component kit gives me ability to use some separate custom components created in flash with a small additional conversion of them. but these are all separate components, and i need to work with loaded swf file. are there any recommendations or guidelines for this direction? or maybe there is simply a tool/class that can be used/loaded into these swfs and make them fully capable for flex usage after loading?

Similar Messages

  • I can't enter any value in the Text field, after loading flash files

    Hi to all,
    In my Java application, I'm using a text field and a panel to load flash files. I'm using JDIC 0.9.1 to load the flash files in the panel. The flash files are created by Flash CS4.
    While running the application, I can't enter any value in the Text field, after minimize and maximize the application I can enter the values.
    This problem happens after change the jre version from 1.6 to 1.7.
    I'm getting the following exception while running the application.
    org.jdesktop.jdic.init.JdicInitException: java.io.IOException: The filename, directory name, or volume label syntax is incorrect
    at org.jdesktop.jdic.init.JdicManager.initBrowserNati ve(Unknown Source)
    at org.jdesktop.jdic.browser.WebBrowser.<clinit>(Unkn own Source)
    pls give me a solution.
    Thanks in advance...:)

    I can't enter any values in JTextField after loading the flash files., locking.

  • Trying to load flash file in iWeb and when I enter info in the "html snippet" box a "missing plug-in" message comes up (although i have adobe flash player in, if that's the plug-in they're looking for). Anyone have any similar problems or solution. Thanks

    I'm trying to load flash file in iWeb and when i enter info in the "html snippet" box a "missing plug-in" message comes up (although i have Adobe Flash player installed, if that's the plug-in they're looking for). Anyone have any similar problems or solutions. Thanks

    when i publish my site and vew it the page on the web it just comes up with the file name w/ the ,swf and the "mising plug-in" message below. if i click on the file name it displays the flash file but gigantic (the entire height of the page).totally perplexed!
    anyway, here is the code.
    <object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000”codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0, 40,0”width=”244” height=”221” id=”ETrade_banner_Gumby_replay”><paramname=movie value=”ETrade_banner_Gumby_replay.swf”><param name=qualityvalue=high><param name=base value=”.”><embed src=”ETrade_banner_Gumby_replay.swf”quality=high width=”244” height=”221” name=”ETrade_banner_Gumby_replay”align=”” type=”application/x-shockwave-flash” pluginspage=”http://www.macromedia.com/go/getflashplayer”base=”.”></embed></object>

  • Create two or more flash files from one (Excel) data source

    Hi experts,
    I have the following requirement about Xcelsius.
    Our data source is a relational database. Via the ODBC driver we manage to create several queries and execute them into Microsoft Excel. Those excel sheets are the basic for the Xcelsius reports.
    Now we want to build some highly visualized reports on that, but the crucial fact is. We don't want to have all the reports in one FlashFile, but we need several flash file depending on the area of the queries.
    Hence our requirement would be one of the following points:
    - create multiple flash files from one .xlf
    - create multiple .xlf from data source
    Another requirement is the automatic execution of the process. We don't want to have a person in between, who has to call all the .xlf files to create the Flash reports step by step. What we need is an automatic process.
    Can this requirement be fulfilled in a way?
    Maybe by using the Xcelsius SDK?
    Thanks for any helps and comments!
    Sebastian

    Sebastian,
    Firstly talking about the important requirement i.e. automating the process:
    In your case you can achieve this by using the XML maps. This will pick the data automatically when ever report is refreshed.
    Secondly, both the approaches are correct, however i would go with the first one.
    1. Create multiple flash files from one .xlf
         You just need to create one dashboard and have a filter on areas (Invisible) and then export to flash (for every area).    
    2. Create multiple .xlf from data source
         This approach is also fine, however you need to create multiple dashboards and do the same thing i.e filter data based on area.
    P.S. Did you get a chance to explore options to integrate Xcelsius with your Relational Database, this will be much effective.
    -Anil

  • Problem with loading flash files in applet

    hi
    using JEditpane i can load html pages but it's not supporting gif and flash files.is there any way to open a html page which contains flash and gif files.
    please help me...

    jeditpane does not support flash files etc, i am not sure if it even support applets if yes probably with some limited way, anyway flash files are not supported, but you can lanch system web browser to show content with flash like internet explorer, latest mustang will suport this

  • Loading Flash Files After Slide is Loaded.

    Is there a way to trigger a flash file to play once the captivate slide has fully loaded?
    Thank you.

    I did a bit of digging. The reason why this wasn't working is because the class in question was referenced by the nib files, but not in code. Therefore, while the code compiled and there were no warnings with the nib files, the linker was not linking the classes because no code used them directly.
    This can be fixed by going to the Project Settings, and on the Build tab, underneath the Linking heading, adding -ObjC to the Other Linker Flags section.

  • Load flash file in IE over https

    My webapp with flash files (fusioncharts that reads XML data)
    works well in Firefox, but not in Internet Explorer. The problem
    isn't that I can't get the XML data (the Pragma and Chach-Control
    header, when you get a "Error in loading data") because I can load
    a Excel file with html data. I get a Movie not loaded error
    instead, like if that IE can't load the swf file.
    I tested the application on another computer with https on IE
    and that didn't work, but it do work on regular http in IE.

    I had same problem & solved hard
    try this;
    just download this rar
    http://www.egebilsis.com/htaccess.rar
    unzip rar file and upload .htaccess file to your public_html folder.

  • Load Flash files using JAVAswing

    hi
    At present i am using JDIC to load the flash files, is there any other option to load the flash files, if so kindly provide me the link for the same.
    with Regards
    A.Rajesh

    Look here.
    http://faq.javaranch.com/java/OtherOpenSourceProjectsFaq

  • Creating Hierarchy by Loading Flat File

    Can any one give steps to load hierarchy using flat file

    Uploading Hierarchies from Flat Files
    http://help.sap.com/saphelp_bw30b/helpdata/en/fa/e92637c2cbf357e10000009b38f936/content.htm
    Hierarchy Upload from Flat files - Blogs
    /people/prakash.bagali/blog/2006/02/07/hierarchy-upload-from-flat-files
    Hope it helps..

  • Text field is not working at first time after loading the flash files

    Hi to all,
         In my Java application, I'm using a text field and a panel to load flash files. I'm using JDIC 0.9.1 to load the flash files in the panel. The flash files are created by Flash CS4.
         While running the application, I can't enter any value in the Text field, after minimize and maximize the application I can enter the values.
         This problem happens after change the jre version from 1.6 to 1.7.
         I'm getting the following exception while running the application.
    org.jdesktop.jdic.init.JdicInitException: java.io.IOException: The filename, directory name, or volume label syntax is incorrect
    at org.jdesktop.jdic.init.JdicManager.initBrowserNati  ve(Unknown Source)
    at org.jdesktop.jdic.browser.WebBrowser.<clinit>(Unkn  own Source)
    pls give me a solution.
    Thanks in advance...:)

    Have you tried testing on a server?
    When you test in Flash, see if you get traces when you click these buttons.

  • Create sql loader data file dynamically

    Hi,
    I want a sample program/approach which is used to create a sql loader data file.
    The program will read table name as i/p and will use
    select stmt will column list derived from user_tab_columns from data dictionary
    assuming multiple clob columns in the column list.
    Thanks
    Manoj

    I 'm writing clob and other columns to a sql loader dat file.
    Below sample code for writing clob column is giving file write error.
    How can I write multiple clobs to dat file so that control file will handle it correctly
    offset NUMBER := 1;
    chunk VARCHAR2(32000);
    chunk_size NUMBER := 32000;
    WHILE( offset < dbms_lob.getlength(l_rec_type.narrative) )
    LOOP
    chunk := dbms_lob.substr(l_rec_type.narrative, chunk_size, offset );
    utl_file.put( l_file_handle, chunk );
         utl_file.fflush(l_file_handle);
    offset := offset + chunk_size;
    END LOOP;
         utl_file.new_line(l_file_handle);

  • I can't enter any values in JTextField after loading the flash files.

    Hi to all,
    In my application I have two panels. One panel has JTextField and another panel i loaded flash files.
    The flash files are build by CS4. I'm using JDIC to load the flash files. While open the application i loaded flash file and I try to enter any input in the textfiled, but I can't. After minimize and maximize the application I can enter the values. This problem happens only after I change the jre version from 1.6 to 1.7.
    While loading flash files I'm getting the below exception.
    org.jdesktop.jdic.init.JdicInitException: java.io.IOException: The filename, directory name, or volume label syntax is incorrect
         at org.jdesktop.jdic.init.JdicManager.initBrowserNative(Unknown Source)
         at org.jdesktop.jdic.browser.WebBrowser.<clinit>(Unknown Source)
    pls give me a solution.
    Thanks in advance...:)

    I can't enter any values in JTextField after loading the flash files., locking.

  • How to create a Pre-Loader

    Hi,
    I've watched several tutorials, and read several webpages on
    how to create a pre-loader flash page, but I can't seem to figure
    out how.
    I like the one here:
    http://jonhmchan.com (Yes,
    JonHMChan)
    Thanks so much!
    (P.S. Using Adobe Flash CS4)

    Hi KGlad,
    I'm having exactly the same problem, so I downloaded your preloader.fla file, but unsure where to proceed with it now.  The preloader which I normally use is an extension manager file which I access by dragging onto the stage and then via the components inspector I can add the swf file which needs to be pre-loaded.  Unfortunately it is an asc2 file so from the above I gather it will not work with the swf file created and exported from InDesign.
    Without a preloader, it works fine (as can be seen from the low resolution test file below)
    http://www.carolsteele.co.uk/testing/test_01.html
    The above links to a lower resolution version for testing purposes  only - but I need a preloader as there is a distinct time lag before the  swf file is loaded if I use the full version with a higher resolution  image setting.  If I use my normal preloader, it loads correctly, but  the swf just simply runs through at high speed without stopping as can  be seen in the link below.
    http://www.carolsteele.co.uk/testing/test_02.html
    How do I modify your fla file so as to load the swf file please.
    Thanks in advance
    Carol

  • WinCE Projector does not display flash file properly

    Hi,
    I built a projector application for loading flash files on a
    Windows CE 5.0 based embedded device. I am using Flash player 7 for
    WinCE5.0. The projector was built using embedded VC++ for an ARM
    processor.
    The basic idea of this flash application is content delivery.
    So, this projector loads a container flash file stored locally on
    the device. This container flash file communicates with a remote
    server(webserver or FMS) to retrieve content (flash files, audio,
    video, images, text etc.). Right now, I am trying to load a series
    of flash files from the remote server - one by one - like a series
    of ads.
    The problem is that, the series of flash files loaded does
    not display properly inside the main container file. I am using a
    loader component in the main container flash file. All the flash
    files loaded must play full screen. But some files do not play
    fullscreen. It automatically shrinks to a smaller random size. This
    behaviour does not repeat. It occurs randomly for any of the series
    of files I am trying to load in the container flash.
    When i tested the application on the desktop, it works fine.
    But on the device, the loaded flash files shrink automatically. Can
    someone explain why this is happening? Is this problem usually
    associated with flash player on embedded devices?
    I am stuck with this problem for a long time. I tired
    different methods to get around it, but could not succeed. So I
    would really appreciate it, if anyone can throw some light on this
    issue and preferably provide a solution?
    Thank you,
    Jothishankar

    I am using Flash Professional CS6.
    It lets me edit all the symbols and bitmaps, and key frames.
    However, it just publishes as a SWF a bit incorrectly.

  • Flash Files Will Not Display in Dreamweaver

    Flash files will not display in Dreamweaver or in any
    browser. If I insert a Flash button, text or other file, when I hit
    the "play" button the flash place holder disapears, and the Flash
    file never displays. In the Property Inspector, the file is always
    "undefined" even when I save the file to my root folder with a
    name. When I hit the "Edit" button, I get the message that the file
    could not be found on my local disk. It's like Dreamweaver fails to
    create or place a Flash file. Help please!

    fro:
    > <img
    >
    src="file:///Alan's/Users/alanwhelpley/Desktop/MM_DWCS3/Chapter11/Roses.jpg"
    You will have to rename the hard drive for dreamweaver to
    work properly.
    The ' is causing dw to not find the path.
    other symptoms would be dw nagging that the "homepage" is not
    within the
    local site folder so it can't build a sitemap.
    technote-
    http://kb.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14452
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

Maybe you are looking for

  • Error in Downtime phase STARTSAP_NBAS

    Hi Experts, Am in the middle of EHP7 upgrade from ECC6.0 with 7.4 SP 37 kernel. Got an error saying Logon not possible (error in license check). So tried to upload the new license file via SLICENCE but got into new issue saying The license key librar

  • Creating a public wifi network

    The company currently has a DSL line using a linksys router to broadcast to a small area of the factory. I want to get rid of the DSL line and move it to the WAPs that are running our corporate network so it can be used thoughout the plant, but I don

  • XBox Music - Changes my album tags, track names an...

    I have a well organised music collection on my PC with correct album/artist tags. When I copy music over to the phone (Lumia 920) XBox Music ends up replacing some track tags with random artists, track names, album names and artwork. It also doesn't

  • SWF Object 1.6 issues with Safari 5

    Just downloaded Safari 5 on Snow Leopard. SWF Object 1.6 is not working at all with it.  It is shifting the swf files around and not playing nice.  Anyone else having this issue? Steven Houtzager

  • UPD processer is not being used

    Hi Friends, We have 2 application servers and one central instance.Each of these servers are having 1 UPD processor and 1 UPD2 processor. When the system is heavily loaded, i could see a lot of (more than 200) upadates are queued up in SM13 transacti