Posts Tagged rainbow live

Rainbow Live Flash CMS Half Price Sale - Last Days!

Here’s a friendly reminder to let you know that there is one week left to get Rainbow Live Flash CMS at the amazingly low price of $49. If you’ve been using the trial version and intend to buy or if you’ve got a new Flash Website or XML job coming up don’t miss this opportunity to grab one of the most popular Flash CMS solutions at this low price. OK, sales pitch done!

Tags: , , ,

No Comments

Rainbow Live Flash CMS - Half price for a limited time!

The title says it all.

Flash CMS Rainbow Live Half Price

You can now pick up a licence for Rainbow Live at the amazing price of $49 for the next month. If you’ve built a Flash website that uses external XML data, then you can use Rainbow Live to instantly add CMS functionality, which will allow your client to edit the data without having to sift through a complex XML file.

Rainbow Live can make you more money

From a value adding point of view it makes sense to be able to offer your client not only a website, but also a CMS for that website at very minimal cost to you. Obviously this is something you can add to your quote and probably charge quite a lot more for.

Here are some example sites built with Rainbow Live

As you can see Rainbow is great for Flash Photography Websites, Portfolio websites and any other sort of site that can make use of the combination of slick Flash presentation and external XML data.

Learn more

Learn more about Rainbow Live Flash CMS
View a quick view about Rainbow Live Flash CMS
You can always Code and Visual if you’re looking for a Flash Developer

Tags: , , , , , , ,

No Comments

The Best Flash CMS - That’s the Aim for Rainbow 2.0

I’ve been keeping a list of the features to include in the next version of Rainbow Live Flash CMS thanks to feedback from users and my own personal vision for what clients and developers need in a Flash CMS.

In my opinion the best Flash CMS does not equal the biggest CMS or even the most powerful CMS, but should be measured on priorities and requirements for the end user (both developers and clients). In a lot of ways with Rainbow Live the focus has been on rapid development which seems to be in-line with the nature of a lot of work in Flash ecosphere. To that end Rainbow has been built to allow almost instant CMS functionality to XML data in a format entirely dictated by the developer. As you want a more fleshed out solution you are able to spend time building templates and setting preferences to allow uploading, thumbnail creation, sitemap generation and automated SEO HTML backup creation. Put briefly, you can be up and running with Rainbow Live in a matter of minutes but you also have the option to really make use of all the extra features in Rainbow to build a unique and custom CMS for your needs.

What’s Next

Having achieved the goal of rapid CMS development for your Flash Website, the next stage for Rainbow Live is to build a more capable and presentable solution for Flash website developers that caters to some of the common requirements for this sort of development. So, here’s a list of what the planned new features for Rainbow 2.0 are:

  • Export mulitple XML files per project
  • Translate the interface into new languages
  • Restricted font list, set by the developer
  • Styles (css based)
  • Single interface to access different website projects
  • New look and feel (a more presentable alternative to the node view)
  • Dedicated node types (image, sound, video)
  • Custom help screens
  • Interactive image cropping
  • Optional developer defined dropdown lists for node attribute values
  • Multiple file upload
  • Improved text editor
  • More branding customisation

While this isn’t an exhaustive list, nor is everything guaranteed to make it to the final build, it’s an indication of the path Rainbow is taking to give it more real-world functionality that’s required by Flash website developers when looking for an XML CMS for their projects. Feel free to let me know of any other features you’d like to see.

Get Rainbow

You can test drive Rainbow 1.5 right now with a free 30-day trial - Install it here

Tags: , , , ,

No Comments

Make a Flash Website with XML Flash CMS - Rainbow Live

XML for your Flash Website.

For those of you that are unaware, Code and Visual develop and maintain a Flash CMS called Rainbow Live which is used to power Flash websites based on XML. The purpose of Rainbow Live was to create an easy and flexible solution for using Flash XML to power small to medium sized Flash websites. XML is by far the most popular data format for dynamic Flash websites. The biggest downside to using XML in a CMS sense is that it can be a daunting proposition for a non technically minded person (such as your client) to make changes with. Enter Rainbow Live.

What makes a good Flash CMS

Rainbow live can import your existing XML file and immediately give it a visual, node based editing environment. Not only that but you can use it to upload images and other content, automatically create thumbnails, and even automatically generate a search engine friendly HTML backup version of your content. With the power of Rainbow the actual content of your site can be viewed on devices that do not have Flash installed - such as the iPhone and the iPad.

