Installing FDT

A friend asked me today , “Is installing FDT difficult?” No not at all,and in fact with the standalone version of the software it is as easy as installing any other software. Don’t let the fact that it is build on top of eclipse scare you, but if fact that should not scare you!

We will be installing FDT Enterprise version for Mac OS X.

First download FDT Enterprise 3.5 Beta I am using the Cocoa Version. I have no idea what the difference between the Cocoa versions & Carbon version are.

Download the zip, go get a coffee, as this will take a while.

The same instructions are for each versions, I am just using this one, as I have a licence for it!

After the software has downloaded double click the installer to get started

When the installer first starts you will see the Intro screen, just keep pressing next to continue. I am just installing the defaults, and so if you want a different set up, you can adjust the settings for your set up.

I am installing the software in the /Applications folder

 

I like to keep a shortcut in my dock, but you don’t need this.

Checks all your information is correct

The install process

Informs you that everything went OK

Next you will be prompted with a screen asking if you want to try this product for 30 days, if if you have a license that you want to enter. it is up to you what you do from here, but I entered my license it was excepted, and I got the message ” Product Key accepted. Thanks and have fun!” cool`-`

Now in Eclipse based software you have to define a     workspace. This again is the default, you can change this to anything you want, and in fact as you go on, you will want to have more than one workspace! You can think of the workspace as a place to store all your Flash projects that you will be working on.

That’s it! Easy right, now you are ready to code your little heart out, have fun`-`

Setting up Flash Remoting with AS 3 & ColdFusion

Setting up flash remoting with actionscript 3.0 and ColdFusion
Create a fla, call it remoting(or something that makes sense to you).

In the actions, type the following code

import flash.net.*;
var gateway:NetConnection = new NetConnection();
var responder:Responder=new Responder(onResult,onFault);

function onResult(responds:Object):void {
    trace("cfc result"+":"+" "+responds.toString());
}

function onFault(responds:Object):void {
    //loop over the fault structure
    for (var i:String in responds) {
        trace( i + ":" + responds[i] );

    }
}

// name the default cf test server on this machine
gateway.connect("http://localhost/flashservices/gateway/");

// name of the cfc and the function in it that you want to hit in dot notation
gateway.call("com.cfcs.getTest.getTestConn", responder/*this is where any arguments to the remote call go*/);

The cfc lives on my localhost/com/cfcs/gettestConn.cfc

The cfc will look like this

<cfcomponent displayName="getTest">
  <!--- Establish a Flash Remoting Connection --->
  <cffunction name="getTestConn" access="remote" returnType="string" output="true">
    <cfreturn "....connection successful">
   </cffunction>
 </cfcomponent>

When you run your flash file you should see this in the output window

download project

Move com folder to your ColdFusion localhost host, if you are running the default set up you will need to change the port to 8500. Then run the fla file, you should be fine, with flash & ColdFusion working together!

Any question, problems? Let me know I will try to help.
I will posting another example on how to display the results from your cfc, and later how to pull database results into your flash movie as well.

loading external images

to load an image in flash is easy and only take a few lines of actionscrit

var myLoader:Loader = new Loader();
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
var fileRequest:URLRequest = new URLRequest("myImage.jpg");
myLoader.load(fileRequest);
function onLoaded(e:Event) {    
      // the image is now loaded, so let's add it to the display list!    
      addChild(myLoader);
}

I used the above image, but you can use any image at all, If you don’t use Snoopy just make sure to change the movie size to at least match the size of your image.

FDT Bloggers

I am starting a list of all bloggers out there you use & blog about their experiences using FDT! If you blog about FDT, please leave a comment so I can add you to the list!

Also, I am starting a flash blogging  aggregator service for a one stop for everything flash, and for sure there will be a FDT section`-`

FDT Blog
http://fdt.powerflasher.com/blog/

Johnny (Me `-`)
http://hfug.net
http://twitter.com/hfug

Francis Varga
Francis Varga

http://twitter.com/LittleBuddha87

Marvin Blase
http://www.beautifycode.com
http://www.twitter.com/beautifycode

Jesse Freeman (the Flash Bum)
http://flashartofwar.com/
http://twitter.com/theflashBum

