Hi Doug, This help, thanks a lot. Just that I now face the problem of having to go through few steps to test run code changes: to package it in different component project, and then reference the resulting swc in another project, then only I can test run it. Do you have better solution?
Thank you very much Regards, Chee Seng --- In [email protected], Doug McCune <[EMAIL PROTECTED]> wrote: > > If you package it as a SWC and then add that compiled SWC to a Flex > project then it will show up in the Design View just like the normal > button. So create a new Flex Library Project, add you Button.as file, > specify the AS classes to include (by changing the properties of the > library project), and then build the project. That will make a .SWC file > in the bin directory. Now you can reference this SWC in other Flex Projects. > > Doug > > > Chua Chee Seng wrote: > > > > Hi, > > > > I am trying to go through the Button source code to examine how it is > > written, I have copied the original Button.as into a new package, and > > I rename the package. I copy the styles folder, Version.as and > > Button.png into my relative folder too. It compiles, and exist in the > > Component panel of the builder. However, when I drag it into the UI > > area and drog, nothing is render except a small rectangle. I can click > > on it and specified the width and height in the properties panel. > > After specifying the width and height, it is showing a empty > > transparent rectangle in the design view, clicking on it can see the > > border, but can see the button image. It works fine when I run the > > application. May I know how does the Flex builder render the custom > > component when I drag and drop from the component window? Am I > > missing something there? > > > > Thanks in advance for any help. > > > > Regards, > > Chee Seng > > > > >