Features

  • new - SEO optimisation!
  • new - Sitemap generation!
  • new - Alternative HTML generation!
  • 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
  • Edit XML files on your hard drive
  • 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

Learn More

Visit the Rainbow site today.

Watch a short video about how you can use Rainbow Live to create a CMS for your Flash Website.

If you want to try it out, you can install a fuly functional free 30 day trial of Rainbow live Flash CMS.

Finally, here a are a few links explaining how Rainbow Live can add SEO functionaity to your Flash Website

Tags: , , , , ,

No Comments

How to Embed Fonts in Flash For Use With Dynamic TextFields and Complex Formatting


I’ve been building Flash sites and applications for a while now and I still sometimes forget how to properly embed fonts for use with dynamic text. I’m not talking about populating existing TextFields that have manually had fonts embedded in them, but rather more complex situations where you are either dynamically creating TextFields or you want to have complex formatted paragraphs, perhaps containing different fonts and weights in the one field. This is when things start to get a bit trickier.

 

Benefits of Embedding Fonts

  • You can be sure the font will display (even if the user does not have the font installed on their computer)
  • You have the option to use antialiasing
  • Centrally change fonts used in all text fields at once

If you are using a CMS for Flash such as Rainbow Live, you will want the text to display in your swf file the same way it looks in the rich text editor, and that means embedding fonts. What can make this confusing is that if the font is installed on your computer (as it probably will be seeming as your the developer) the text will appear to display properly while you test on your machine, however when someone views the file that doesn’t have the font installed, they will be greeted with a default font instead, and that could really kill your site’s mojo (Times New Roman anyone?). One clue you might have as to an unembedded font is that it will not display antialiased.

Comparison between embedded and non embedded font in Flash
 

Two Approaches

So we’re going to go through two approaches here and the difference depends on how you want to work, as well as if you want font and style variations in your text display. These examples will be as code focused as possible, but there is no reason why you can’t apply the same approach to TextFields on the stage or from the library.

 

Method 1 - Embedding for use with a single font (for use with the TextField.text property)

I use this approach when I only need to have a single font per TextField, but I want the flexibility to be able to change what that font is via code without having to go in and change the font properties on an actual TextField in the Flash IDE.

The first thing to do is embed some fonts. For this example we’ll choose two fonts, I’ve chosen Comic Sans and Impact as they are both easily recognisable and it will be easy to double check if they are displaying properly. To embed the fonts, go to the Flash IDE and do the following:

 

Embedding a Font in the Library

  1. Open up the library and select “New Font” from the properties menu on the top right
    Opening the library properties window
  2. Choose a name for your font. I like to take a styles approach and name the fonts acccording to their function as opposed to font name, so for the name value I’ll put “heading_font”.
    Font Properties Window
  3. Choose which font and font style you want, in this case I’ll choose Impact and as there are no styles (Usual options ar Normal, Bold, Italic and Bold Italic) I won’t bother selecting a style. Remember Bold, Italic etc. are considered seperate fonts as far as Flash is concerned and have to be embedded individually.
  4. Tick the “Export for Actionscript” option in the linkage section and add a Class name for the font, I’ll keep this as “heading_font” - this will be the id we use to refer to the font later on. We’ll leave Export in Frame 1 ticked so that we can simply call the font from code
  5. That’s it, press ok and close the Font Symbol Properties window, you’ll notice that there is now a font in your library named “heading_font”
    Embedded font in library

 

Now that the font is embedded let’s see how we use that font in a TextField. Remember you can do this with a TextField you’ve manually created and placed on the stage, but I will be creating the field with code in this example.

 

import flash.text.Font;
import flash.text.TextField;
import flash.text.TextFormat;
//
//-------------------------------------------------------
// CREATE HEADING
//
// Build Textfield and Set Some Basic Properties.
// (You won't have to do this if you are using a manually created TextField)
//-------------------------------------------------------
var myHeadingField:TextField = new TextField()
myHeadingField.embedFonts = true
myHeadingField.selectable = false
myHeadingField.autoSize = "left"
//
//-------------------------------------------------------
// Create Font Reference and TextFormat
//-------------------------------------------------------
var myHeadingFont:Font = new heading_font()
var myHeadingFormat:TextFormat = new TextFormat(myHeadingFont.fontName,20)
myHeadingField.defaultTextFormat = myHeadingFormat
//
//-------------------------------------------------------
// Populate TextField With Text and Add to Stage
//-------------------------------------------------------
myHeadingField.text = "Here Is An Example Headline In Impact"
myHeadingField.x = 10
myHeadingField.y = 10
addChild(myHeadingField)

 

