|
GettingStartedInShinyColor
Getting Started in More Details and Shiny Color.
Featured Here a small tutorial from start to finnish
IntroductionYou still need to do the default Getting Started tasks
Define a workspaceBecause redtamarin is not your default Flex Builder project,
Each Eclipse workspace have a .metadata folder containing various settings, Here what we have by default run EclipseExternalTools $ ./EclipseExternalTools /work/Demos/redtamarin
if you go into the folder .metadata/.plugins/org.eclipse.debug.core/.launches/ Now, close Flex Builder and restart it.
Edit our tools firstLet's open the external tools On the top left, you should see our list of tools Now, open the external tools favorite Select the order that you prefer with "move up", "move down", etc. And now, let's see our tools Here a summary of those tools
Our first projectCreate an ActionScript project and name it "test" edit the Library path and remove any default SWC reference by default you will get this error that's normal, under redtamarin there is no Sprite class (well.. not yet, another tutorial for that). So, to deactivate this error, and a bunch of other errors, you need to edit your project properties in the Builders section on the left, deselect "Flex", and confirm by clicking "OK" As it is, you disabled some Flex Builder options and settings, but nothing can work yet. You need to create two directories in your project
You should obtain this directory structure Edit again your project properties And in Library path add the lib-swc folder In details that gives Now, clean up the default code that Flex Builder created in test.as to start from fresh I know, it sucks to do all those settings by hand, I'll try to come up with a way to automate that. Voila, you're ready to write your first redtamarin program :).
Our first programBecause our tools run on the command line, it is also a good idea to display the console window Let's write some code! yes, you're not dreaming there is full syntax completion support Now, let's compile the program! and here the result the console tell us that we create a 116 bytes file, Now, let's run the code! then click on the redshell_run tool and see the console output in all its glory the username result should off course reflect the username defined on your system =). That is very basic and I hope simple, but that's how you work with redtamarin:
More stuff you should knowLet's edit our code in a way that it will generate a runtime error Run the abc file with redshell_run here the result Error #1500 as it is not very helpful ... Let's run the abc file with redshell_debug here the result Error: Error #1500: Error occurred opening file hello.txt
at avmplus:;FileSystem$/read()
at global$init()much more useful, and that's why there is also a debug release of redshell as redshell_d Now, let's be crazy and write a class. And let's make an obvious syntax error and see what happen yes, the compiler will tell you something is wrong and in red so you really can not miss it. So we spent few minutes writing a class, let's see a big screenshot the same stuff as writing code for Flash
the different stuff
Now for a special thing related to Eclipse and command line, But, depending on your coding style or what you program, putting it all in one file may not work for you, Like good old AS1 you use includes, and usually include everything from your main file. But let's see what happen when we compile Yes, including a file does not necessary import it, you have to use import
Now, let's turn this simple program in an executable, here the result It created a test2 executable, yes it should be named test, And voila, a standalone executable containing both redshell and test.abc is generated | |||||||||||||||||||||||||