ActionStep Alpha 1 Released!

ActionStep crew released the first alpha release of ActionStep component framework.
It’s been a while since I’m looking at this project and I must admit they’re doing a great and hard work.
What is ActionStep?
ActionStep is an Actionscript 2.0 implementation of a subset of the OpenStep Application Kit and aim to be a valid alternative to Flash V2 Components.
The alpha 1 release comes with an example (through buildExample.bat, which compile using MTASC). See the example here
Links
ActionStep on OSFlash: http://osflash.org/doku.php?id=actionstep
ActionStep components’ list: http://osflash.org/actionstep_components_list
Download
It can be downloaded from: actionstep_alpha_1.zip
http://actionstep.org/

Draggable Controller

After reading all the comments added on the Drag n’ Drop Tree component made some time ago I spent some time to make a small component which is capable to manage drag and drop between almost all the Macromedia builtins component (such as List, DrataGrid, Tree…).
It requires Flash 8 to work because I’m using BitmapData for clone the dragged item (wow, this is incredible easy to do now 🙂 )
You can see a demo here: DraggableController.html
This is the code used in the .fla, in order to manage the component events:

/**
Setting up the list of relationship between components
**/
dc.AddReference(this._datagrid_1, this._list_1)
dc.AddReference(this._datagrid_1, this._datagrid_2)
dc.AddReference(this._datagrid_1, this._tree_1)
dc.AddReference(this._datagrid_1, this._datagrid_1)
dc.AddReference(this._list_1, this._list_2)
dc.AddReference(this._list_1, this._text_ctrl_1)
dc.AddReference(this._text_ctrl_2, this._list_2)
dc.AddReference(this._tree_1, this._list_2)
dc.AddReference(this._tree_1, this._text_ctrl_2)
dc.AddReference(this._tree_1, this._text_area_1)
dc.AddReference(this._list_2, this._text_area_1)
/** drag complete listener **/
dc.addEventListener("drag_complete", this)
/**
evt:
- target_component = drop destination component
- source_component = drag n' drop source component
- source_item      = item dragged
- source_index     = selectedIndex of the source component
- target_item      = drop destination item inside target_component
- target_index     = drop destination index
IMPORTANT: once received evt you must Veto() or Skip() the evt itself.
evt.Skip() will simply remove the dragging movieclip
evt.Veto() will move back the dragging item to its source
*/
function drag_complete(evt:Object):Void{
if(evt.target_component == _list_1){
evt.Veto()
} else if(evt.target_component == _datagrid_2 or evt.target_component == _datagrid_1){
evt.source_component.removeItemAt(evt.source_index)
evt.target_component.addItemAt(evt.target_index, evt.source_item)
Selection.setFocus(null)
evt.target_component.selectRow(evt.target_index, false, false)
evt.Skip()
} else if(evt.target_component == _tree_1){
evt.source_component.removeItemAt(evt.source_index)
var node:XMLNode = new XMLNode(1, "node")
node.attributes.label = evt.source_item.title +  "(Cloned)"
node.attributes.data = evt.source_item
evt.target_item.appendChild(node)
evt.Skip()
} else if(evt.target_component == _text_ctrl_1){
evt.source_component.removeItemAt(evt.source_index)
evt.target_component.text = evt.source_item.label
evt.Skip()
} else if(evt.target_component == _list_2 && evt.source_component == _tree_1){
evt.source_item.removeNode()
evt.source_component.dataProvider = evt.source_component.getDataProvider()
evt.target_component.addItemAt(evt.target_index, evt.source_item.attributes.label)
evt.Skip()
} else if(evt.target_component == _text_area_1 && evt.source_component == _list_2){
evt.source_component.removeItemAt(evt.source_index)
evt.target_component.text = evt.source_item.label
evt.Skip()
} else if(evt.target_component == _text_area_1 && evt.source_component == _tree_1){
evt.source_item.removeNode()
evt.source_component.dataProvider = evt.source_component.getDataProvider()
evt.target_component.text = evt.source_item
evt.Skip()
} else {
evt.Veto()
}
}

The .zip with all the file is available here, if anyone want to test and improve it.

[attachments docid=691 force_saveas=”1″ logged_users=”0″]

Xray ( The AdminTool ) becomes opensource

Many of us used Admin tool for debugging flash movies in the past, being a great debugging tool (for me much better than the one provided in flash).
Now Admin Tool is an opensource project!
What is Xray?
Xray (The AdminTool) is a “snapshot viewer” of the current state of your Flash application without impacting the performance or the file size of your application. Xray’s true nature is to look into the very guts of the Flash application and dissolve the 2d myth you see on screen to a 3D tangible entity you can truly crawl through.
The downloads provided with Xray are:

Other links:

More info available at: http://labs.blitzagency.com/?cat=2
http://www.osflash.org/doku.php?id=xray_the_admintool

SplitPane component

I discovered today a genial component by Joan Garnet, the SplitPane component.
It uses the Macromedia ScrollPane component as basis and it has lot of really useful features.
Some of them I read from the blog post:

  • nested of SplitPanes within each others
  • orientation: horizontal or vertical
  • enable/disable component
  • event driven component
  • max/min width/height
  • separator state (expanded/collapsed)
  • separador size
  • references to each component of the panel
  • expansion direction ( leftRight – rightLeft, topBottom – bottomTop )

See a demo of the SplitPane component here
http://www.joangarnet.com/…/release_v2_fram_1.php

Admin Tool

Some days ago a friend of mine showed me a “strange” (this is what i was thinking looking at that) application which made a complete debug of its flash movie.
Wow, incredible easier easier and easier than the Flash builtin debugger!!
Thus I immediately downloaded it and i was surprised of the impressive work this guy made!
Reading from admin tool’s web page: The AdminTool (AT) is a “snapshot viewer” of the current state of your Flash application without impacting the performance or the file size of your application. … It Works when published in the FlashIDE, local player, web browser. This means that you can debug your application at runtime from its intended location.
Basically it works with a Flash component (an mxp extension) which resides in your swf library and open a localconnection to the main admin tool interface.
Moreover you can change in realtime every property of your running swf to see what happens with that change.
And you can execute actionscript code in runtime from the admin tool, and see that code executed in you swf!! You can see also every video and sound from the swf.
The only requirement is that swf must be compiled for AS2 only. Downloads (mxp, win exe, mac exe and help files) are availables here: http://acmewebworks.typepad.com/…/admin_tool_down.html

Drag and Drop Tree component, yet another!

Yes, this is another drag and drop tree component 🙂
It was a log I wanted to extends the built-in Flash mx 2004 Tree component in order to allow drag and drop operations.. but time was always my enemy.
I was lucky that i need one for work.. i look around and i founded some cool other similar components, but i wanted to be able to do it by myself 😉
It just extends the base Tree component and you can set some drag and drop rules, just costants..
for example, i set these costants to be used:

  • TreeDnd.DEFAULT
  • TreeDnd.DENYALL
  • TreeDnd.DENYDRAGFOLDER
  • TreeDnd.DENYDRAGITEM
  • TreeDnd.DENYDROPFOLDER

they can be used in combinations:
myDnd.dragRules = TreeDnd.DENYDRAGFOLDER | TreeDnd.DENYDROPITEM
in this way you cannot drag a folder, only leaf nodes, and you cannt drop the dragged item into a leaf node, only into a folder or before/after another leaf node…

[kml_flashembed publishmethod=”static” fversion=”10.0.22″ movie=”/wp-content/uploads/2004/12/example.swf” width=”550″ height=”400″ targetclass=”flashmovie”]

Get Adobe Flash player

[/kml_flashembed]
Download the component here.