As you can see in the code above we simply create an instance of the font, and then use the fontName property to set this as the font of a new TextFormat. We can then use this TextFormat to style and TextField we choose. You could reference the font name directly without creating a Font instance such as:

var myFormat:TextFormat = new TextFormat("Impact",20)

But I find that there are a couple of downfalls with this approach. Firstly it means that you are being specific about which font you are using for the headline, this means that if you change your font from Impact to Helvetica you are going to have to come in and change your code so that you’re telling the TextFormat to use “Helvetica” instead of “Impact”, abstacting this part means that you only have to update the font in the IDE and everythign will continue to work. The second advantage is if you are working with swcs as opposed to an FLA file (You might be working with FlashDevelop, Flash Builder or a similar development environment) your font won’t actually be embedded unless it is mentioned explicitly somewhere in the code, hence this technique kills two birds with one stone.

Similarly, to embed a second font for your body copy follow the same process by first embedding the font and then aplying it with code. You might end up with something along the lines of the following:

 

//
//-------------------------------------------------------
// CREATE BODY
//
// Build Textfield and Set Some Basic Properties.
// (You won't have to do this if you are using a manually created TextField)
//-------------------------------------------------------
var myBodyField:TextField = new TextField()
myBodyField.embedFonts = true
myBodyField.selectable = false
myBodyField.wordWrap = true
myBodyField.width=450
//
//-------------------------------------------------------
// Create Font Reference and TextFormat
//-------------------------------------------------------
var myBodyFont:Font = new body_font()
var myBodyFormat:TextFormat = new TextFormat(myBodyFont.fontName,16)
myBodyField.defaultTextFormat = myBodyFormat
//
//-------------------------------------------------------
// Populate TextField With Text and Add to Stage
//-------------------------------------------------------
myBodyField.text = "Here is some body copy for the text embed example. You could use data from an XML file to provide the text content for each of these TextFields"
myBodyField.x = 10
myBodyField.y = 40
addChild(myBodyField)

 

And heres our output:

Embedding fonts in flash method one

 

Method 2 - Embedding for use with complex multi-font formatting (for use with the TextField.htmlText property)

The second technique is for those times when you wish to use more than one font, or even just use more than one font style (such as using Bold and Italic) as these are considered separate fonts by Flash.

You start things off the same way by embedding the fonts that you’ll need to use, remember to embed Bold, Italic and Bold Italic as individual fonts. Follow the ‘Embedding a Font in the Library’ section above.

embed_font_styles

In this example I’ll use the same two fonts, Impact and Comic sans, but instead of using two separate TextFields to display the Heading and Body I will display them both in the one field. This is useful for a number of reasons, but in general it means that you can display a chunk of HTML formatted text in the one TextField without having to create a new one for each piece of different formatting within the text block. This is great for working with Rich Text Editors in a Flash CMS such as the one in Rainbow Live, which means the user can edit and format the text as they wish and it can display within Flash without having to be limited by a predefined content structure.

 

Here’s a screen shot of the text as edited in Rainbow Live:

The Rich Text Editor in Rainbow Live Flash CMS

 

You can see there are two heading sections and a couple of paragraphs along with some bold and italic text. You can display embedded fonts at any size so there is a smaller footnote section thrown in for good measure also.

The trick behind Rich Text Editors in Flash is that they use a subset of Flash Friendly HTML to style the text. Flash only supports some of the more simple HTML elements such as <p>, <a> and <img>,for a complete list view the support docs from adobe.

 

Here’s the HTML output from Rainbow:

<TEXTFORMAT LEADING=”2″>
  <P ALIGN=”LEFT”>
    <FONT FACE=”Impact” SIZE=”20″ COLOR=”#333333″ LETTERSPACING=”0″
    KERNING=”0″>Here Is An Example Headline in Impact</FONT>
  </P>
