powered by nequal
Home » IO_SWF » Timeline » 2485

Changeset 2485 -- 2011-06-10 18:35:05

Author
よや
Comment
replaceActionString を replaceActionStrings に変更

Diffs

IO_SWF/trunk/sample/swfreplaceactionstring.php

@@ -21,7 +21,8 @@
$swf->parse($swfdata);
-$swf->replaceActionString($from_str, $to_str);
+$swf->replaceActionStrings($from_str, $to_str);
+// $swf->replaceActionString($from_str, $to_str); // obsolute
echo $swf->build();

IO_SWF/trunk/IO/SWF/Tag/Action.php

@@ -38,7 +38,7 @@
$writer->putUI8(0); // ActionEndFlag
return $writer->output();
}
-    function replaceActionString($from_str, $to_str) {
+    function replaceActionStrings($from_str, $to_str) {
foreach ($this->_actions as &$action) {
switch($action['Code']) {
case 0x83: // ActionGetURL

IO_SWF/trunk/IO/SWF/Editor.php

@@ -129,17 +129,21 @@
}
}
}
-    function replaceActionString($from_str, $to_str) {
+    function replaceActionStrings($from_str, $to_str) {
foreach ($this->_tags as &$tag) {
$code = $tag->code;
switch($code) {
case 12: // DoAction
$action = new IO_SWF_Tag_Action();
$action->parseContent($code, $tag->content);
-                $action->replaceActionString($from_str, $to_str);
+                $action->replaceActionStrings($from_str, $to_str);
$tag->content = $action->buildContent($code);
break;
}
}
}
+    // 2.01 の互換性確保用。Strings の方が正しい。
+    function replaceActionString($from_str, $to_str) {
+        return $this->replaceActionStrings($from_str, $to_str);
+    }
}