Changeset 2784 -- 2011-12-05 02:00:29
- Author
よや
- Comment
- メソッド名変更 replaceEditTextString => replaceEditString
Diffs
IO_SWF/trunk/sample/swfreplaceedittextstring.php
@@ -1,31 +0,0 @@
-<?php
-
-require_once 'IO/SWF/Editor.php';
-// require dirname(__FILE__).'/../IO/SWF/Editor.php';
-
-if ($argc != 4) {
- echo "Usage: php swfreplaceedittextstring.php <swf_file> <id> <initial_text>\n";
- echo "ex) php swfreplaceedittextstring.php test.swf 1 baa\n";
- echo "ex) php swfreplaceedittextstring.php test.swf foo baa\n";
- exit(1);
-}
-
-assert(is_readable($argv[1]));
-
-$swfdata = file_get_contents($argv[1]);
-$id = $argv[2];
-$initialText = $argv[3];
-
-$swf = new IO_SWF_Editor();
-$swf->parse($swfdata);
-
-$ret = $swf->replaceEditTextString($id, $initialText);
-
-if ($ret === false) {
- echo "failed to replaceEditTextString($id, $initialText)\n";
- exit(1);
-}
-
-echo $swf->build();
-
-exit(0);
IO_SWF/trunk/sample/swfreplaceeditstring.php
@@ -0,0 +1,31 @@
+<?php
+
+require_once 'IO/SWF/Editor.php';
+// require dirname(__FILE__).'/../IO/SWF/Editor.php';
+
+if ($argc != 4) {
+ echo "Usage: php swfreplaceeditstring.php <swf_file> <id> <initial_text>\n";
+ echo "ex) php swfreplaceeditstring.php test.swf 1 baa\n";
+ echo "ex) php swfreplaceeditstring.php test.swf foo baa\n";
+ exit(1);
+}
+
+assert(is_readable($argv[1]));
+
+$swfdata = file_get_contents($argv[1]);
+$id = $argv[2];
+$initialText = $argv[3];
+
+$swf = new IO_SWF_Editor();
+$swf->parse($swfdata);
+
+$ret = $swf->replaceEditString($id, $initialText);
+
+if ($ret === false) {
+ echo "failed to replaceEditString($id, $initialText)\n";
+ exit(1);
+}
+
+echo $swf->build();
+
+exit(0);
属性に変更があったパス: IO_SWF/trunk/sample/swfreplaceeditstring.php
___________________________________________________________________
追加: svn:mergeinfo
IO_SWF/trunk/IO/SWF/Editor.php
@@ -552,7 +552,7 @@
array_splice($this->_tags, $target_sprite_tag_idx, 0, $mc_character_tag_list);
return true;
}
- function replaceEditTextString($id, $initialText) {
+ function replaceEditString($id, $initialText) {
$this->setCharacterId();
foreach ($this->_tags as &$tag) {
if ($tag->code == 37) { // DefineEditText
@@ -568,7 +568,6 @@
return false;
}
if ($tag->tag->VariableName === $id) {
- var_dump($tag);
$tag->tag->InitialText = $initialText;
$tag->content = null;
return true;