Rainbow Live XML Editor makes editing easy and full online with a simple Flash interface, multiple users and so much more. With Rainbow Live you can edit your @attributes, CDATA, upload your imagens and create thumbnails easely from your computer to server in seconds.

Rainbow Live puts the power back into the hands of Flash developers. There’s no more need to rely on a backend developer to build and maintain a database. Rainbow Live saves time and money as the process of setting up XML structures is familiar to many Flash developers and is made even more intuitive with Rainbow Live’s node-based approach. It allows for full control over a developing Flash project; if you’re building a bingo game or even a site navigation GUI, the access to Rainbow Live’s suite of time-saving tools is a priceless investment for people who want to develop and code at speed without relying on third parties to do the leg work.

Today you have two choices, Rainbow XML Editor and Live version, the most complete for only 99$ USD:

Rainbow XML Editor

• Edit XML files on your hard drive
• Runs in browser
• Move, delete, duplicate and rename nodes
• Add and remove multiple attributes using a
simple dialog box
• Avoid writing poorly formed XML
• Save meta data into .rbw files
• Requires Flash player 10

Rainbow Live XML Editor + CSM

• All the functionality of Rainbow
• Edit XML files live online
• Upload Images and files
• Automatically create thumbnails
• Admin and User log-ins
• Lock and hide elements from user
• Define child templates
• No backend scripting necessary
• Customisable scripts

Rainbow Live puts the power back into the hands of Flash developers. There’s no more need to rely on a backend developer to build and maintain a database. Rainbow Live saves time and money as the process of setting up XML structures is familiar to many Flash developers and is made even more intuitive with Rainbow Live’s node-based approach.

Installing and Configuring your Rainbow Live XML Editor + CMS

First step is create a folder with the name as you wish. Now you can upload all files inside this folder. You will receive one SWF file, 3 PHP files for alternative FTP and a read-me.txt.

rainbow_upload

Well, you can create your custom INDEX file to your ‘Rainbow.swf’ file. Now you can access Rainbow.swf or your custom INDEX file. When you load the page will require Login and Password, the DEFAULT is:

Username: admin
Password: password

When you load the main page will see at first time the Project window, here you will create XML, import your own local file and edit this file so simple. But after uploaded and logged you must go to second step, add your registration code and configure your FTP access.

Go to Preferences tab, will show you Settings items. The first item is Registration. Click on arrow and set ‘domainkey’ your registration code, you can get your own on Rainbow Site.

rainbow_key

After that you can change FTP access, it will able you to edit online your XML file. To edit it you may go to Preferences > FTP and change the ‘ftphost’ to your domain ftp, ‘ftpmode’ continue normal, ‘ftpusername’ is your FTP username and last ‘ftppassword’ is your FTP password, close this window and click on SITE option, you may change your ‘rainbowfolder’ example: “httpdocs/rainbowFolder/”, after that close the SITE window and click in SAVE (top-right window).

rainbow_xmlEditor

Rainbow Live XML Editor can create or edit only one XML file, one XML for one project. When you create one file, by Default, it is located on folder DATA/ inside folder that you install Live Rainbow but you have a choice to edit it and change the location of the file.

Editing XML file

It’s so simple, you can create nodes using “+” Plus button or add @attributes and images using right arrow, when you click will appear one window with all options, you can change add one attribute or CDATA text.

Using @attributes you can set one parameter like image and upload direct from your Rainbow Live to your server and add the address to your XML file, this moment you can select option to create thumbnail and add too into XML, great for portfolio and photogalleries. See the upload image bellow:

rainbow_images

You can get more information on Rainbow Website or comment here.
Thanks a lot and cya.

XML and AS3 for beginners

May 15th, 2009

Hi guys, now we say something about how load and use the XML file as data base inside the Flash project using Actionscript 3.

First we need load the XML file to read these data inside the Flash. To do it create first a variable of URLLoader and other URLRequest. Different that when we load images, here need use the URLLoader() and not the Loader() class. Go to the first step:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package
{
	import flash.events.Event;
	import flash.net.URLLoader;
	import flash.net.URLRequest;
 
	public class loadXML
	{
		private var xmlLoader:URLLoader;
		private var xmlRequest:URLRequest;
		private var newXML:XML;
 
		public function loadXML():void
		{
			xmlLoader 	= new URLLoader();
			xmlRequest 	= new URLRequest("dataXML.xml");
			xmlLoader.load(xmlRequest);
			xmlLoader.addEventListener(Event.COMPLETE, dataLoaded);
		}
 
		public function dataLoaded(e:Event):void
		{
			newXML = new XML(e.target.data);
			trace(newXML);
		}
	} // End Class
} // End Package

