Script not used warning may appear when using LWFS

Asked 2 years ago, Updated 2 years ago, 101 views

When using LWFS, you may occasionally experience warnings such as script not used [hoge_0_1].
There seems to be no actual damage even if left unattended, but is there any way to deal with it?

html5

2022-09-30 20:24

1 Answers

The "script not used" warning is printed by the swf2lwf.rb Ruby script that LWFS uses internally.

https://github.com/gree/lwf/blob/0ea7bc7b1eea09eab793da10cb4feea6fb47d0f0/tools/swf2lwf/swf2lwf.rb#L4196

@script_funcname_map.keys.each do|key|
  warn("script not used [#{key}]")
end

Occurs on Adobe Flash CS6 or Flash CC if the action script panel of the timeline contains one of the following and if the swf2lwf.rb timeline analysis fails to determine where the action or embedded script runs:

  • SWF version 3 Action (gotoAndPlay, stop, etc.)
  • Embedded JavaScript (JavaScript for LWF Control starting with /*js)
  • Embedded Lua Script (Lua Script for LWF Control starting with /*lua)

This means that when you author with Adobe Flash, you write a Flash Action or JavaScript/Lua script to control the LWF, but it does not run during LWF playback.

It may be avoided by adding an instance name to a movie clip containing a timeline for writing a Flash Action or JavaScript/Lua script, or to a button placed there.Alternatively, to improve the swf2lwf.rb, we recommend that you report 100% reproducible fla files on https://github.com/gree/lwf/issues.


2022-09-30 20:24

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.