Skip to content

Commit

Permalink
Merge pull request #165 from KojiNakamaru/feature/publish_for_lwf_ref…
Browse files Browse the repository at this point in the history
…inement

Some refinements for Publish for LWF.jsfl
  • Loading branch information
KojiNakamaru committed Mar 18, 2016
2 parents 87fddfa + d4559c9 commit 18f2840
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tools/flash/Publish for LWF.jsfl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ function warn(msg)

function main()
{
var enableWarningRecompressed = fl.tools.shiftIsDown;

message = "";
fl.outputPanel.clear();
fl.showIdleMessage(false);
Expand Down Expand Up @@ -87,13 +89,13 @@ function main()
var libitems = [];
for (var i = 0; i < items.length; ++i) {
var item = items[i];
if (item.name.match(/__IGNORE__/) !== null)
continue;
switch (item.itemType) {
case "bitmap":
case "movie clip":
case "button":
clearLinkage(item);
if (item.name.match(/__IGNORE__/) !== null)
continue;
libitems.push(item);
}
}
Expand All @@ -114,7 +116,9 @@ function main()
if (item.sourceFileExists) {
FLfile.copy(item.sourceFilePath, bitmapDir + name);
} else {
warn("Image \"" + name + "\" recompressed by Flash");
if (enableWarningRecompressed) {
warn("Image \"" + name + "\" recompressed by Flash");
}
item.exportToFile(bitmapDir + name);
}
}
Expand Down Expand Up @@ -203,7 +207,6 @@ function correctButtonShapeColor(item)
var shape = frame.elements[0];
if (shape.vertices.length == 4 && shape.contours.length == 2) {
var color = shape.contours[1].fill.color;
warn(color);
if (color !== undefined) {
var n = parseInt(color.substring(1), 16);
if (buttonColors[n] === undefined) {
Expand Down

0 comments on commit 18f2840

Please sign in to comment.