The sample code will load the XML using URLLoader and using the URLRequest, inside the URLRequest you will put the XML file address. After that may create the Listener to say when XML file is loaded or loading or all that happened.

Inside the dataLoaded() function you will see that the newXML:XML() receiving the loaded data and creating your new XML file. Yes, now we can use the data to put inside the project, well lets go to the second step, first see the XML file:

1
2
3
4
5
6
< ?xml version="1.0" encoding="utf-8"?>
<gallery title="Gallery Name" author="Author Name">
	<picture title="title of the first picture">/images/files/001.jpg</picture>
	<picture title="title of the second picture">/images/files/002.jpg</picture>
	<picture title="title of the last picture">/images/files/003.jpg</picture>
</gallery>

This time we have all the xml data inside the newXML() variable, to use these data it’s so simple, first we need to think that the first tag of the XML file is our newXML variable, if we call the newXML.@title will retrieve the title of the gallery tag. The same can do it to retrieve the author parameter value.

Well, if you retrieve the data from the gallery tag the rest is so easy. Let’s now retrieve the picture value, see the sample inside the dataLoaded() function:

24
25
26
27
28
29
public function dataLoaded(e:Event):void
{
	newXML = new XML(e.target.data);
	trace(newXML.picture[0].text()); // result : /images/files/001.jpg
	trace(newXML.picture[0].@ title); // result : title of the first picture
}

Or you can take the picture tag number and make a loop with these data, to get the picture quantity you need only get the array lenght():

26
27
var newXMLQnt:uint = newXML.picture.length();
trace(newXMLQnt); // result : 3

Now you can create your own code using the sample codes, it’s so easy to do it, load and use the XML data inside the Flash using Actionscript 3. Try it and if have some difficulties comment here. Thanks for read and Cya.

Hi again, sorry for the delay to write again. Here im Brazil, 1st May was a holly day and i was play with my son. Well here in agency we have some problens today with system memory of a AIR Project, the project play full HD videos and HD images into a 32″ LCD. 

The problem: When i load videos and pictures, so much pictures, inside the project using Loader Class the memory will be always growing and growing and this will close sometime the application.

Solution: Like the post title, Garbage Collector. Well, the Garbage collector is alway actived by Flash Player, when i unload the Loader it will be send to the “trash” of Flash Player, and Garbaga Collector will define when delete the “trash” content, but we can tell to the Garbage Collector that “trash”  is Ok to be deleted.

It’s so simple:

1
2
import flash.system.System;
System.gc();

If you have a custom loader class you can put the System.gc() into your unload public function to say to the Flash Player that the unloaded content it’s ok to be deleted.

1
2
3
4
5
6
7
import flash.system.System;
...
public function unloadcontent():void
{
	_yourCustomLoader.unLoad();
	System.gc();
}

To force the Flash Player delete the content more speedily you can make a loop with 10 times calling the Garbage Collector:

1
2
3
4
5
6
7
8
9
10
11
import flash.system.System;
...
public function unloadcontent():void
{
	_yourCustomLoader.unLoad();
	// Calling System Garbage Collector loop
	for ( var gci:uint = 0; gci < 10; gci++ )
	{
		System.gc();
	}
}

The loop will force the Flash Player delete the content and make your app don’t crash.
It’s really easy, yeah? Try it, comment and if i save your life buy me a beer using the donation block in right side. Thanks for reading again

Hi again guys, im working hard with AIR projects and today i did one thing that i hate: use  always on top for one program, hehe. Well, was necessary because the project is a digital ad platform using one 32″ LCD with touchscreen and the user interact with the content.

Well, about the alway on top is so simple, first you may create one variable for your Native window.

1
var newWindow:NativeWindow = stage.NativeWindow;

After that you need put only the alwaysInFront and set it true like this.

2
newWindo.alwaysInFront = true;

aaaand done, try it.

