Archive for the ‘FDT’ Category

in bed with … [EMBED]

Monday, July 26th, 2010

Using flash develop or FDT and sick of going back to CS4/5 just to create some swc’s that you might have to change everytime you update any of the assets? So 2000 and something…

Use embeds!

I started using a generic static class to add all my embeds for a project and then you can easily draw them from there.

The static class:

public class HomePageAssets {

[Embed(source="../../../bin-debug/assets/loader/bar.png")]
public static var BrandBar : Class;

[Embed(source="../../../bin-debug/assets/loader/dude_again.png")]
public static var DudeAgain : Class;

[Embed(source="../../../bin-debug/assets/loader/logoType.png")]
public static var LogoType : Class;

...

And in any class:

addChild(new HomePageAssets[myAssetVar]);      // e.g. "BrandBar"

Njoy!

FDT – not enough memory : -Xmx512m

Tuesday, June 1st, 2010

If you run FDT on a Hackintosh netbook or maybe even though if you don’t, you might startup FDT first time and discover that it wants you to play with it’s .ini file.

On a windows machine, the file is fond easily, on a Mac less so.

Right-click on the FDT app (or Eclipse) and choose ‘Show package contents’ then click into that folder to find the eclipse.ini file.

I needed to replace the -Xmx512m line with -Xmx768m to get the app going.

Hope that helped.

FDT – sandbox error (load xml, etc.)

Monday, February 15th, 2010

Solved: It took me a fair while to find anything on this that actually worked and the Flash Player Trust directory kept on popping up.

One will have to check the latest Flash Player security paper.

For Flash Player 9 you can find it here.
And you want to look for information on the: Global Flash Player Trust directory

On mac it is located at: /Library/Application Support/Macromedia/FlashPlayerTrust/

In there you can simply create a file with the suffix .cfg, which the Flash Player checks every time it starts up and plays an swf.

If the file or folder path is in that file, it is trusted and doesn’t throw sandbox errors anymore. In the above case, I haven’t tested if it’s the swf or the xml that Flash has to trust, but in my case they are both somewhere beyond the folder I added in the file (/Users/marcuskirsch/Documents/–JOBS/0064SCMI/201006AntennaFuture/DEV).

I named my file : fdtTrust.cfg

That means everything inside the DEV folder is kosher.

This one works for me and player 9 on Snow Leopard and FDT 3.5 enterprise, I haven’t checked on player 10 which might have all that in an Adobe folder rather than Macromedia(not sure about this), I guess the security paper on 10 will mention it.

UPDATE:
after wrestling with more than 3 other machines it seems I tried lots of things and missed the working one.
Here is the one that worked on my last machine:
set your workspace to trusted at this website:
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
That should render it nicely.

Hope that helped you guys.

FDT – rendering for standalone applications

Monday, February 15th, 2010

First: Have you installed all the flash debug players you want?

google: download flash debug player and you will get a list of players (standalone, plug-in) at Adobe that you can download for your OS. also here

How to install into FDT:

After downloading and installing the latest debug flash player from Adobe, tell FDT where it is by opening FDT and change the Preferences at:

Preferences > FDT > Tools > Flash Player

Browse to the player in the Flash folder or wherever you have placed your Flash Player.app(mac)

Reset your Debug or Run settings so that they use Adobe Flash Player.

This should get you started playing the swf in the Adobe Player.

Now this will still result in sandbox problem if you want to load xml files, etc. locally.

If you want to fix this, look up this blog entry.

FDT – shortcuts

Friday, February 12th, 2010

nice little list I found:

Mac Win Name Type Context
CMD+1 CTRL+1 Quick Fix Generating Code If Error exists
CTRL+Space CTRL+Space Auto Completion Generating Code Editing Code
F2 F2 Show Class/Interface in Flash Explorer Navigation Editing Code
F3 F3 Open Declaration Navigation Cursor over Type, Property, Function
F4 F4 Show Type Declaration Navigation Cursor over variable
CMD+T CTRL+T Quick Type Hierarchy Navigation Cursor over Type or Function
CMD+O CTRL+O Quick Outline Navigation Editing Code
CMD+7 CTRL+7 Toggle Comment Code Editing Editing Code
CMD+U CTRL+U Quick Type Dependency Navigation Editing Code
CMD+SHIFT+T CTRL+SHIFT+T Open Type Navigation Editing Code
CMD+R CTRL+R Find References Search Cursor over Type, Function, Property
CTRL+H CTRL+H Search in multiple Files Search Editing Code
CMD+D CTRL+D Delete Line Code Editing Editing Code
CMD+M CTRL+M Maximize/Minimize View Perspective Editing Code
CMD+L CTRL+L Go To Line Navigation Editing Code
CMD+0 CTRL+0 Quick Trace Code Generation Cursor over Property
CMD+SHIFT+F CTRL+SHIFT+F Format Code Formatting Editing Code
ALT+SHIFT+R ALT+SHIFT+R Rename Refactoring Editing Code
CMD+SHIFT+O CTRL+SHIFT+O Organize Imports Generating Code Editing Code

FDT – SVN: connecting your project to a repository

Wednesday, February 10th, 2010

Now I am just new to all this, yet been through the process enough to see that there are a few things here and there that appear a bit complicated whilst trying to achieve hooking up your project to SVN reposis. Here is my list, step-by-step, I hope it will help some of you.

Original setup: FDT 3 on macbook pro, snow leopard, with a CVSDude/Codesion account.

CVSDude/Codesion:

- set up an account for our project. there is plenty of discussion on having multiple projects per repository, I so far tend to separate them to have a single on for each project.

- add the subversion service (New)

- add a user or group with the appropriate privileges to the project under the ‘People’ section. If you are the admin of your subversion account, your name will already be added as default.

- copy the URL in the service list under Project Quickview next to Subversion

FDT

- in FDT go to the View/Perspective icon (top right) and if not already in the list, click on Other… and choose the SVN Repository Exploring perspective

- go to the window on the SVN Repositories window and right-click to add a New repository location

- paste your project Subversion URL into the URL field, enter your username and password in Authentication, click finish.

Now for some reason, sometimes the pasting adds the URL twice in two lines and you will receive an error. Just repeat the process above, choose the faulty URL from the dropdown this time and delete the additional URL from the textfield and connect again, it should let you in this time.

- add a ‘trunk’ and ‘tags’ folder to your repository, they will automatically recognized as special folders

- Go to the Flash FDT perspective

- create a Flash project

- Go to Team >Share Project

- Choose the project repository you ant to use for this project

- On the Specify Location screen in Simple Mode browse to the repository’s trunk to choose as location

- Finish

- On the first commit screen, tick off all files, that you don’t want to version control. E.g. for simplicity reasons, don’t commit anything with a ‘.’ in it’s name (e.g.  .settings).

- After this first commit, go to all your files and folders that you want to snv:ignore for the future. Right-click > Team > Add to svn:ignore   Most likely all not-dealt-with files will have a small question mark on them. After you set them to ignore, it will dissappear.

- Add a ‘lib’ folder to your flash project structure, it’s the place I put my swc’s. Right-click >Source Folder>Add to ClassPath  and it will show the appropriate icon.

- commit the ‘lib’ folder by right-click>Team>Commit

- to finalize, Team>Update the whole flash project

- Now you can add other flash files by dragging them onto your src or lib folder and dont forget you Main.as, which I tend to place outside the src folder by creating a new class file and copy pasting or writing whatever needs to go in there. Most other existing class files can be added by drag drop on ‘src’

- Done

Hope that helped.

!!! Important: if you like to drag and drop your code files into a new flash project and youhave been using them in another subversed project be careful! SVN puts little hidden svn files in every folder. Use TinkerTool or something similar to show hidden files on your system and clean all those up otherwise they will mess with the SVN.