Oct 9
Removing list of elements from Array or ArrayCollection

If you need to remove list of selected items in List component in Flex
you should not go from first element to last element of selectedIndices array
because once you remove one selected element all indexes will shift on one position to the left

solution is very simple you just need to go from last element to first element of selectedIndices array

in this case you will not have any problems with indexes

same for simple Array

Aug 3
Google Weather - Flex component

GoogleWeather features:
- change language
- load countries list from google (also useful for other applications, because you don’t need any database for that, all comes from google)
- load cities list based on selected country (also useful for other applications, because you don’t need any database for that, all comes from google)
- load weather information from any location

Install:
in readme.txt inside sources you will find about info about client and server source
and how to avoid Google spam detection
to get it working, just upload server files on your host
change proxy url in com.go4flex.gweather.main.model.ConstModel class
compile client side and upload on your host
voila Smile

working examples:
Sample 1
Sample 2
Sample 3
Sample 4

buy sources at flexden.net

May 17
Transparent Flex app click-through solution

In my project I had situation that I need to load flex transparent flex application and to haveposssibility to click through this applicatio
I was trying to set backgroundAlpha to zero, but it doesn’t help me because application container overlap object under this application
here is a trick
on application create complete:

private function creationCompleteHandler():void
{
rawChildren.removeChildAt(0);
}

it will removes displayObject in application which overlaps objects under flex app

Apr 15
How to get showEffect working first time

Today I got problem with showEffect in my project, when I added my component via PopUpManager.addPopUp I notice that showEffect doesn’t run.
To get it working you need add creationComplete handled inside component and dispatch FlexEvent.SHOW event in created handler.

happy coding ;)

Mar 17
FLASH&FLEX Developer’s Magazine 02/2009 issue review

ffdmag

I am glad to say that Flash & Flex Developer’s Magazine published new issue

FFD’s magazine is great, they growing every day, it seems that there is working professional people, they know how to do work in a best way!

Their articles dealing with important things for flash and flex developers.

Contents includes the following  articles and tutorials

  • Flash Flex developer interview with Dave Schroeder about the Flashbelt Conference…
  • BannerSnack – A quick alternative to Flash?…
  • Working With Flash CS4 New Features: Inverse kinematics (IK) with Bone Tool…
  • Tracking Time with Screenweaver HX…
  • Using all the different components within CS4 to built a complete site…
  • Model View Controller – What’s the Secret Sauce… ?…
  • JSFL Quirks…
  • SWX: The Native Data Format for Adobe Flash…
  • An introduction to Flickr In Flash…
  • Flash video and AS3…
  • WebORB tricks…
  • Multi-user Applications in haXe…
  • 7Achieving a retro-style using only Flash…
  • Secrets of a professional Flash game programmer…
  • Interview with Lee Brimelow…
  • More …

I would like to highlight some excellent articles:

  • “WebORB tricks” by Vitaliy Morarian
    “WebORB for Java - it is server-side technology which enables connectivity between Flex, Flash, AJAX and Silverlight clients and Java applications.”
  • “Secrets of a professional Flash game programmer” by Tom Rassweiler
    “For the last five years as the leader of the Flash development team at Arkadium, a NY based game development company, I have worked on more than a hundred Flash games for clients, ranging from toy companies like Mattel to publishing giants like Hearst and NewsCorp.”
  • “Working With Flash CS4 New Features: Inverse kinematics (IK) With Bone Tool” by Chetankumar
    “You will learn about recent updates to Flash CS4. Work with Flash CS4 Bone Tool.”

Everyone who is interesting to publish article can do it without any problems, this magazine is open for any suggestions

I published my first article “OOP with AS3″ in their first issue on 1/2008  and was very happy

You can find my second article in 2/2009 issue:

  • “Model View Controller – What’s the Secret Sauce… ?” by Anton Krasnoshchok
    “Business applications consist of a user interface (UI), business logic, and data models. For example, standard UI components such as buttons or checkboxes have UI elements, logic that knows how to respond to user inputs, and data models.”

You can subscribe to FFD’s magazine here
Can’t wait for next issue, nice work guys!

Oct 15
Flash Player 10 finally released…

Introducing Flash Player 10

Features !!!!

Get Flash Player 10

Aug 19
gTween: Programmatic Tweening for AS3 Developers Beta 4 Release

New powerful tweening engine is initially being released as a beta

more info here:

http://www.gskinner.com/blog/archives/2008/08/gtween_a_new_tw.html

http://gskinner.com/libraries/gtween

Updates:  

gTween beta 3 released

