Ticket #491 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

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:1 Changed 4 years ago by jeroen

  • Status changed from new to closed
  • Resolution set to fixed

Fixed by linking the playlistButton and linkButton.

comment:2 Changed 4 years ago by jeroen

(the linkButton is named controlbarLinkButton)

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();

comment:6 Changed 4 years ago by jeroen

Added the change, still have to test in CS4.

comment:7 Changed 4 years 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?

comment:8 Changed 4 years ago by jeroen

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