简体   繁体   中英

As2 Changing a Mc's Frame in Another Mc With Button

I know it may looks like a complicated problem but i will explain to you. I have a button (instance name: bt1 for example) in main frame. And i have a movie clip (mc1) in main frame too. And i have a movieclip (mc2) inside this movie clip(mc1). How can i change mc2's frame to 2 with my button in main frame? I am making a rpg-like point and click game by flash with any single actionscript code knowledge. Its too hard making it with only "on press gotoandstop" codes but only with this code I have created too many options and mechanics for this game. (For example: making stats(str, dex..), experience bar) I know it would be easy to making it with codes but i cant learn them and i cant use them. (I cant memorize them:) If you could help me with this, i would be very thankful. It helps me a lot. (Bad for my sorry English:)

This code:

on(press) {
 mc1.mc2.gotoAndStop(2)
}

Should do what you want.

Note that ActionScript 2.0 was "abandoned" even by Macromedia, and you will rarely have the engine available. I suggest investing your efforts in HTML5/Javascript to perform the same task, specially if you just have a two dimension kind of game. Check "game javascript engine" on google for some basis.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM