How to Use the Example Files
How to use the example files
I want it to be easy for you to open up the example files and get the swf running from your own IDE. I will try to make it as easy as possible, but there's almost always going to be some set up on your part needed to run the file. Unless otherwise stated, I'm going to assume that you're opening the FLA files in Flash Professional and running the swf from there. Also, I'll assume that you have an external action strip 3 programming IDE for writing the code (I’m using Flash Builder, but you can use something else if you like). It should also be noted that you can compile from
your coding IDE, but highly recommend getting access to Flash Professional.
The directory structure for sample files should be the standard/directory for simple project. That is, you will have an SRC folder with all the code in it, a client folder with me FLA, a bin folder where the swift file will be created, and a lib folder for any external libraries.
So in order to get the project going you will want to open the FLA file. You can do this by right clicking and selecting open or just double-click on it. I should open up in Flash Professional. If it doesn’t you might need to go into Flash Professional, choose File -> Open, and browse to the file. The .fla extension is something that is very unique to flash professional, and so this will be the only program you can use to open the .fla files. This is why it is important to have the creative cloud membership.
Once you have the client file open in Flash Professional you're going to want to set the file paths so that it can find the bin folder src folder that live locally on your computer. In order to do this all you need to do is go to File -> Actionscript properties. The actionscript properties dialog window should pop up, and you'll see three tabs near the center of the window. Make sure the left one (source) is selected, and then we're going to add the src folder that's in your sample tutorial download and add that. If there is another if there is a path already there you can select it and then browse to overwrite it.
You will see that this path is probably for my computer. So if your computer tries to look for folders with these names it will not find them, and a warning will be generated when you compile the project. So now that you have added a source folder let's click on the next tab (libraries) in the actionscript properties window, and we will add any library source files here. Instead of including the library swc files in the projects I’m going to display clearly in the beginning of the post what swc files you will need. This way you won’t have a ton of copies of the same swc, you’ll have the most up-to-date version of the swc, and I won’t be infringing on any licenses by distributing other people’s stuff.
When you are done adding the library path(s) click okay and close the pop up click okay to close the pop up. Now you just want to change the path for where the created Swift will be placed to the bin directory. To do this go to File -> Publish Settings, and this will open the publish settings dialog window. Look on the left side bar for the SWF checkbox and make sure it's ticked. Then click on the SWF words, and the content of the dialog box should change accordingly (if it's not already showing that information). Click on the little folder icon next to the swf output option. This will allow you to choose the folder where this swift file is created. Choose the bin folder and then type in the name that you want the swift files to have. Each time you compile the swf will be overwritten. It will have the same name until you change these properties, but it will always be the newest build.
Okay, you are all set up to test the file! Now you can either hit control + enter to test or go up in the top menu to actions test movie. In order to use your coding IDE you will most likely need to make the same path adjustments as we did here. Happy coding.
I want it to be easy for you to open up the example files and get the swf running from your own IDE. I will try to make it as easy as possible, but there's almost always going to be some set up on your part needed to run the file. Unless otherwise stated, I'm going to assume that you're opening the FLA files in Flash Professional and running the swf from there. Also, I'll assume that you have an external action strip 3 programming IDE for writing the code (I’m using Flash Builder, but you can use something else if you like). It should also be noted that you can compile from
your coding IDE, but highly recommend getting access to Flash Professional.
The directory structure for sample files should be the standard/directory for simple project. That is, you will have an SRC folder with all the code in it, a client folder with me FLA, a bin folder where the swift file will be created, and a lib folder for any external libraries.
So in order to get the project going you will want to open the FLA file. You can do this by right clicking and selecting open or just double-click on it. I should open up in Flash Professional. If it doesn’t you might need to go into Flash Professional, choose File -> Open, and browse to the file. The .fla extension is something that is very unique to flash professional, and so this will be the only program you can use to open the .fla files. This is why it is important to have the creative cloud membership.
Once you have the client file open in Flash Professional you're going to want to set the file paths so that it can find the bin folder src folder that live locally on your computer. In order to do this all you need to do is go to File -> Actionscript properties. The actionscript properties dialog window should pop up, and you'll see three tabs near the center of the window. Make sure the left one (source) is selected, and then we're going to add the src folder that's in your sample tutorial download and add that. If there is another if there is a path already there you can select it and then browse to overwrite it.
You will see that this path is probably for my computer. So if your computer tries to look for folders with these names it will not find them, and a warning will be generated when you compile the project. So now that you have added a source folder let's click on the next tab (libraries) in the actionscript properties window, and we will add any library source files here. Instead of including the library swc files in the projects I’m going to display clearly in the beginning of the post what swc files you will need. This way you won’t have a ton of copies of the same swc, you’ll have the most up-to-date version of the swc, and I won’t be infringing on any licenses by distributing other people’s stuff.
When you are done adding the library path(s) click okay and close the pop up click okay to close the pop up. Now you just want to change the path for where the created Swift will be placed to the bin directory. To do this go to File -> Publish Settings, and this will open the publish settings dialog window. Look on the left side bar for the SWF checkbox and make sure it's ticked. Then click on the SWF words, and the content of the dialog box should change accordingly (if it's not already showing that information). Click on the little folder icon next to the swf output option. This will allow you to choose the folder where this swift file is created. Choose the bin folder and then type in the name that you want the swift files to have. Each time you compile the swf will be overwritten. It will have the same name until you change these properties, but it will always be the newest build.
Okay, you are all set up to test the file! Now you can either hit control + enter to test or go up in the top menu to actions test movie. In order to use your coding IDE you will most likely need to make the same path adjustments as we did here. Happy coding.