</TEXTFORMAT>
<TEXTFORMAT LEADING=”2″>
  <P ALIGN=”LEFT”>
    <FONT FACE=”Comic Sans MS” SIZE=”12″ COLOR=”#333333″
    LETTERSPACING=”0″ KERNING=”0″></FONT>
  </P>
</TEXTFORMAT>
<TEXTFORMAT LEADING=”2″>
  <P ALIGN=”LEFT”>
    <FONT FACE=”Comic Sans MS” SIZE=”16″ COLOR=”#818181″
    LETTERSPACING=”0″ KERNING=”0″>Here is some body copy for the
    text embed example. This data has been formated with the
    <I>Rich Text Editor</I>in
    <B>Rainbow Live*</B></FONT>
  </P>
</TEXTFORMAT>
<TEXTFORMAT LEADING=”2″>
  <P ALIGN=”LEFT”>
    <FONT FACE=”Comic Sans MS” SIZE=”12″ COLOR=”#818181″
    LETTERSPACING=”0″ KERNING=”0″>
      <I>* learn more about</I>
      <FONT COLOR=”#333333″>
        <I></I>
        <FONT COLOR=”#3452FF”>
          <A HREF=”http://www.codeandvisual.com/rainbow
          TARGET=”_blank”>
            <I>Rainbow Live Flash CMS</I>
          </A>
          <FONT COLOR=”#818181″></FONT>
        </FONT>
      </FONT>
    </FONT>
  </P>
</TEXTFORMAT>
<TEXTFORMAT LEADING=”2″>
  <P ALIGN=”LEFT”>
    <FONT FACE=”Comic Sans MS” SIZE=”12″ COLOR=”#333333″
    LETTERSPACING=”0″ KERNING=”0″></FONT>
  </P>
</TEXTFORMAT>
<TEXTFORMAT LEADING=”2″>
  <P ALIGN=”LEFT”>
    <FONT FACE=”Comic Sans MS” SIZE=”12″ COLOR=”#333333″
    LETTERSPACING=”0″ KERNING=”0″></FONT>
  </P>
</TEXTFORMAT>
<TEXTFORMAT LEADING=”2″>
  <P ALIGN=”LEFT”>
    <FONT FACE=”Impact” SIZE=”20″ COLOR=”#333333″ LETTERSPACING=”0″
    KERNING=”0″>Here is a Second Heading</FONT>
  </P>
</TEXTFORMAT>
<TEXTFORMAT LEADING=”2″>
  <P ALIGN=”LEFT”>
    <FONT FACE=”Comic Sans MS” SIZE=”12″ COLOR=”#333333″
    LETTERSPACING=”0″ KERNING=”0″></FONT>
  </P>
</TEXTFORMAT>
<TEXTFORMAT LEADING=”2″>
  <P ALIGN=”LEFT”>
    <FONT FACE=”Comic Sans MS” SIZE=”16″ COLOR=”#818181″
    LETTERSPACING=”0″ KERNING=”0″>If we wanted to do this with the
    first text embed example we would have had to have a separate
    TextField for each heading and copy section. This option allows
    us to have as many heading and body sections as we like within
    the one TextField.</FONT>
  </P>
</TEXTFORMAT>

  

You’ll notice a lot of TEXTFORMAT and FONT tags in the markup. These are created especially for use in Flash and are now superceded in standard HTML. Flash will also recognise HTML formatted without these tags but unfortunately won’t recognise div or table tags (along with many others).

Now that you have some HTML to display, we can display this text very similarly to the first example, with one important difference in particular - use of the TextField.htmlText Property rather than TextField.text

 

