| | |
Flash develop...
Please support our Graphics and Multimedia advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
OK.
At the moment, Flashdevelop is only available for windows. (I believe there are mac and *nix ports in the pipeline...Not sure how well it runs on wine.). So Windows XP or Vista is the main prerequisite. (should also work on windows 7 too!)
The other main prerequisites are the Java 1.6 runtime and the flash player 9 active X runtime control (I think I use the debug version!). I think you might also need one of the .NET runtimes (2 or 3 I expect!). All of these are free downloads! If you're running vista or 7 then the appropriate .NET runtime will most likely be in place already.
Once you've got the pre-requisites installed, you'll also need the Flex 3 SDK...If you have Flash CS3 or CS4 installed, then the SDK is already installed somewhere (can't remember offhand what the default path is).
So if you have CS3/CS4, you need to locate the SDK and make a note of the path!
If you don't have CS3/CS4, or if you can't find the SDK, you can download the Flex3 SDK for free from Adobe. Once you've downloaded the SDK, unzip it somewhere on your hard-drive and make a note of it's location!
Next download and install the latest version of FlashDevelop from flashdevelop.org.
The installer is pretty straightforward...set your preferred installation options and away you go!
Once it's installed, fire it up and away you go!
Copy and paste the following code into a new file and save it as Test.as:
Next hit Ctrl+F8 to compile the file into a .swf.
At some point you should get a dialog that will prompt you to enter the path to the Flex3 SDK. Next either manually enter the path to the flex SDK, or navigate there and hit OK. That done, flashdevelop now knows where to find the SDK and will compile the posted code into a .swf.
With any luck you should end up getting a .swf with a red ball bouncing around the screen...
And that's it, you're now ready to use flashdevelop!
Ctrl+F8 will allow you to compile the current source file into a .swf.
(also accessed using 'tools->flash tools->build current file')
Alternatively you can use 'file->new project' and use the project wizard to select one of the default projects and use the build/test project functionality of the IDE...This is very similar to creating a project in visual studio or netbeans, there are templates for several different types of flash project.
The workflow in flashdevelop is a little different to the workflow you're used to in the Flash IDE's, but there are some example projects that you can download from the flashdevelop site which will show you the basics.
BTW: If you're on *nix, there's currently no *nix version of FlashDevelop, but it is still possible to use the flex SDK to compile .swfs as the SDK contains binary tools for windows, Mac and *nix.
Simply run mxmlc and pass it the file you want to compile as a parameter.
Either do it from the command line/shell, or create a shell script to do it!
On my *nix box I've got Test.as saved on my dektop and the Flex SDK is in my Home directory...So to compile Test.as into a swf I'd use the following command:
Flash development on *nix is a bit more of a pain because there are no real IDE's available at the moment, but it's still possible. Just create the classes you need to complete your project, then use a main class to pull it all together. Finally you compile the .as file for the main class with mxmlc and thus a .swf is born. The output from mxmlc is pretty verbose too, so you'll soon track down any errors in your code.
If you have any other questions, bung 'em my way, I'd be happy to help!
Cheers for now,
Jas.
At the moment, Flashdevelop is only available for windows. (I believe there are mac and *nix ports in the pipeline...Not sure how well it runs on wine.). So Windows XP or Vista is the main prerequisite. (should also work on windows 7 too!)
The other main prerequisites are the Java 1.6 runtime and the flash player 9 active X runtime control (I think I use the debug version!). I think you might also need one of the .NET runtimes (2 or 3 I expect!). All of these are free downloads! If you're running vista or 7 then the appropriate .NET runtime will most likely be in place already.
Once you've got the pre-requisites installed, you'll also need the Flex 3 SDK...If you have Flash CS3 or CS4 installed, then the SDK is already installed somewhere (can't remember offhand what the default path is).
So if you have CS3/CS4, you need to locate the SDK and make a note of the path!
If you don't have CS3/CS4, or if you can't find the SDK, you can download the Flex3 SDK for free from Adobe. Once you've downloaded the SDK, unzip it somewhere on your hard-drive and make a note of it's location!
Next download and install the latest version of FlashDevelop from flashdevelop.org.
The installer is pretty straightforward...set your preferred installation options and away you go!
Once it's installed, fire it up and away you go!
Copy and paste the following code into a new file and save it as Test.as:
ACTIONSCRIPT Syntax (Toggle Plain Text)
/** * ... * @author Jason Trunks * @version 0.1 */ package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; [SWF(backgroundColor="0xffffff", width="800", height="600", frameRate="25")] public class Test extends Sprite { private var ball:Sprite; private var vx:Number; private var vy:Number; private const radius:Number=30; public function Test() { init(); } private function init():void { stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; ball = new Sprite(); ball.graphics.beginFill(0xff0000); ball.graphics.drawCircle(0,0,radius); ball.graphics.endFill(); ball.x=stage.stageWidth/2; ball.y=stage.stageHeight/2; vx=Math.random()*20-10; vy=Math.random()*20-10; addChild(ball); addEventListener(Event.ENTER_FRAME, onEnterFrame); } private function onEnterFrame(event:Event):void { ball.x+=vx; ball.y+=vy; var left:Number = 0; var right:Number = stage.stageWidth; var top:Number = 0; var bottom:Number=stage.stageHeight; if(ball.x+radius>right) { ball.x=right-radius; vx*=-1; } else if(ball.x-radius<left) { ball.x=left+radius; vx*=-1; } if(ball.y+radius > bottom) { ball.y=bottom-radius; vy*=-1; } else if(ball.y-radius < top) { ball.y=top + radius; vy*=-1; } } } }
Next hit Ctrl+F8 to compile the file into a .swf.
At some point you should get a dialog that will prompt you to enter the path to the Flex3 SDK. Next either manually enter the path to the flex SDK, or navigate there and hit OK. That done, flashdevelop now knows where to find the SDK and will compile the posted code into a .swf.
With any luck you should end up getting a .swf with a red ball bouncing around the screen...
And that's it, you're now ready to use flashdevelop!
Ctrl+F8 will allow you to compile the current source file into a .swf.
(also accessed using 'tools->flash tools->build current file')
Alternatively you can use 'file->new project' and use the project wizard to select one of the default projects and use the build/test project functionality of the IDE...This is very similar to creating a project in visual studio or netbeans, there are templates for several different types of flash project.
The workflow in flashdevelop is a little different to the workflow you're used to in the Flash IDE's, but there are some example projects that you can download from the flashdevelop site which will show you the basics.
BTW: If you're on *nix, there's currently no *nix version of FlashDevelop, but it is still possible to use the flex SDK to compile .swfs as the SDK contains binary tools for windows, Mac and *nix.
Simply run mxmlc and pass it the file you want to compile as a parameter.
Either do it from the command line/shell, or create a shell script to do it!
On my *nix box I've got Test.as saved on my dektop and the Flex SDK is in my Home directory...So to compile Test.as into a swf I'd use the following command:
Graphics and Multimedia Syntax (Toggle Plain Text)
/home/ jason/flex3sdk/bin/mxmlc /home/jason/Desktop/Test.as
Flash development on *nix is a bit more of a pain because there are no real IDE's available at the moment, but it's still possible. Just create the classes you need to complete your project, then use a main class to pull it all together. Finally you compile the .as file for the main class with mxmlc and thus a .swf is born. The output from mxmlc is pretty verbose too, so you'll soon track down any errors in your code.
If you have any other questions, bung 'em my way, I'd be happy to help!
Cheers for now,
Jas.
Last edited by JasonHippy; Oct 5th, 2009 at 7:54 pm.
There are 10 types of people in this world.....
Those who understand binary .....
And those who don't!
Those who understand binary .....
And those who don't!
0
#4 Oct 6th, 2009
Hi,
Just downloaded the stuff I need but I can't get it to do a simple trace statement and see the output on the screen?
for example...
trace("hello");
If you could give me all the steps one by one.
Oh and how do you point it to the flash.exe so I don't have to create a html file with the .swf embedded in it to actually see it in action?
Just downloaded the stuff I need but I can't get it to do a simple trace statement and see the output on the screen?
for example...
trace("hello");
If you could give me all the steps one by one.
Oh and how do you point it to the flash.exe so I don't have to create a html file with the .swf embedded in it to actually see it in action?
Last edited by iamthwee; Oct 6th, 2009 at 6:40 am.
*Voted best profile in the world*
0
#5 Oct 6th, 2009
I hope you installed everything, please follow the below steps to get the trace.
1. Open flashdevelop, Goto project ->new project
2. For example give name of the project as "Testing", select the location to store the project. select the "create directory for project", Give Ok (It will create the project within the folder named Testing) (see one.jpg)
3. Ensure the project manager is visible (view -> ProjectManager)
4. RightClick on dot from project manager and create a new class file (see two.jpg)
5. Save the file after completion of the class to trace the word "hello" (see three.jpg and four.jpg)
6. Create a new fla file from flashIDE and save it in the same "Testing" folder
7. Dont forget to give the "nameofclass" in the class (see five.jpg)
8. Run testmovie from flashdevelop (see six.jpg & seven.jpg)
1. Open flashdevelop, Goto project ->new project
2. For example give name of the project as "Testing", select the location to store the project. select the "create directory for project", Give Ok (It will create the project within the folder named Testing) (see one.jpg)
3. Ensure the project manager is visible (view -> ProjectManager)
4. RightClick on dot from project manager and create a new class file (see two.jpg)
5. Save the file after completion of the class to trace the word "hello" (see three.jpg and four.jpg)
6. Create a new fla file from flashIDE and save it in the same "Testing" folder
7. Dont forget to give the "nameofclass" in the class (see five.jpg)
8. Run testmovie from flashdevelop (see six.jpg & seven.jpg)
1
#7 Oct 6th, 2009
Thanks for the reply, but the purpose of using Flash develop was to get away from using the bloated CS4 suite and its legal restrictions per machine.
Anyway I found a work around. Seeing as I just want to test pure actionscript code for my xml classes I am dumping all my output to a text field.
Here are my steps.
1) Create a new actionscript file in flash develop called Test.as
2) Paste the code in.
Test.as
ctrl + F8 to build...
This will generate a .swf file in the folder "FlashDevelop"
Then I create a html file with the following code
Test.html
in the flash develop folder. And I just use this html to preview my actionscript 3.0 code.
Anyway I found a work around. Seeing as I just want to test pure actionscript code for my xml classes I am dumping all my output to a text field.
Here are my steps.
1) Create a new actionscript file in flash develop called Test.as
2) Paste the code in.
Test.as
package
{
import flash.display.FrameLabel;
import flash.display.MovieClip;
import flash.events.FocusEvent;
import flash.text.Font;
import flash.text.StyleSheet;
import flash.text.TextField;
import flash.text.TextFieldType;
import flash.text.TextFormat;
import flash.text.AntiAliasType;
public class Test extends MovieClip
{
public function Test()
{
var myText:TextField;
myText = new TextField;
myText.autoSize;
addChild ( myText );
myText.width = 1000;
myText.height = 1000;
myText.mouseWheelEnabled = true;
myText.multiline = true;
myText.appendText("Hello world");
}
}
}ctrl + F8 to build...
This will generate a .swf file in the folder "FlashDevelop"
Then I create a html file with the following code
Test.html
<object width="500" height="500">
<param name="movie" value="Test.swf">
<embed src="Test.swf" width="500" height="500">
</embed>
</object>in the flash develop folder. And I just use this html to preview my actionscript 3.0 code.
Last edited by iamthwee; Oct 6th, 2009 at 11:44 am.
*Voted best profile in the world*
Sorry I'm late to the conversation...Not been about today!
I'm on my linux box again, so I haven't got a copy of Flashdevelop open in front of me...But if memory serves, there is trace functionality built into Flashdevelop. It always used to be an external plugin, but I'm pretty certain it's finally been integrated into the IDE now.
Unfortunately, I think the trace functionality only works if the actionscript file is part of a project....It doesn't seem to work if you're building/testing a single standalone AS file that isn't part of a project.
Theres no need to create any .fla's or .swfs with CS4....No need for any of that at all..Although Flashdevelop does integrate really well with the Flash IDE's, so you don't have to completely abandon the Flash IDE if you don't want to. You can get the best of both worlds! Another advantage of having the Flash IDE installed (especially if it's the professional) is you can use the more advanced Flash components in your Flashdevelop projects! Anyway..going off topic there!
Where were we? Oh yeah!
If you want to use the trace functionality, all you need to do is create a new AS3 project using one of Flashdevelops built in AS3 templates...I'd pick one of the more minimal AS3 templates...(without seeing it in front of me I can't think exactly which template it is, but you should be able to work it out!)
Then start adding your classes to your project, bung in some trace statements wherever you need 'em and then build/test the project in debug mode....When your .swf has built and starts running, anything output via trace will appear in the output panel of the FlashDevelop IDE.
The flashdevelop project files don't involve any bloat or nastiness...they're only a few k. Developing your .swfs using the projects helps to keep your code more organised and stops more complicated projects from getting too messy...But you don't have to use them....Unless you want to use the trace functionality it would seem! heh heh!
I'll try to fire up the ol' xp machine at some point and blat out a couple of example projects...Or perhaps I'll see if I can find/modify some of the example projects I downloaded back when I started using flashdevelop!
Cheers for now,
Jas.
I'm on my linux box again, so I haven't got a copy of Flashdevelop open in front of me...But if memory serves, there is trace functionality built into Flashdevelop. It always used to be an external plugin, but I'm pretty certain it's finally been integrated into the IDE now.
Unfortunately, I think the trace functionality only works if the actionscript file is part of a project....It doesn't seem to work if you're building/testing a single standalone AS file that isn't part of a project.
Theres no need to create any .fla's or .swfs with CS4....No need for any of that at all..Although Flashdevelop does integrate really well with the Flash IDE's, so you don't have to completely abandon the Flash IDE if you don't want to. You can get the best of both worlds! Another advantage of having the Flash IDE installed (especially if it's the professional) is you can use the more advanced Flash components in your Flashdevelop projects! Anyway..going off topic there!
Where were we? Oh yeah!
If you want to use the trace functionality, all you need to do is create a new AS3 project using one of Flashdevelops built in AS3 templates...I'd pick one of the more minimal AS3 templates...(without seeing it in front of me I can't think exactly which template it is, but you should be able to work it out!)
Then start adding your classes to your project, bung in some trace statements wherever you need 'em and then build/test the project in debug mode....When your .swf has built and starts running, anything output via trace will appear in the output panel of the FlashDevelop IDE.
The flashdevelop project files don't involve any bloat or nastiness...they're only a few k. Developing your .swfs using the projects helps to keep your code more organised and stops more complicated projects from getting too messy...But you don't have to use them....Unless you want to use the trace functionality it would seem! heh heh!
I'll try to fire up the ol' xp machine at some point and blat out a couple of example projects...Or perhaps I'll see if I can find/modify some of the example projects I downloaded back when I started using flashdevelop!
Cheers for now,
Jas.
There are 10 types of people in this world.....
Those who understand binary .....
And those who don't!
Those who understand binary .....
And those who don't!
0
#9 Oct 6th, 2009
Thanks Jas. Yeah, ideally I don't want to use CS4 at all because of the bloat and obviously I can only use it on the one PC I have it installed on with that license.
Now when I build the file ctrl + F8 I get a swf file generated in the flashdevelop folder. But I can only see the output if I create a html file.
So that must mean I'm not setting the path to the flash debug exe. So the question is how do I do that, so I don't have to go about using the convoluted way of creating a textField as a makeshift trace function?
Other than that, I'm really liking how quickly you can compile and test PURE actionscript 3.0 code.
I can't tell you how painful it was compiling a big project in CS4, sometimes it would take a whole minute to compile. Now I can just separate out my xml functions and build/compile them in Flash Develop -which is much more faster.
Thanks for the heads up on Flash develop!
Now when I build the file ctrl + F8 I get a swf file generated in the flashdevelop folder. But I can only see the output if I create a html file.
So that must mean I'm not setting the path to the flash debug exe. So the question is how do I do that, so I don't have to go about using the convoluted way of creating a textField as a makeshift trace function?
Other than that, I'm really liking how quickly you can compile and test PURE actionscript 3.0 code.
I can't tell you how painful it was compiling a big project in CS4, sometimes it would take a whole minute to compile. Now I can just separate out my xml functions and build/compile them in Flash Develop -which is much more faster.
Thanks for the heads up on Flash develop!
Last edited by iamthwee; Oct 6th, 2009 at 5:22 pm.
*Voted best profile in the world*
0
#10 Oct 7th, 2009
Thanks Iamthwee, I executed your script and got the solution that you had.
Settings:
1. Go to -> Tools -> program settings (F10)
2. From left select AS3Context and Right select Flex SDK Location (Give proper location of your flexsdk)
3. From left select FlashViewer and Right select External Player Path (Give proper location of your player)
By these settings I got the swf directly executed from the player when used ctrl+f8. But can't able to trace. Needed help from Jason.
Settings:
1. Go to -> Tools -> program settings (F10)
2. From left select AS3Context and Right select Flex SDK Location (Give proper location of your flexsdk)
3. From left select FlashViewer and Right select External Player Path (Give proper location of your player)
By these settings I got the swf directly executed from the player when used ctrl+f8. But can't able to trace. Needed help from Jason.
![]() |
Similar Threads
- Opening for Flash Programmer (Software Development Job Offers)
- Flash Developer, NYC, 75K + 5 % Bonus (Software Development Job Offers)
- Flash Video Platform Expert - DC (Web Development Job Offers)
- Multiple Flash Developer Roles (Web Development Job Offers)
- Flash Developers All Levels (Web Development Job Offers)
- R/GA Seeking Flash Dev's All Levels in NYC (Web Development Job Offers)
- Senior Level Flash Developer (Software Development Job Offers)
- Seeking a FT Flash Developer-NJ/NY Metro Area, USA ONLY (Web Development Job Offers)
- Slideshow Des/Dev - PHP/SQL/XML/FLASH/AS/AJAX, not all needed but it wouldn't hurt. (Web Development Job Offers)
- Is Flash the Future? (Graphics and Multimedia)
Other Threads in the Graphics and Multimedia Forum
- Previous Thread: Copyright
- Next Thread: Embedding flash into web-site
| Thread Tools | Search this Thread |
.net 3.5 acrobat actionscript3 adobe adobereader affordable apple att auction avoiddatacharges calendar cellphone cloud cpanel dedicated desktop directory displayimageinsteadofflash distributions download downloads eclipse elasticcomputecloud exchange facebook firefox flash flex fotb free freewebhosting fsf ftc gaming gnu google harddrive hardware hosting iamthwee ibm imflash industry intel interactivemap iphone javascript knowledge laptop lexicon links linux mac macbook map memory michaelmoore micron microsoft mobile monitoring movies mysql news novell p2p pcm pdf photosynth php piratebay play projectmanager quicktime ram search security silverlight skills sms software ssd stallman storage streamingmedia swappingxmlfromflash swappingxmlnodes swf telephone video vulnerability web webhosting website windows7 windowsmedia xml zend zeroday







