Ticket #491 (closed enhancement: fixed)
Make skins exported from CS4 work
| Reported by: | jeroen | Owned by: | pablo |
|---|---|---|---|
| Priority: | Milestone: | Flash 4.6 | |
| Component: | Keywords: | ||
| Cc: | Forum thread: |
Description
I was investigating the CS4 compiling issue, and I think I have a workaround.
When CS3 exports a SWF from an FLA, it generates class names for the MovieClips based on their symbol name (e.g. "player_fla::button_25"). However, CS4 doesn't do this for unlinked symbols - they become generic MovieClips ("flash.display::MovieClip"), and when you instantiate a new one, it's just a plain old empty MovieClip. However, if you provide a linkage name in CS4, that name will be used as the class name, and you can instantiate any number of them, as before.
Therefore, in order to get our skins working with CS4, all we have to do is set linkages for any clips we want to clone.
Change History
comment:3 Changed 4 years ago by jeroen
- Status changed from closed to reopened
- Resolution fixed deleted
comment:4 Changed 4 years ago by jeroen
Now a new problem pops up: the buttons that are replicated are not the ones from the skin but the ones from the original player (since flash doesn't override Class definitions but only appends). So this fix doesn't seem to work.
comment:5 Changed 4 years ago by pablo
import flash.utils.getQualifiedClassName; ... var clsname:String = getQualifiedClassName(view.skin['display']['bufferIcon']); var cls:Class = view.skin.loaderInfo.applicationDomain.getDefinition(clsname) as Class; var newClip:MovieClip = new cls();

Fixed by linking the playlistButton and linkButton.