import flash.text.Font;
import flash.text.TextField;
import flash.text.TextFormat;
//
//-------------------------------------------------------
// Make Reference To Fonts
//-------------------------------------------------------
var style_heading:Class = heading_font
var style_body:Class = body_font
var style_body_italic:Class = body_font_italic
var style_body_bold:Class = body_font_bold
var style_body_bold_italic = body_font_bold_italic
//
//-------------------------------------------------------
// CREATE HEADING
//
// Build Textfield and Set Some Basic Properties.
// (You won't have to do this if you are using a manually created TextField)
//-------------------------------------------------------
var myField:TextField = new TextField()
myField.embedFonts = true
myField.selectable = false
myField.wordWrap = true
myField.width = 450
myField.multiline = true
myField.autoSize="left"
myField.condenseWhite = false
//
//
//-------------------------------------------------------
// Populate TextField With Text and Add to Stage
//-------------------------------------------------------
myField.htmlText = '&lt;TEXTFORMAT LEADING="2"&gt;&lt;P ALIGN="LEFT"&gt;&lt;FONT FACE="Impact" SIZE="20" COLOR="#333333" LETTERSPACING="0" KERNING="0"&gt;Here Is An Example Headline in Impact&lt;/FONT&gt;&lt;/P&gt;&lt;/TEXTFORMAT&gt;&lt;TEXTFORMAT LEADING="2"&gt;&lt;P ALIGN="LEFT"&gt;&lt;FONT FACE="Comic Sans MS" SIZE="12" COLOR="#333333" LETTERSPACING="0" KERNING="0"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/TEXTFORMAT&gt;&lt;TEXTFORMAT LEADING="2"&gt;&lt;P ALIGN="LEFT"&gt;&lt;FONT FACE="Comic Sans MS" SIZE="16" COLOR="#818181" LETTERSPACING="0" KERNING="0"&gt;Here is some body copy for the text embed example. This data has been formated with the &lt;I&gt;Rich Text Editor&lt;/I&gt; in &lt;B&gt;Rainbow Live*&lt;/B&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;/TEXTFORMAT&gt;&lt;TEXTFORMAT LEADING="2"&gt;&lt;P ALIGN="LEFT"&gt;&lt;FONT FACE="Comic Sans MS" SIZE="12" COLOR="#818181" LETTERSPACING="0" KERNING="0"&gt;&lt;I&gt;* learn more about&lt;/I&gt;&lt;FONT COLOR="#333333"&gt;&lt;I&gt; &lt;/I&gt;&lt;FONT COLOR="#3452FF"&gt;&lt;A HREF="<a href="http://www.codeandvisual.com/rainbow">http://www.codeandvisual.com/rainbow</a>" TARGET="_blank"&gt;&lt;I&gt;Rainbow Live Flash CMS&lt;/I&gt;&lt;/A&gt;&lt;FONT COLOR="#818181"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/TEXTFORMAT&gt;&lt;TEXTFORMAT LEADING="2"&gt;&lt;P ALIGN="LEFT"&gt;&lt;FONT FACE="Comic Sans MS" SIZE="12" COLOR="#333333" LETTERSPACING="0" KERNING="0"&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;/TEXTFORMAT&gt;&lt;TEXTFORMAT LEADING="2"&gt;&lt;P ALIGN="LEFT"&gt;&lt;FONT FACE="Comic Sans MS" SIZE="12" COLOR="#333333" LETTERSPACING="0" KERNING="0"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/TEXTFORMAT&gt;&lt;TEXTFORMAT LEADING="2"&gt;&lt;P ALIGN="LEFT"&gt;&lt;FONT FACE="Impact" SIZE="20" COLOR="#333333" LETTERSPACING="0" KERNING="0"&gt;Here is a Second Heading&lt;/FONT&gt;&lt;/P&gt;&lt;/TEXTFORMAT&gt;&lt;TEXTFORMAT LEADING="2"&gt;&lt;P ALIGN="LEFT"&gt;&lt;FONT FACE="Comic Sans MS" SIZE="12" COLOR="#333333" LETTERSPACING="0" KERNING="0"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/TEXTFORMAT&gt;&lt;TEXTFORMAT LEADING="2"&gt;&lt;P ALIGN="LEFT"&gt;&lt;FONT FACE="Comic Sans MS" SIZE="16" COLOR="#818181" LETTERSPACING="0" KERNING="0"&gt;If we wanted to do this with the first text embed example we would have had to have a separate TextField for each heading and copy section. This option allows us to have as many heading and body sections as we like within the one TextField.&lt;/FONT&gt;&lt;/P&gt;&lt;/TEXTFORMAT&gt;'
myField.x = 10
myField.y = 10
addChild(myField)

 

You’ll see at the beginning of the code we’ve made reference to the font classes the we created and embedded in the library, there’s no need to make instances of them as we don’t need to apply the fonts to the text manually because this is all being set in the HTML content. As long as the classes are referenced by name we can be sure they’ll be available to Flash at run time.

 

Here’s the output:

Method 2 - Multiple fonts and styles in the one TextField

 

