Friday, December 17, 2010

Learn Arabic Alphabets

Couple of days ago i published my first Android application. I used Flash Pro to develop the application, and it was an amazing experience from beginning to end. My application is mainly to teach users how to write and pronounce the alphabets. Below are some of the screenshots :



Hope you download and enjoy!!

Tareq

Monday, October 11, 2010

Packager for iPhone is now available


An updated release of Packager for iPhone is now available. The Packager for iPhone, which is a feature of Adobe® Flash® Professional CS5 software and the Adobe AIR® SDK 2.0.1, offers Flash developers a fast and efficient method to reuse existing code from ActionScript 3 projects to deliver native applications on iOS devices


Wednesday, October 6, 2010

Font Embedding Tip

If font embed metadata  stopped working “not showing the font when test movie or publish ” in Flash CS5  when it used to work just fine in Flash CS4 that’s because Flash CS4 embeds DefineFont3 tags while Flash CS5 embeds DefineFont4 tags.

DefineFont4 is mainly used with TLF to to selectively embed glyphs from a font for use in Text Layout Framework(TLF), also known as font subsetting while DefineFont3 is more for classic fonts.

There are a few ways to fix this problem. First, there is an optional parameter to the [Embed] tag for fonts that specifies which type of font tag to create. Add embedAsCFF="false" to the list of parameters in the embed tag to do this.

[Embed(source="Verdana.ttf", embedAsCFF= "false", fontFamily="_Verdana")]

Another option, if you do not want to change all of your [Embed] tags, is that you can edit the FlexInfo.xml file copied into your user local settings directory (e.g. C:\Users\taljaber\AppData\Local\Adobe\Flash CS5\en_US\Configuration\ActionScript 3.0\FlexInfo.xml for me on win7) and edit that file by uncomment the line that sets the compatibility version to 3.0 at the end of that file. I'm not sure what other side effects this change might have, but it definitely forces all embedded fonts to be embedded as DefineFont3 tags.

I would recommend updating the [Embed] tag for fonts to do embedAsCFF="false".



Wednesday, September 8, 2010

Adobe Flash Pro 11.0.2 Update is Live

Flash Pro 11.0.2 Update is now available via CS Update and is posted on Adobe.com for download http://www.adobe.com/support/flash/downloads.html

You can also launch Adobe Flash Pro and select "updates" from under the "Help" menu which should trigger the update dialog.

This update addresses the following issues :

  1. Several fixes to improve the opening of some legacy files and correctly saving them in the new XFL format for Flash Professional CS5.
  2. Addresses issues where some components are unable to be added to the stage.
  3. TLF bug fixes.
Enjoy!
Tareq

Monday, July 26, 2010

Flash Professional glossary (A-Z)

Adobe has just launched a comprehensive glossary of terms relevant to working with Flash Professional. Each page includes the definition of a key concept along with step-by-step instructions, when relevant, for completing the task.
This document intended to be a living document, so please provide your comments/feedback to help improve or add new entries.

http://www.adobe.com/devnet/flash/articles/flash_key_concepts.html

Thursday, June 17, 2010

Using FLASH BUILDER 4 Debugger to Debug Flash Professional Projects

