Archive for the ‘ActionScript 3.0’ Category

MultiView (0.1 Alpha)

Friday, November 9th, 2007

Small component which may act as ViewStack’s little brother.

Component acts somewhat like ViewStack, but it has following differences:

  • It accepts DisplayObjects (not only mx.core.Container instances)
  • It accepts IFactory instances.

And since it’s very young component, it missing some features like: exceptions and event dispatching, but it’s coming.
(more…)

Flex Debugging

Monday, October 22nd, 2007

I’ve found nice debugging tool not long ago. Seems to be quite handy. The only thing I miss is integrated Logging that’s might be useful with AIR development.

Project
Download

Easy way to add attribute to XML

Sunday, September 16th, 2007

Maybe I’m reinventing bicycle but..I just found 2 short ways to add attribute in XML node.

public function funnyXMLBehavior():void
{
	var xmlDemo:XML = ;

	//this is works

	xmlDemo.childNode[’@atr1′] = ‘Orange’;

	//and this is workwing too 0_o

	xmlDemo.childNode.@[’atr2′] = ‘Raspberry’;

	trace(xmlDemo.toXMLString());
}

Scion got Site of the Day Award :D

Tuesday, July 24th, 2007

I can’t say that I did big part for this site, but I’m proud of this anyways.

And yes, I will remember working on this site forever :D.

Orange Frameworks

Thursday, January 25th, 2007

I’ve just opened small site, with my humble collection of libriaries. - framework.orangeflash.eu. Currently you can find there:

  • XML RPC: Allows you work with XML RPC API on server, for example you can work with blogs.
  • WordPress: WordPress API, build on XML RPC API, for WordPress based blogs.
  • Yahoo: Wrapper for original YahooSearchAPI, that allows more comfortable work, alogn with MXML component

Note: I didn’t make examples yet :)

Creating Own Meta Data in Flex

Saturday, January 20th, 2007

To create your own meta data, in Flex you have to set compiler option: -keep-as3-metadata

Here is small example -

Index.mxml:



	
		
	
	

(more…)

Yahoo API Wrapper

Tuesday, January 16th, 2007

To be honest I don’t like Yahoo Search ActionScript 3.0 API, it doesn’t support all data types, for example in order to get thumbnail url, from image search request, you have to parse xml manualy… Also it does not compile with strict-mode compiler option.

So I’ve decided to create my own wrapper for Yahoo API. Here is another pre alpha version (damn, I have too many alphas :) ).

My wrapper has new event object - YahooEvent, and different ValueObjects for different search types. for example Web VO has following fields:

  • title
  • summary
  • url
  • clickURL
  • dateModified
  • cache:
    • url
    • size

(more…)

mx.modules

Sunday, January 7th, 2007

I’ve made simple example with mx.modules, which is adding and removing modules from workspace. There are 3 modules - Weather (in Sofia, Bulgaria), Stock information about Adobe and currency rate - EUR > USD.

Web Services provided by http://webservicex.net

Loading CSS in Runtime

Saturday, January 6th, 2007

Here is small example on Runtime CSS Loading:

Runtime CSS
Sources

See also:
Flex Help > Loading style sheets at run time
Senocular > Beginners Guide to Getting Started with AS3 (Without Learning Flex) (Check the part about mxmlc.exe compiler).

Creating Different ItemRenderers in List-Based controls.

Wednesday, January 3rd, 2007

Sometimes you might want to create different item renderers in a single list-based control i.e. in application form, here is my way of creating it. Basicaly we’ll use single class ItemContainer, but I’ve also created bunch of utility classes which might help me in future. So here they are:

  • ItemContainer: This is Canvas subclass. We will create actualItemRenderer in this container. And this container will play as ItemRenderer for List.
  • ItemContainerData: This is replacement for data property, it has itemRenderer and data properties, used by ItemContainer.
  • InitFactory: ClassFactory subclass, which has one more property - initObject, this is very similar to initObject from ActionScript 2.0 in methods like MovieClip.attachMovie.

The whole idea is to create special ItemRenderer that can “emulate” other controls, in my case it is subclass of Canvas which simply creates a specific UI control adds it to display list . Then we are to let the container know which renderer is to emulate, for this purpose I use ItemContainerData with special fields.

Sources and examples:

Example
Sources
(more…)