Immediately the power of this approach becomes clear - you don’t have to limit or second guess the exact structure of the content being displayed in the text field, and by using an external XML source you’ll have incredible flexibility in what you’ll be able to display. You’ll see that you can change colours and font sizes and even embed links. It’s also possible to display images via a standard <img>, tag within your HTML content, however your control options about how the images display are slightly limited.

 

That’s It!

And so that’s the end of the Flash text embed crash course, I hope you found it a useful reference. If you’d like to download the sample files you can download them here:Download example files

Learn more about Rainbow Live and how to use it a a simple Flash CMS, or even to make your Flash sites more Google Friendly.

Tags: , , , ,

No Comments

Build SEO friendly Flash sites with Rainbow Live and SWFAddress deep linking.

The soon to be newly released upgrade for Rainbow Live will bring automatic search engine optimisation to your Flash projects. As we all know, Flash is a great technology but unfortunately as far as search engines are concerned, uncompiled markup is still the only truly effective way of getting your site content indexed. Sitemaps are another way to increase search engine awareness of your site, but manually creating and updating these can be a sizeable chore. Enter Rainbow Live 1.5.1!

With Rainbow Live 1.5.1 you will be able to:

  • Automatically generate Google friendly sitemaps in XML format that will list all of your text and image content.
  • Automatically generate a simplified HTML/PHP version of your site that contains the relevant content, images and links entered into your Rainbow XML data.

For more information, check out these links:

Sitemap Generator
Alternative HTML Datasource Generator

Tags: , ,

No Comments

Announcing the Great Rainbow Live - Flash CMS Tutorial Competition!

Competition Extended! Now running till the end of August!

Code and Visual has 5 free Rainbow Live licences to give away to the 5 best Rainbow Live tutorial entries.

For a limited time you can trial a fully functional installation of Rainbow Live on any server you choose by using the Domain Key “tutorialcompetition”. This Domain Key will remain valid for the duration of the competition.

rainbow_sheild1Rainbow Live fills the niche between complete Flash CMS solution and XML Editor. Rainbow was built specifically to enable Flash developers to continue building XML based Flash files the way they usually do, while providing important CMS functionality out of the box - with no changes needed.
Learn more about Rainbow Live here.

Competition Details

The competition is open to anybody that wishes to write a tutorial about Rainbow Live, be it a webmaster or blog author, or even someone that submits a word document. The best tutorial bearing the title from each of the following 5 categories will each receive a free Rainbow Live Domain Key for the domain of their choice - worth $99.

  • Rainbow Live Flash CMS - Installation Tutorial
  • Rainbow Live Flash CMS - Using Templates
  • How to Use Rainbow Live as a Flash CMS
  • Rainbow Live Flash CMS - Using Custom Server Side Scripts (php)
  • Rainbow Live Flash CMS - Using Custom Server Side Scripts (.Net)

The winning entries will be placed on codeandvisual.com with full credit and links back to the original author’s site. All other entries will be linked to from the codeandvisual.com tutorials page.

What Entries Will be Judged On

  • Simple and clear communication style
  • Explaination of concepts and details
  • Well written and entertaining style
  • Good layout and presentation
  • Use of images

How To Enter

Any tutorial that sends a ping back to “http://www.codeandvisual.com/rainbow” will be automatically entered. If you don’t own a blog, or can’t ping back, simply send you completed entry to competition [at] codeandvisual.com

Competition Deadline

The Competition will close 11:59 July 31st 2009, GMT

Some of the key benefits of Rainbow Live

  • Works with your current XML file
  • Admin and User log-ins
  • customisable node locking/hiding for client
  • Easier for clients to use than a raw XML file
  • Edit XML files live online
  • Upload Images and files
  • Automatically create thumbnails
  • Define child templates to define your own node type
  • No backend scripting necessary
  • Customizable scripts
  • Doesn’t dictate structure of your data/website
  • Easily design the CMS to your own needs

What Are You Waiting For?

To learn more about Rainbow Live and download an installation package, visit: http://www.codeandvisual.com/rainbow-live

Tags: , ,

2 Comments

Subdomains now included for free with a Rainbow Domain Key

Due to popular demand Rainbow Live will now work on subdomains for any registered Domain Key.

i.e. If you buy a Domain Key for www.mysite.com then subdomain.mysite.com will also be valid with the same key.

