This content has been marked as final. Show 9 replies
It sounds that you are doing all the right things. I have done exactly the same and successfully used Custom Flash components that I created and exported.
One issue ( a bug with Flex 3 http://bugs.adobe.com/jira/browse/FB-11351 )
is that you can't see the component in the Custom folder in design mode.
However, you can still use it in the application by inserting it in the source mode, e.g.
<local:RoundedBCKButton id="FwdBtn" click="vidPlayer.seekBwd();"/>
<local:RoundedFFButton id="BckBtn" click="vidPlayer.seekFwd();"/>
make sure you provided the proper namespace, e.g.
xmlns:local="*" in the top container.
I don't fully understand what you mean by "...validate mx.flash.UIMovieClip"
is it in the properties panel in Flash or you try to import it into FB via an import mx.flash.UIMovieClip in Actionscript ?
Let me know how you tried to " Validate" and I'll see what results I get on my system.
Thanks for the response Yoav. In Flash, try right clicking on your component in the library and selecting "Properties..." In the Linkage section, next to the Base Class Field (which has the value mx.flash.UIMovieClip), click on the green check mark to validate the base class.
Two questions for you...
1) After converting your symbol to a flex component, do you see FlexComponentBase in your library? (I don't but I think I should.)
2) If you just create a new .fla project and drag FlexComponentBase from your components panel into your library, does it then show up in your library (It doesn't for me).
OK, when validating mx.flash.UIMovieClip in FL properties panel I get the verification that it was found in FlexComponnetBase .
1.) Upon the initial conversion the FlexComponnetBase is imported into my Library, as well as the symbol's linkage changes to "mx.flash.UIMovieClip"
2.) Yes it does show !! ( I guess then something in you environment is missing)
Just to clarify for you the trivial sequence.
1.) new fla
2.) create some object (rectangular) on stage and convert to symbol
3.) select the symbol in the library , and from command convert to Flex component.
4.) Then, the FlexComponnetBase is imported, the linkage is changed to mx.flash.UIMovieClip and the Publishing setting is changed for the generation of SWC.
Now, I'm trying to recall how I installed the Kit ? however I'm a bit foggy as it may have been via the FlashC3 AIR extension plug in ? I'll try to verify later :)
Hmm... so at least my theory is confirmed that there is something wrong with my Flash/Component Kit environment.
I'm going through the exact steps that you describe in your sequence and the result is identical except that FlexComponentBase does not get added to my library (despite the output message to the contrary).
I installed the component kit from the MXB file that was included with Flex Builder 3 beta 3 although I see the same behavior with the component kit included with Builder 3 beta 2 and the standalone component kit for Flex 2.0.1.
If you get a chance, let me know if you can determine which version you're using and where it came from. That might be a clue.
Oops, to verify and find solution I generated some new Custom Flash components, basically repeated the same steps I did before. On the Flash side all appears OK and normal.
However, when I copied over the SWC file to the library and tried to use the new custom components, tehy were not identified and an error:
1046: Type was not found or was not a compile-time constant: for the component was generated.
I also have several SWC that I generated ( exactly the same way) several days ago, and the components in them are recognized and work fine.
Hmm ..., so I realized that last night I Oked an Adobe update of several CS3 elements include FlashCS3.
I'll investigate further and inform...
OK, some results, good news/bad news, :(
Bottom line I was able to generate Flash components, import them into FB3 and use them in an application. However, the environment seems to be flaky on the FL side, sometimes it generates a good SWC file and sometimes a bad one. The only visual difference is the size, in my simple case ( 2 components, a graphic and a button) size 28K for the good the bad was 3K. Nothing noticeable in the actual generation process, once I noticed a "bad" SWC I just deleted it and repeated the publishing process ...
Quite disturbing, need to get to the bottom of this ...
To be clear, though, FlexComponentBase successfully showed up in the library panel in all cases, right? I'd consider it a minor "win" if I could just get that to happen. I reinstalled again and still no luck :(
Yes, in all cases the FlexComponentBase compiled-Clip item appears and is used. I verified that I use the latest extension ( Via the Adobe extension manager tool);
My recommendation is to check issues on the FlashCS3 side, make sure you have the latest version / updates / Player9 / JRE/JVM etc.
Thanks so much for your help. Your validation that I was doing stuff right and results from testing in your environment really made a difference.
Turns out my problem wasn't about the versions of Flash/Flex/Component Kit, etc... it was my java classpath. I had a reference to an old version of xalan.jar (version 2.6.0) in my system classpath and the problem was fixed when I removed it.