In my previous two posts (Create Flash Professional Project in Builder- Part 1 and Part 2) I talked about how to create a Flash Professional Project in Adobe Flash Builder 4, which opened the door for Adobe Flash Professional CS5 to use the Adobe Flash Builder 4 debugger and profiler.
Once a user create a Flash Professional Project in Flash Builder a debug SWF will be generated by Flash Professional CS5 in the bin-debug folder of the project location. This SWF will get updated every time actionscript code in the project changes and is saved in Flash Builder. If you need to rebuild after tweaking assets in Flash Professional, you would need to trigger the debug SWF generation manually in Flash Builder just by modifying an actionscript file in the Flash Professional Project in Flash Builder, then saving.
Remember:
1. Adobe Flash Builder 4 debugger can only debug external actionscript classes. NO debugging for frame script.
2. When creating your Flash Professional Project, a default application class gets created automatically that has the same name as the project name. If you delete this file, the debugger will not work since it’s looking for an application file to start the debugging process.
In the below tutorial, I am going to demonstrate how to debug a Fla file that has a document class using Flash Builder 4 debugger.
1. Launch Adobe Flash Professional CS5.
2. File > New (ActionScript 3.0) Fla file.
3. File > Save the Fla file inside a folder on your machine. In my case, I am going to save it as (FBDebugger.Fla).
4. Window > Properties to open the Properties panel if it is not already.
5. Under Publish category in the PI. Add document class name. In my case, I am going to call it “DocClass” as follows :

6. Click on “Edit class definition” button .

7. Select Flash Builder when prompted with the following dialog :

8. Click OK which should launch Flash Builder if it is not launched already.
9. In Flash Builder, click “Finish” when prompted with the following dialog :

10. Since the document class did not exist, Flash Builder will prompt you to create one as follows :

11. Click “Finish” button.
12. Now let’s look at the Flash Professional Project structure that got created.
a. Project Name: The project name is always the same as the Fla file name.
b. Default Application File: This file is not used by the Flash Professional Project at all, BUT it is very important to have for the Flash Builder debugger to work. PLEASE DON’T DELETE THIS FILE SO THE DEBUGGER/PROFILER WORKS. In our case the default application file for the project is FBDebugger.as which is again not being used at all, but it is since Flash Builder requires that file to exist.
c. FBDebugger.swf (Debug swf) and FBDebugger.html inside the bin-debug folder. This swf is going to be used by the Flash Builder debugger to debug your project.
d. Reference Libraries: This has all the links to your libraries and classes.

13. Open DocClass.as in Flash Builder and add a break point for the document class constructor as follows :

14. Run > Debug FBDebugger as follows:

15. Click Yes when prompted with the following dialog :

16. Flash Builder Debugger session should get started as follows :


 In future posts I am going to demonstrate how to use Flash Builder 4 profiler for Flash Professional Project.
Enjoy!








Tuesday, June 8, 2010

Create a Flash Professional Project in Flash Builder - Part 2

In my previous post "Create a Flash Professional Project In Flash Builder Part 1" I talked about creating a Flash Professional Project starting from Flash Builder 4. In this post I am going to cover creating Flash Professional Project starting from Flash Professional CS5. Let me first go over the new "ActionScript 3.0 Class" and  "ActionScript 3.0 Interface" templates that got added to Adobe Flash Professional CS5.Do the following to create a new ActionScript 3.0 Class template:
  1. Launch Adobe Flash CS5.
  2. File > New and select "ActionScript 3.0 Class item as follows :



  3. Click OK.
  4. Since I have Adobe Flash Builder 4.0 installed on my machine, I got promoted with the following dialog that ask me to choose which product (Flash Professional or Flash Builder) to use to create my class.


  1. Enter a class name and select Flash Professional to create my class.
  2. Click OK.
  3. As you see below,a new ActionScript file gets created with a bare bone class code. 
  4. File > Save. Notice that the save dialog was automatically populated with the name of the class, in our case it is "MyClass" And notice it is going to automatically save it next to the Fla file by default unless user choose a different location.

Enough Talking about the class template and let's jump into creating a Flash Professional Project from Flash. Entry points to create FPP(Flash Professional Project) are :
  1.  Document Class edit class definition button : 
  2. Symbol (Movie Clip, Button, Bitmap, Font, Sound) class.
