Reputation: 14250
I am trying to export the button symbol from Flash and publish swc file for Flex. I have successfully export 3 buttons which are playBtn, stopBtn, pauseBtn from flash and add swc file to my flex actionscript files. my code is:
private var stopBt:stopBtn;
private var playBt:playBtn;
private var pauseBt:pauseBtn;
private var mutebt:muteBtn // no such datatype.....
error message....
//an internal build error has occurred, right click for more information
Since I add swc from flash in flex, I don't have to import these button...However, when I tried to create 1 more button (muteBtn) in flash and did the same thing again in flex, it gave me "an internal build error has occurred, right click for more information" error.
When I created a var and tried to type :, there are no muteBtn datatype pop up.... I have spent 2 hours on this crazy crap and don't know WTF is going on. Forgive my language...but I am really frustrated....I really appreciate if someone can help me here...Thanks a lot!!!
Upvotes: 0
Views: 132
Reputation: 31883
The usual way to use SWF files as sources for button skins is to embed them in the stylesheet, like so:
.muteButton {
up-skin: Embed(source="muteButton.swf",symbol="muteButton_up");
down-skin: Embed(source="muteButton.swf",symbol="muteButton_down");
over-skin: Embed(source="muteButton.swf",symbol="muteButton_over");
disabled-skin: Embed(source="muteButton.swf",symbol="muteButton_disabled");
/* etc. */
}
The SWF file has to have all the symbols referenced and instances of them must be on the stage (i.e., so that when you double-click muteButton.swf you see all the symbols). Make sure they are all named correctly as well.
Upvotes: 1