Ticket #491 (closed enhancement: fixed)

Opened 8 months ago

Last modified 6 months ago

Make skins exported from CS4 work

Reported by: jeroen Owned by: pablo
Milestone: Flash 4.6 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

Changed 8 months ago by jeroen

  • status changed from new to closed
  • resolution set to fixed

Fixed by linking the playlistButton and linkButton.

Changed 8 months ago by jeroen

(the linkButton is named controlbarLinkButton)

Changed 8 months ago by jeroen

  • status changed from closed to reopened
  • resolution deleted

Changed 8 months 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.

Changed 8 months 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();

Changed 8 months ago by jeroen

Added the change, still have to test in CS4.

Changed 8 months ago by jeroen

  • owner changed from jeroen to pablo
  • status changed from reopened to new

The code is in the player. It doesn't have the classdefinition issue with CS3 exported skins anymore. Can you test if CS4 - exported skins with linked symbols do work now?

Changed 6 months ago by jeroen

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.