Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
The Loader class can be used to load external SWF files. But problems can occur when you use it to load a SWF that contains TLF text fields. To overcome this, Flash now has the ProLoader class. The great thing about the ProLoader class is that it's added to the Code Snippets panel. So you can see how it works without having to look it up in the documentation. I'll open the Code Snippets panel and then find the Load and Unload actions and expand that folder.
I can double-click the Click to Load/Unload SWF, or Image action. So I double-click that and it says, This action requires an object to be selected on Stage. So I select the movie clip of the kid on the stage and I'll go back to the Code Snippets panel and double-click, Click to Load/Unload SWF, or Image. And here's the code, so let's take a look at it. So you note that it's pretty much the same as using a Loader class except for its called ProLoader.
You can look at the differences in Flash documentation, but if you look inside of this function, you'll see that you simply create a new instance of the ProLoader class. You call its Load Method, and add it to the stage. I'll change the URLRequest to an actual file on my computer which is called TLF.swf, and that's really it. So I'll test the movie and click on the kid. We'll see the SWF file load; it has TLF text with no problem at all.
So remember, if you're loading SWF files that contain TLF text fields, you can use the ProLoader class to get the best performance. And if you don't want to write out the code by hand, you can simply add the code snippet and Flash will write all of the code for you.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.