Let's create a Flash Professional Project using the document class "Edit class definition" button :

  • Launch Adobe Flash Professional CS5.
  • File > New and select "ActionScript 3.0" Fla file.
  • Click OK.
  • File > Save and save the Fla file inside a folder on your desktop.
  • Window > Properties to show the PI if it is not already there.
  • Enter a class name in the class name text field in the PI. Let's assume you enter "MyClass" as a document class.
  • Click on "Edit class definition". The first time you click on the document class "Edit class definition", you should get the following dialog :

  • Check on "Don't show again." and click OK.
  • Click on "Edit class definition" button again. You should get promoted with the following dialog :

  • Select "Flash Builder" and click OK.
  • Flash Builder is going to get launched if it is not already and you should get promoted with the Project creation dialog as follows :


Notice the following : 
  1. Target file is the Fla file where you triggered the project creation from.
  2. Default location is where your project is going to get created,Which is by default is the Flash Builder workspace. You can always change the location and point to a different location.
  • Click Finish.
  • Flash Builder is going to prompt you with a dialog to create your document class since it does not exist yet as follows :

  • Click Finish.
Results : 
  1. Flash Professional Project named after the Fla file name.
  2. Document Class "MyClass.as".
  3. Flash Professional Test Movie, Debug, Publish icons gets enabled.
  4. ActionScript class file named after the Fla file name. Flash Professional Project does not use this ActionScript file at all. It is just a Flash Builder project dependency and it has to be created.
See the below screenshot :
From here you can code in Flash Builder all you want and utilize all the good code editor features and Test Movie, Debug Or publish from within Flash Builder.
Enjoy!


Thursday, June 3, 2010

Adobe Flash Pro CS5 Update 11.0.1 is Live

x

This update includes AIR 2.0 support in Flash Pro, Packager for iPhone enhancements, and other bug fixes. To run the updater do the following :


  1. Launch Adobe Flash Pro CS5.
  2. Help > Updates...
  3. Quit Adobe Flash Pro CS5
  4. Click UPDATE.
  5. Quit when the updater is finished and launch Adobe Flash Pro CS5.
To confirm the result :
  1. File > New.
  2. Then select "IPhone OS".
  3. Click OK.
  4. From the Properties panel click on the iPhone OS Settings Edit button.
  5. Click on "Icons" tab and you should see 2 new icons for iPad

Click here Adobe Flash Pro CS5 Update 11.0.1 to learn more.





Tuesday, June 1, 2010

Flash Professional Does Not Show Code Hints

Code hints sometimes does not show or work correctly due to cache corruption. To solve this issue you only need to delete your user config folder and that should do it for you.
Please make sure to quit Flash Professional before deleting your user config folder.

Mac :
Macintosh HD/Users//Library/Application Support/Adobe/Flash CS5/

Windows XP:

boot drive\Documents and Settings\\Local Settings\Application Data\Adobe\Flash CS5\

Windows Vista:

boot drive\Users\\Local Settings\Application Data\Adobe\Flash CS5\

Windows 7 :
boot drive\Users\\AppData\Local\Adobe\Flash CS5

The other issue is that when you don't get code hints for controls. for example, no code hints when you do the following

fl.

and you are expecting fl.controls.

To solve this issue drag a component to your library (checkbox,DataGrid,etc..). and try again.


Enjoy!

Flash Builder Data Centric - Flash Builder - PHP

I have been using the new Data Centric feature in Flash Builder 4 For the past 2 weeks or so and it was an awesome experience from beginning to end until I hit an error where I got stuck for almost a day or so.I Could not solve the problem on my own so I asked around and I got the answer from the Flash Builder team. My project was Flash builder,PHP and mysql database.

Problem Description : Every time I try to delete a record, I get the following error :

ArgumentError: Attempt to use managed delete method with an item that is not managed on this client.

Root cause of the problem : I had enabled Data management for an entity and delete method is part entity’s data service operations

Solution :
If data management is enabled, we can only modify data that is managed/returned by the server. So you can only delete a record if it is returned by the server.

