Flex 3 has been out since Monday of this week and there are a lot of new learning resources available through the adobe website.
This is my favorite starting point:
http://learn.adobe.com/wiki/display/Flex/Getting+Started
Within that page is a “download projects” link that has some great Flex Builder example projects for various things:
http://learn.adobe.com/wiki/display/Flex/Download+Projects
* Building a simple RIA
* Exchanging data with a server
o PHP version
o JSP version
o ColdFusion version
o ASP.NET version
* Working with data
o PHP
o JSP
o ColdFusion
o ASP.NET
* Handling events
* UI layout
* Displaying lists
* Customizing components
* Multi-page apps
* Debugging
Also, slightly buried within the Getting Started guide is a list of compatibility issues:
http://learn.adobe.com/wiki/display/Flex/Backwards+Compatibility+Issues
No Comments »
So it is almost February already! Where did January go? I’ve been a bit slow out of the gate this year as far as keeping up a decent pace in posting helpful samples to my blog. Actually, I have been working on things behind the scenes, a few details of which I will reveal now. I have launched a new blog on a new domain. The content is to be all “work” related, so it will be about Flex/Flash Player/Adobe AIR, LiveCycle Data Services/Blaze DS/ColdFusion and other fun technologies. I’ve also been working on an AIR app which I hope to get out at least in a fairly stable beta form around the same time that Flex3/AIR releases. It will most likely be open source and hosted on Google Code. I will also be compiling a library of useful components, extensions to components and monkey patches to the Flex framework. This new blog and content will all be available on:
http://flexmonkeypatches.com
All old posts on http:blog.739SaintLouis.com should link to or redirect to the same content on my new site. I will leave my old site up for an undetermined length of time with the intent of transforming it content-wise into a more personal blog (time permitting.)
Regards,
-Kyle
No Comments »
I just recently was made aware that there are actually 3 different “builds” of Flex SDK “hotfix 3″ out there.
1. Originally hotfix 3 was applied to hotfix 2 (updating a few swcs) - version 1
2. Late summer 2007 it was realized this confused some folks so the hotfix kb article was replaced with a full version of the SDK with the fixes applied - version 2
3. Flex Builder 3 beta 2 shipped with the latest/greatest SDK from the 2.0.1 branch which is an equivalent to hotfix 3 SDK - version 3.
These versions should be functionally identical afaik.
I updated my version checker to detect and differentiate these versions. I have updated the original blog entry here and also have links to the update AIR app here.
No Comments »
This post is to carry on from my previous post regarding moving data from ColdFusion CFCs to Flex 2 Applications Using Webservices.
Here is the first sample showing basic retrieval of a string via Remote Object:
<?
xml version=
"1.0" encoding=
"utf-8"?>
<mx:Application xmlns:mx=
"http://www.adobe.com/2006/mxml" layout=
"vertical" >
<mx:Script>
<!
[CDATA
[
import mx.
rpc.
events.
ResultEvent;
import mx.
controls.
Alert;
[Bindable
]
public var sResult:
String;
public function handleStringResult
(event:ResultEvent
):
void{
sResult=event.
result as
String;
}
]]>
</mx:Script>
<mx:RemoteObject
id=
"myService"
destination=
"ColdFusion"
source=
"services.HelloWorld">
<mx:method
name=
"sayHelloString" result=
"handleStringResult(event)" fault=
"Alert.show(event.fault.message)" />
</mx:RemoteObject>
<mx:Label id="lblStringResult" text="{sResult}"/>
<mx:Button label="get String Remote Object" click="myService.sayHelloString()"/>
</mx:Application>
This movie requires Flash Player 9
Browse the source of this example.
Download a zipfile containing the source to this sample.
Read the rest of this post»
No Comments »
One of my first blog posts pointed to a dev center article that I wrote on this topic for the Flex 2 release. I often send customers to look at this article when appropriate as it is a good starting point for webservice and remoteobject communication between Flex and Coldfusion. I also find myself referring to this sample once in a while and so I have finally decided to host the sample and cfc from my website/blog and potentially enhance the cfc to support more use cases for subsequent blog posts.
<?
xml version=
"1.0" encoding=
"utf-8"?>
<mx:Application xmlns:mx=
"http://www.adobe.com/2006/mxml" layout=
"vertical" >
<mx:Script>
<!
[CDATA
[
import mx.
rpc.
events.
ResultEvent;
import mx.
controls.
Alert;
[Bindable
]
public var sResult:
String;
public function handleStringResult
(event:ResultEvent
):
void{
sResult=event.
result as
String;
}
]]>
</mx:Script>
<mx:WebService id=
"myService"
useProxy=
"false"
wsdl=
"http://739saintlouis.com/services/HelloWorld.cfc?wsdl"
showBusyCursor=
"true">
<mx:operation
name=
"sayHelloString" result=
"handleStringResult(event)" fault=
"Alert.show(event.fault.message)"/>
</mx:WebService>
<mx:Label id=
"lblStringResult" text=
"{sResult}"/>
<mx:
Button label=
"get String via Webservice" click=
"myService.sayHelloString.send()"/>
</mx:Application>
This movie requires Flash Player 9
Browse the source of this example.
Download a zipfile containing the source to this sample.
Read the rest of this post»
2 Comments »
Here is an example demonstrating how to use project references to refer to source files in other projects as well as swcs in other projects.
If you take a look at this zip file, you will find that it contains 3 projects.
The first project is a normal Flex project called globalIncludes which contains an actionscript file, vars.as.
A second project, Expando, is a library project, which contains an mxml component.
- In the properties/Project References dialogue for this project there is a checked refererence to the globalIncludes project.
- In the properties/sourcepath for this project, I have added the root folder from the globalIncludes project. (Just click the add Folder… button and navigate to the folder.) This folder is added as ${DOCUMENTS}\globalIncludes.
Now in your Expando project you can see a “virtual directory†from the globalIncludes project labeled - [source path] globalIncludes.
In my mxml component in the Expando project, I refer to the actionscript file from the globalIncludes project by doing an include:
include "../globalincludes/vars.as";
Then in my component I use a variable defined in that vars,as actionscript file to expose a version number tooltip in my component.
Note:
In the Expando project, I have right clicked on the ExpandoComboBox.mxml and selected – “Include class in libraryâ€. That way, whenever I make changes to this component, the swc will be recompiled.
My third project, Sample, is a normal project that just has an application in it.
- In the properties/Project References dialogue for this project there is a checked refererence to the Expando project.
- In the properties/Flex Build Path/Library Path dialogue for this project, I have added the Expando Project (click Add Project… and you will be able to select the Expando project since it is in the list of Project references.)
Now you can launch the Sample.mxml application and see that the tooltip for the ExpandoComboBox is 1.0 which has come from the vars.as actionscript file in the globalIncludes project.
No Comments »
This is installment 3 in the series.
The previous 2 related posts are:
Changing embedded True Type fonts at Runtime in Flex Applications
Using Modules to Change embedded True Type fonts at Runtime in Flex Applications
This approach is a little different.
The application is very similar, but instead of using a loader or module loading, I use the StyleManager to load a runtime CSS swf (which was compiled from a CSS file).
Here is one of the style sheets that is tuned into a CSS swf:
/* CSS file */
@font-face {
src
:url("assets/arial.ttf");
fontFamily: myFont;
}
@font-face {
/* Note the different filename for boldface. */
src:url("assets/arialbd.ttf");
fontFamily: myFont; /* Notice that this is the same alias. */
fontWeight: bold;
}
@font-face {
/* Note the different filename for italic face. */
src:url("assets/ariali.ttf");
fontFamily: myFont; /* Notice that this is the same alias. */
fontStyle: italic;
}
@font-face {
/* Note the different filename for bold-italic face. */
src:url("assets/arialbi.ttf");
fontFamily: myFont; /* Notice that this is the same alias. */
fontWeight: bold;
fontStyle: italic;
}
.myPlainStyle {
fontSize: 11;
fontFamily: myFont;
}
.myBoldStyle {
fontSize: 11;
fontFamily: myFont;
fontWeight: bold;
}
.myItalicStyle {
fontSize: 11;
fontFamily: myFont;
fontStyle: italic;
}
.myBoldItalicStyle {
fontSize: 11;
fontFamily: myFont;
fontWeight: bold;
fontStyle: italic;
}
Read the rest of this post»
1 Comment »
This is really part 2 in the series. Part 1 was Changing embedded True Type fonts at Runtime in Flex Applications
The interface that I have each font swf implementing is the same, so I have not posted the code.
The application has undergone some slight refactoring and I have added a few things.
I chose to use the ModuleManager.getModule(url) rather than using the mx:ModuleLoader tag.
The module Manager was more flexible and really should be used for loading non-visual modules.
Note the way that you get access to the loaded module after it has loaded:
var ml:IModuleInfo = e.target as IModuleInfo;
loadedFont = ml.factory.create()as IFontModule;
Read the rest of this post»
No Comments »
I just published two Tech note articles for Flex regarding changes to Daylight Savings time in effect for 2007 and Sun’s JVM changes regarding this:
“How to upgrade the JVM shipped with Flex”
and
“Flex and Sun’s JVM: U.S. Daylight Saving Time changes in 2007″
No Comments »
I’ve had a few customers ask me how they can switch out embedded fonts at runtime. This really isn’t too difficult and basically involves loading swfs at runtime that have the appropriate fonts embedded within.
You register the font after the “font swf” is loaded and apply the newly loaded font to whatever components you like. Check out the code and comments below.
First I define an interface that I want all my font swf classes to implement so I know how to determine what font(s) are loaded.
IFontModule.as:
package
{
public interface IFontModule
{
function get fontName_Normal():String;
function get fontName_Bold():String;
function get fontName_Italic():String;
function get fontName_BoldItalic():String;
}
}
Read the rest of this post»
3 Comments »
Recent Comments