Hi again folks, today working with AIR application i was searching something about control the window and database using Flash CS4, but today i will talk about only window control, close, minimize and move application window, its so simple do it, basically you need import only NativeApplication class, see the code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package
{
	import flash.desktop.NativeApplication;
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
 
	public class DocumentClass extends MovieClip
	{
		public var closeBt				:MovieClip;
		public var minBt				:MovieClip;
		public var recordBox			:MovieClip;
 
		public function DocumentClass():void
		{
			closeBt.addEventListener(MouseEvent.CLICK, closeApp);
			minBt.addEventListener(MouseEvent.CLICK, minApp);
			recordBox.addEventListener(MouseEvent.MOUSE_DOWN, dragApp);
		}
	}
}

We have now three functions: closeApp, minApp and dragApp. Three simple steps to take the window control, lets start with dragApp, the function that will drag your AIR Application using MOUSE_DOWN event.

Now we need put this private function inside the document class, bellow the code:

20
21
22
23
private function dragApp(m:MouseEvent):void
{
	stage.nativeWindow.startMove();
}

The function will work only when mouse is down in the recordBox Movieclip, now you can drag your application using mouse moviment. Now to close and minimize the application you will use a simple CLICK event.

25
26
27
28
29
30
31
32
33
private function closeApp(m:MouseEvent):void
{
	NativeApplication.nativeApplication.exit(); 
}
 
private function minApp(m:MouseEvent):void
{
	stage.nativeWindow.minimize();
}

To close the application using Flash CS4 you need use the NativeApplication and not only NativeWindow. But is so easy to use and now you can create your AIR application using a custom chrome. Try it!

Hi for all again and today i will write here something about the File Class, how to create, read and write data into a file and store it in local machine.

Well, yesterday i had the problem to create a file log on an AIR project, for two hours i read some articles and sample chapters about File class and only today (now, 9 April @12:15) i resolve this problem: create a class to create and write data into the File.

The code sample is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import com.dLibs.air.recFile;
 
var nFile:recFile = new recFile();
nFile.setDiretory = "diretoryName";
 
// fileText is a textfield
fileText.text = "";
 
// saveButtom is a movieClip
saveButtom.addEventListener(MouseEvent.CLICK, saveTheFile);
 
function saveTheFile(m:MouseEvent):void
{
	var theDate:Date = new Date();
	var dateNow:String = String(theDate.getHours() + ":" + theDate.getMinutes() + ":" + theDate.getSeconds());
	var textBox:String = String(dateNow + " : " + fileText.text + "\n");
	nFile.writeData = textBox; // result sample: 13:08:32 : content of the textbox
	fileText.text = "";
}

The default format of the file is HTM, but you can change it too using the first argument of the constructor like show bellow:

3
var nFile:recFile = new recFile(“txt”);

Well, to save the data you need call the public set function writeData, see line 17. The string that you send to writeData function will be write at the last line, case document type is HTM or HTML, or after the last character for other document types.

Fine, but where my file? Hmmm, see it. Using the complete constructor arguments you can set the document type, the folder that you want save the file and too the name of the document. No one of these arguments is necessary to create the file, by default the document will be save using type HTM, saved in the Desktop, but you can change to Documents folder for Mac and My Documents for Windows, and the last, name of the file will be the date: dd_mm_yyyy.

Other set function that you can use is the setDiretory. If you chosse to create the file into the Documents folder with extension txt and there you want create other folder with the name of the your AIR project, what you can do to make it ? It’s so simple:

var nFile:recFile = new recFile(“txt”,"documents");
nFile.setDiretory = "projectName"

This today will create a file named 09_Apr_2009.txt into your My Documents / projectName folder automatically, if there have this file you will write the data at the last line of this.

You can download the full source code using the download bellow, or you can download only the classes using the SVN client: http://asdatalibs.googlecode.com/svn/trunk/

Download: Create, read and write file using AIR (231)

Yupi, one real great notice for ‘09 Year. After the notice about the Stratus on Adobe Labs, now we can make a party about RTMP (Real Time Message Protocol) named Open Screen Project (www.openscreenproject.com). Adobe will open the RTM Protocol to change the way of comunicate and trade data in web.

Providing developers and companies open and free access to RTMP is the latest advancement of the Open Screen Project, an industry-wide initiative to enable the delivery of rich multi-screen experiences built on a consistent runtime environment for Web browsing and standalone applications across personal computers, mobile devices, and consumer electronics.

Will be more simple, and of course less expensive, create real time chat, video conference and other aplications to interact cliente-cliente integratin Flash, Flex, AIR, Flash Lite and all Flash Plataform.  The specification of RTMP will be posted in Adobe Developer Connection, address: www.adobe.com/devnet/rtmp