Here’s the full list of beta 3 updates:

  • fixed a bug with smart rotation
  • added rotationProperties static property to specify properties to apply smartRotation to
  • fixed bug with proxy method calls not returning the return value (thanks to Matus Laco)
  • added a few semi colons :) (thanks to Matus Laco)
  • roundValues renamed to useSnapping
  • added snappingProperties static property to specify properties to apply snapping to.
  • fixed a bug that could cause setSize to be called twice
  • fixed a problem with copyInitProperties firing too many times
  • made the data parameter on addProgressPoint optional
  • changed removeProgressPoint to accept an optional data parameter
  • rewrote the progress point logic, fixing a problem that would prevent progress point events from firing if more than one progress point was passed in a single tick.
  • progress points will no longer fire when doing manual positioning, including using position=value, beginning() and end().
  • made it so that autoHide only applies while tweening alpha. (thanks to Randy Troppman)
  • added a defaultEase static property, which allows you to define the default easing function for all new tweens (thanks to Quentin)
  • made linearEase a public static method
  • added useSetSize property to allow you to turn off the setSize behaviour if necessary (thanks to jwopitz)

You can read the documentation, and download the latest version of gTween by clicking here.

gTween beta 4 released

Here is the full list of changes:

  • fixed a bug with autoHide (thanks to JTtheGeek)
  • fixed a bug with useSmartRotation and destination values over 360 (thanks to radicalFish)
  • added propertyTarget and getPropertyTarget(), to support GTweenFilter and other potential subclasses
  • renamed the static “ticker” property to “activeTicker” to prevent issues in some editors due to it being named the same as the instance property. (thanks to Thomas Brekelmans)
  • fixed a problem with progressPoints set to a position of 0 not firing (thanks to Toby Skinner)
  • moved event meta tags to before class declaration, so they show up properly in the API documentation (thanks to Jordi Boggiano)
  • updated .clone() to support .useSetSize and .useSnapping properties
  • modified .addChild() to accept GTween.TWEEN_PHASE, GTween.END, GTween.DURATION, GTween.BEGINNING as a second parameter, allow more complex synchronization options.
  • included GTweenFilter and MultiTween in package.

As always, you can view the latest documentation, and download the latest version of the library at  http://gskinner.com/libraries/gtween/

Jul 15
MVC Pattern Presentation (Cairngorm vs Mate)

This presentation will guide you through the MVC Pattern and Flex implementation of MVC (Cairgorm and Mate Frameworks)

download MVC.pptx (724.83 KB)

download MVC.ppt (889 KB)

download MVCCairngorm.zip (33.55 KB)

download MVCMate.zip (343.01 KB)

May 28
Flex Application Size

Don’t forget

By default Flex Builder compile application to debug build,
Don’t forget before deploying your application to production server to export release build
Project -> Export Release Build…
release build can be twice smaller than debug version

EXTERNALIZING ASSETS

There are a number of ways to externalize code and assets.

MODULES

If there is application functionality that not every client will use or may not be used right away, you can split it into a module; a module is compiled into its own SWF and then is loaded at runtime via code. The root tag in an MXML file defining a module is mx:Module. Modules are loaded at runtime using the ModuleLoader.

RSLS

If you have multiple applications that share some of the same code libraries, you can use runtime-shared libraries to only require the code be downloaded once and used by both applications during the browser session. Note, only Adobe signed runtime-shared libraries can persist on the client and be cached by the Flash Player after the browser is closed. This is a new feature available in Flash Player 9 Update 3 (9,0,115,0) that enables the Flex framework to be cached and used by Flex applications from any domain.
More info on RSLs at livedocs

RUNTIME CSS LOADING

You can load style sheets at run time by using the StyleManager. These style sheets take the form of SWF files that are dynamically loaded while your Flex application runs.
By loading style sheets at run time, you can load images (for graphical skins), fonts, type and class selectors, and programmatic skins into your Flex application without embedding them at compile time. This lets skins and fonts be partitioned into separate SWF files, away from the main application. As a result, the application’s SWF file size is smaller.

RUNTIME LOADING OF ASSETS

The Image control in Flex takes a source which can either be an embedded image or a relative path to the image. When the latter is specified, the image is loaded at runtime and is not embedded into the SWF file.
Embedded image:

<mx:Image source=”@Embed(source=’./assets/butterfly.gif’)”/>

Image loaded at runtime:

<mx:Image source=”/assets/butterfly.gif”/>

SUB-APPLICATIONS (Flex 3.2)

As of Flex 3.2 (and higher), there is now an additional option: sub-applications.
The PDF of the chapter in the doc is here:
Chapter 1: Developing and loading subapplications
http://livedocs.adobe.com/flex/3/loading_applications.pdf
The original planning overview (then code named “Marshall Plan”) can be found here:
http://opensource.adobe.com/wiki/display/flexsdk/Marshall Plan

Additional info:

http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postId=12169

http://www.countermarch.com/blog/index.cfm/2008/2/26/Optimizing-with-Flex-3

http://www.simplyprofound.com/post/Flex-3-Optimization-and-SWF-Filesize.aspx

http://www.slideshare.net/dcoletta/optimizing-flex-applications

http://wireless-watch.com/2008/04/24/reduce-the-size-of-a-flex-3-application-avoiding-unnecessary-references-with-the-getqualifiedclassname-method

http://livedocs.adobe.com/flex/3/html/help.html?content=performance_06.html

May 4
Flex 3 CSS Properties List

download Flex3CSS.pdf (152.8 KB)

« Previous Entries