If you’ve previously purchased a Domain Key the changes will take effect immmediately, there’s no need to upgrade your Rainbow Live installation.

Tags: , ,

No Comments

Background Processing Class in AS3

I’ll be trying to release some useful classes over the next couple of months, many of which I used to build Rainbow. So starting off here’s a class that became pretty handy when running a function that chewed up lots of CPU time.

Background.as
This is a simple background process manager class that uses up a specific ratio of CPU time to process functions that are registered to it. For instance if you have to generate a whole bunch of sprites, but don’t want the .swf to freeze while the number crunching happens, you can register a sprite creation function that will create one sprite at a time. on Each ENTER_FRAME event the Background class will continue to call its registered functions until all of it’s alloted CPU time has been used.

Code:

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
//**********************************
//
// © 2009 - James McNess
// <a href="http://www.codeandvisual.com">http://www.codeandvisual.com</a>
//
// **********************************
 
package {
 //
 // *******************************************************************
 //
 //
 // IMPORTS
 //
 //
 // *******************************************************************
 import flash.display.*
 import flash.events.*
 import flash.utils.*
 public class Background{
  //
  // *******************************************************************
  //
  //
  // PROPERTIES
  //
  //
  // *******************************************************************
  private var pFrameMonitor:DisplayObject
  private var pCPURatio:Number
  //
  private var pIdleLength:Number
  private var pFunctions:Array
  //
  //
  // *******************************************************************
  //
  //
  // INITIALISATION
  //
  //
  // *******************************************************************
  public function Background(thisFrameMonitor:DisplayObject, thisCPURatio:Number){
   pFrameMonitor = thisFrameMonitor
   pCPURatio = thisCPURatio
   init()
  }
  private function init(){
   pFunctions = new Array()
   pIdleLength = 1000/pFrameMonitor.stage.frameRate*pCPURatio
   pFrameMonitor.addEventListener(Event.ENTER_FRAME,doIdle)
  }
  private function doIdle(evt:Event){
   var myStartTime:Number = getTimer()
   while(getTimer()-myStartTime&lt;pIdleLength&amp;&amp;pFunctions.length&gt;0){
    for(var i in pFunctions){
     var myFunction:Function = pFunctions[i]
     myFunction()
    }
   }
  }
  //
  //
  // *******************************************************************
  //
  //
  // API
  //
  //
  // *******************************************************************
  public function addFunction(thisFunction:Function){
   if(pFunctions.indexOf(thisFunction)==-1){
    pFunctions.push(thisFunction)
   }
  }
  public function removeFunction(thisFunction:Function){
   var myIndex:int = pFunctions.indexOf(thisFunction)
   pFunctions.splice(myIndex,1)
  }
  public function removeAllFunctions(){
   pFunctions = new Array()
  }
  //
  //
  // *******************************************************************
  //
  //
  // DESTROY
  //
  //
  // *******************************************************************
  public function destroy(){
   removeAllFunctions()
   pFrameMonitor.removeEventListener(Event.ENTER_FRAME, doIdle)
  }
 }
}

Example Usage:

1
2
3
4
5
6
7
8
9
10
11
12
13
package{
  import flash.display.*
  public class Main{
    public var pBackground:Background 
    public function Main extends MovieClip(){
      pBackground = new Background(this, .2);
      myBackground.addFunction(myFunction);
    }
    public function myFunction(){
      // This function will get called until .2 of the ENTER_FRAME interval is used
    }
  }
}

You can add as many functions as you like to the pFunctions array, it will call each of them in the order they were added, and keep cycling until the allotted CPU time is used up.

You can download the class form here:
Background.as

Tags: , , , , , ,

No Comments

Rainbow 1.0.1 released

A new update to Rainbow Live is now available, fixed a couple of small bugs and added some new features.

  • Vertical Scrollbars - now you can use scrollbars as well as drag/mouse wheel to scroll the node tree.
  • Add your own branding - you can now specify a logo to display on the top right of Rainbow Live. Either place a file named logo.png in the same folder as Rainbow.swf or send a FlashVar named ‘logopath’ with a path to your logo image as it’s value.
  • a couple of bugs/edits relating to the menus as well (there was a bit of confusion as to the difference between ‘Open’ and ‘Import’ - you must use import for XML files)

Tags: , ,

No Comments