Calendar

March 2007
M T W T F S S
« Feb   Apr »
 1234
567891011
12131415161718
19202122232425
262728293031  

Tag Cloud

Categories

Archives

Highest Rated

Most Viewed

Recent Posts

Recent Comments

Archive for March, 2007

« Previous Entries Next Entries »

FileSystem Components

Monday, March 19th, 2007

The FileSystem components are a new set of components specific to Apollo which allow for easy access for browsing the file system. The example below defines the 4 files system components and points them to the systems desktop.
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:ApolloApplication xmlns:mx=”http://www.adobe.com/2006/mxml”
layout=”absolute”>
<mx:Script>
<![CDATA[
import flash.filesystem.*;
]]>
</mx:Script>
<mx:FileSystemDataGrid width=”555″ height=”154″ x=”6″ y=”7″
directory=”{File.desktopDirectory.resolve(”)}” />
<mx:FileSystemComboBox x=”10″ y=”169″
directory=”{File.desktopDirectory.resolve(”)}”/>
<mx:FileSystemTree x=”10″ y=”199″ width=”291″
directory=”{File.desktopDirectory.resolve(”)}”/>
<mx:FileSystemList x=”309″ y=”169″
directory=”{File.desktopDirectory.resolve(”)}”/>
</mx:ApolloApplication>
Here [...]

HTML Control

Monday, March 19th, 2007

The mx:HTML control is something that is unique to Apollo and is very easy to integrate into your application. It can be used to simply load in an external html file by location as shown here:
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:ApolloApplication
xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute”>
<mx:HTML id=”html”
location=”http://blog.everythingflex.com”/>
</mx:ApolloApplication>
OR
It can be used for custom html using the htmlText property as shown below:
<?xml version=”1.0″ [...]

Windowing with Apollo - full source code

Monday, March 19th, 2007

Windowing in Apollo is a very simple task.
The Windowing sample will demonstrate this by allowing you to set the preferences
of the new window by setting NativeWindow and NativeWindowInitOptions properties,
and then manage the windows by tracking them within a custom Array.
Creating a new window is as simple as this:
var newWindow:NativeWindow = new NativeWindow(true,new NativeWindowInitOptions());
The function that [...]

Create your first Apollo Window

Monday, March 19th, 2007

Creating a window is very simple with Apollo. This is a very basic example of how to create a new window that contains a custom component. Simply create a new Apollo project within FlexBuilder and paste the following as the main file. Create a component named MyComponent.mxml and paste the code at the bottom of [...]

File and FileStream within Apollo - full source code

Monday, March 19th, 2007

Local access to the file system is what separates Apollo from Flex/Flash. This simple sample demonstrates how to read and write files to the local file system.
Here is the function that loads a file:
private function loadFile():void{
var file:File = File.appStorageDirectory;
file = file.resolve("Files/" + fdg.selectedItem.name);
stream = new FileStream();
stream.open(file, FileMode.READ);
var str:String = stream.readUTFBytes(stream.bytesAvailable);
stream.close();
str = str.replace(File.lineEnding, "\n");
contents.text = [...]

« Previous Entries Next Entries »