Alan Klement
http://blog.alanklement.com/
http://twitter.com/ultraky

Riccardo Bartoli
http://www.rblab.com/blog
http://twitter.com/rbartoli

Marcel Fahle
http://marcelfahle.com/index.php?s=fdt
http://twitter.com/marcelfahle

Lionel Low
http://blog.flashmech.net/
http://twitter.com/flashmech

In Japanese

nbhd
http://boondockradio.net/blog/
http://twitter.com/nbhd

Makoto Matsutake
http://www.cellfusion.jp/blog/
http://twitter.com/cellfusion

In Chinese

eidiot
http://eidiot.net/
http://twitter.com/eidiot

Setting up a flash development environment with FDT

I would like to let you know in December the Hawaii Flash User Group will be hosting a FDT event here in Honolulu , and so if you are new to FDT, thinking about trying it, or a pro using FDT come check out our event.

This meeting will also be recoreded, so in the event you can’t make it, just watch the video later. It is also a good idea to come to the live event, becasue it is the only way you can ask questions.

Please check out the Adobe Groups site and RSVP if you are interested in coming to the event, it will be out last event of the year, and a huge party to follow with pizza, FDT Stickers & brochures (thanks to Burno Fonzi) software give aways, and other prizes as well

Setting up a flash development environment with FDT

FDT Challenge

I have a challenge for all new commers to actionscript 3.

If you are to the point where the flash IDE is getting on your nerves, if you are not there yet, trust me you will be!

Check out the FREE 30 day trial of FDT, and at the end of this 30 days if you are not completely in love with FDT, you are out nothing, but trust me again, after the trial you will not want to code actionscript in anything else, becasue FDT Rocks!

Download page for FDT 3.5 Beta

leave a comment and tell me what you think about FDT, or if you have questions let me know, maybe I can help`-`

Using the Button Component in FDT

Today I was wanting to use a button component for use while coding in FDT, and ran into lots of issues, so I thought that I would put up a quick post on how to do this.

Frst create a new Flash AS 3 file in Flash CS4

take a button and add it to your Library

right click the button  -» export swc call it Button. This will produce a Button.swc save someplace where you will remember. I wil beplacing mine in /Users/johnbarrett/Documents/workspace/tutorials/assets

WIll be importing this into FDT, so that we can use the button component while in the FDT environment.

Open FDT, create a new workspace(well you don’t need this, but I am) I will call it /Users/johnbarrett/Documents/workspace/tutorials

Go to your workspace, create a new flash project

Call the project a name of your choice, I am using myButton

Once the proect is create in your Flash Explorer pannel, right click on the project — » go to Linked Library — » add new

give it the path of the button.swc file, making sure that your project is the source(it should be)

Click New, and name it something(Button)and define its path

Click OK, and now you will see your new Linked libary adding the core library click OK and  Finished.

When you look now in your Linked Libary folder you will see your Button.swc added

Now we are ready to write a class that can access the Button Component, just as if we were in the Flash IDE,but only much better, becasue we have the power of FDT!

Click on the source folder(src) create a new Test class, and extend the MovieClip class

here is the example code that I am using

package {
    import flash.display.MovieClip;
    import fl.controls.Button;
    import flash.events.MouseEvent;

    public class Test extends MovieClip {
        public function Test() {
            var myButton:Button = new Button();
            addChild(myButton);
            myButton.label = "Click me";
            myButton.toggle =true;
            myButton.move(10, 10);
            myButton.addEventListener(MouseEvent.CLICK, clickHandler);
            function clickHandler(event:MouseEvent):void {
                trace("Event type: " + event.type);
            }

        }
    }
}

now debug the movie (so we can see the trace), and you will see your button in the External swf(created by FDT),
and everytime you click on it, you will see “Event type: click” in the Console

checking your actionscript version

Here is a script to check which version of actionscript your swf is


var request:URLRequest=new URLRequest("project.swf");
var loader:Loader=new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
loader.load(request);
function onComplete(evt:Event):void {
    evt.target.removeEventListener(Event.COMPLETE,onComplete);
    trace("actionscript version - "+evt.target.actionScriptVersion);
}