Closed asweare closed 10 years ago
The movieclip, which you want to control, should have instance name like "kaiju".
Movie kaiju = lwf["kaiju"];
if (kaiju != null) {
kaiju.GotoAndPlay("dd_joy01");
}
wow, thank you so much for reply, i tried, to do it for my self, but i couldn't get it to work :(
do you you can give more details on the script ?
this is script i tried to use...
i am designer, i am don't really know much about the script,
so it would be great if u can give me lot more details,
thank you :)
public class kaij : LWFObject // Use this for initialization void Start () {
Load("switch_animation_with_label.lwfdata/switch_animation_with_label", "switch_animation_with_label.lwfdata/");
if (kaiju != null) {
kaiju.GotoAndPlay("dd_joy01");
}
}
public class kaij : LWFObject
// Use this for initialization
void Start () {
Load("switch_animation_with_label.lwfdata/switch_animation_with_label", "switch_animation_with_label.lwfdata/");
GotoAndPlayMovie("kaiju", "dd_joy01");
}
GotoAndPlayMovie, the first argument is the instance name, which you want to control. the second argument is the label name or the frame number that is 1 origin as Flash.
(totally forgot about my own implementation :)
it works perfectly thank you so much !!
Hello,
recently I am trying to switch animation by label,
luckly I found great example by you guys,
I took at look at the sample and follow exactly same step,
in Flash, and Unity,
when I did simple version with only two images,
it seems to work fine,
so I did it with much more complicated work,
but it just doesn't work , and I have no clue how to fix it.
I used exact same script and everything else in the unity,
do you think you can take a look at my flash file??
my flash file is at
https://www.dropbox.com/s/uj802oj27mh12eg/dragon02.zip
thank you so much for helping me out