Depending on your application’s logic, you may either want to remove delete operation from Data Management or delete the record after getting a record from the server.
To remove delete operation from entity’s managed operations, Context click on the entity->Enable Data Management ->Click Next-> Set the delete item operation to None.

Thanks,
tareq

Thursday, May 27, 2010

Create a Flash Professional Project in Flash Builder - Part 1

In this post I am going to cover part of the new Flash Pro/Flash Builder feature that we implemented in the recent release of Adobe Flash Authoring (Adobe Flash CS5).I am going to start with the entry points to create your Flash Professional Project.

From Adobe Flash Builder 4 :
1. Launch Adobe Flash Builder.
2. Right click on package Explorer and select "Flash Professional Project" as follows :



3. Select New > Flash Professional Project and you should get prompted with the following dialog :

4. Click on the browse button and select a target Fla file. Remember each Flash Professional Project has to be have a target Fla file. As you see in the above dialog, the default location on where your project is going to get created is Flash Builder workspace. Of course, you can un-check the default location and point to any location you want. For now we are going to keep it as is.
5. Click "Finish".
6.Now,If Flash Professional was not launched.Creating the project is going to launch Flash Professional and publish without opening the Fla file in Flash.
7. Once you create a Flash Professional Project a three icons for (Publish,Debug,and Test Movie) get enabled as follows :



And also all your Fla file settings get copied over to Flash builder at the time of the creation of your project such as (library Path,source path,etc..). For instance, if you have a custom SWC that you added to your Library path of your Fla, that SWC will get copied over to Flash Builder when you create your project and you can code against it in Flash Builder.

Note : the Fla file settings get copied over to Flash Builder only at the time of the creation of your project which means that if you add a swc to your Fla file, your Flash Professional Project settings in Flash Builder won't sync. You can see your Flash Professional Settings by :
1. Right Click on your Flash Professional Project in Flash Builder
2. Select "Properties".
3. Click on "ActionScript Build Path" category.

As you see all the Fla settings have been copied over.

From here you can "Test Movie" using "Ctrl + Enter" for windows Or " Command + Enter for Mac. You can also Publish and Debug from within Flash Builder.

In the part2 of this post, i am going to cover how to creating a Flash Professional Project from Flash Professional and talk about preferences.

enjoy!

Monday, May 10, 2010

Using Flash Builder 4 with Flash CS5

Watch my session from Flash camp San Francisco. In this session i covered the new workflow between Flash Pro and Flash Builder 4 that we have implemented in Flash CS5.

USING FLASH BUILDER 4 WITH FLASH CS5

Enjoy!

Thursday, May 6, 2010

Code hints is unable to build code hints cache

One of the new cool features in Adobe Flash Authoring CS5 is custom code hints introspection. Using this feature some of you might encounter the bug when code hints is unable to build code hints cache. A file cap was put in place to prevent the code hinting mechanism from churning in the background for files saved on the desktop or in the root directory. It will try to parse all surroundings files which could take quite a bit of time and would hold up getting back any code hinting information. Therefore, a default file cap of 800 files was put into place. However, you can change this value by adding a preference key as follows :

This tip is only for advance users who are comfortable changing registry keys.

Windows:
1. Open Regedit and navigate to: HKEY_CURRENT_USER > Software > Adobe > Flash 11 > Settings
2. Right+click and choose: ‘New… > DWORD Value’
3. Rename the key: Project File Cap
4. Select the key and choose: ‘Modify’
5. Edit the value as either hex or decimal: 1000
6. Click OK and restart Flash

Mac:
1. Open ‘/Users//Library/Preferences/Flash CS5 Preferences’ in Text Edit
2. Under the section add the following: 1000
3. Save the file and restart Flash

Thanks,
tareq

Monday, April 26, 2010

Flash CS5: XFL and Live Editing

A coworker of mine on the Flash Authoring team, Valerio Virgillito, has an excellent blog at http://blog.mencio.com/?p=28 where he explains how XFL Live editing works in Flash CS5.