02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous VideoNext Video

Renaming a Class

When you rename a class its called refactoring, but who cares about that. Let us look at how to rename our main class and the steps involved while working in the Adobe Flash editor. Ready to refactor?

Video Transcript

00:00Personally I'm happy with the name main. That's the name that I would like to call my main class
00:06But what if you're not happy with that name you really didn't have to call your main class main if you wanted to you could
00:12Have called it whatever you wanted to but when you change the name you have to make sure that that name is changed throughout
00:18So let's just do it for example if we didn't want to call our main main
00:22I'm just going to close our main. I'm going to revisit our folder or again in our folder, and I'm just going to name main to
00:30Let's say we'll call this app
00:33instead app in my class definition which is in line four and I would want to change my apple to online six which is my
00:41Constructor and we're going to get in now that we've called it app and if I change that name the app and I run my
00:46Application our application should be still working and everything should be excellent all right

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!