svnno****@sourc*****
svnno****@sourc*****
2011年 3月 28日 (月) 00:26:34 JST
Revision: 476 http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=476 Author: yoya Date: 2011-03-28 00:26:34 +0900 (Mon, 28 Mar 2011) Log Message: ----------- replaceMovieClip でシンボル中のインスタンス名も指定できるようにした。 Modified Paths: -------------- trunk/src/swf_object.c -------------- next part -------------- Modified: trunk/src/swf_object.c =================================================================== --- trunk/src/swf_object.c 2011-03-27 14:22:07 UTC (rev 475) +++ trunk/src/swf_object.c 2011-03-27 15:26:34 UTC (rev 476) @@ -1009,12 +1009,24 @@ } // インスタンス名から PlaceObject を探し、参照している CID を取得する for (tag=swf->tag_head ; tag ; tag=tag->next) { + cid = 0; if (tag->tag == 26) { // PlaceObject2 cid = swf_tag_place_get_cid_by_instance_name(tag, instance_name, instance_name_len, swf); - if (cid > 0) { - break; // found + } if (isSpriteTag(tag->tag)) { + swf_tag_t *t; + swf_tag_sprite_detail_t *tag_sprite; + tag_sprite = swf_tag_create_input_detail(tag, swf); + if (tag_sprite == NULL) { + fprintf(stderr, "swf_object_replace_movieclip: tag_sprite swf_tag_create_input_detail failed\n"); + continue; } + for (t = tag_sprite->tag ; t ; t = t->next) { + cid = swf_tag_place_get_cid_by_instance_name(t, instance_name, instance_name_len, swf); + } } + if (cid > 0) { + break; // found + } } if (cid <= 0) { fprintf(stderr,