recently featured posts we've got 19 articles so far

Learning Flash – Flashkurs 0

May8

Diesmal gibts was für die schweizer Flasher unter euch oder die es noch werden wollen. Ich habe wieder einen Abendkurs an der Schule für Gestaltung in Bern ausgeschrieben. Dies ist die Weiterführung meines im Frühling durchgeführten Grundkurses und wird sich vorallem der Umsetzung von Projekten mit Actionscript widmen. Die Ausschreibung sowie die Anmeldung findet ihr hier.

Ich freue mich auf ein volles Schulzimmer…

…finally released. 0

Jan9

I proudly announce the release of my modular framework now under the zLib license. I finally decided to change to a open source license so that all of you can use it. I also finished the documentation of the core elements and made an short movie about the main features of modular.

So I hope you can use it as I do in many of my projects…

to be open source or not – thats the question 2

Dec28

In the last weeks I was thinking about open sourcing my modular framework. So far I kept it closed source and got some money if somebody used it in commercial projects. But I’m not very happy with this solution as it costs quite an effort to use a commercial framework.

That why I though it would be better to distribute it for free and open source.  My major problem is that I spent many hours in developing modular and earning some money to redeem would be great. So to help me making a decision I made my own list of advantages for going open source;

Advantages:

  • everybody can use it for free.
  • can use open source platforms for advertising.
  • other programmers may join the development.
  • higher possibility for viral marketing without to much effort.
  • same level with other open source frameworks. No “why should I paid for this” questions.
  • ?maybe? get some money by donations
  • possibility to sell commercial modules to companies.

I’m wondering if there is somebody with experience with donations? Does this really work? Or maybe other inputs for changing to open source? Just let me know…

modular v2 0

Nov15

Right now i am working on the next release of my modular framework. The main change is in the terminology as there were too many Module* names which made it a bit confusing. But there are also some nice new features like a clean Font registration and a new singleton flag to reuse modules instead of rebuilding them in every page. Its now also possible to use modular in your own application in its own container sprite.

If somebody can’t wait to see the new version you can contact my for a pre-release version. Otherwise I will announce here the new release. Stay tuned.

Onscreen Keyboard with AIR 4

Nov14

In one of my last projects I had to develop an air application with an onscreen keyboard that is working with flash as with the internal html browser of air.

I realized pretty quickly that this isn’t that easy as it seams. There are multiple problems especially with the html view:

  • how do i get the focus in the html view to add letters.
  • how do i get the selection to add chars on the right position.
  • how do i know when a user clicks and inputfield/textarea.
  • how do i prevent that flash do set the focus on the keyboard when I click on a letter sprite.

After some experiments I discovered the really nice javascript support of the internal browser. So my first problem was already gone, when I found the javascript command:

var webView:HTMLLoader = new HTMLLoader();
//...later, to get the element with the focus call:
var element:Object = webView.window.document.activeElement;

I wasn’t really into javascript so I was surprised to discover even more possibilities. Now with the focus I can place an onscreen keyboard made with flash and get the activeElement of the htmlloader and add characters to it. something like this:

var inputField:Object = webView.window.document.activeElement;
if( inputField != null ) {
   var select:Number = addScreenBoardText( e.char, inputField, "value", "selectionStart", "selectionEnd" );
   inputField.setSelectionRange( select, select );
}

The function where I add the char and return the selection where the cursor should be set:

private function addScreenBoardText( insert:String, object:Object, textAttribute:String, selectionStartAttribute:String, selectionEndAttribute:String ):Number {
  var selectionStart:Number = object[ selectionStartAttribute ];
  var selectionEnd:Number = object[ selectionEndAttribute ];
  var original:String = object[ textAttribute ];
  var newText:String = original.substring( 0, selectionStart ) + insert + original.substr( selectionEnd );
  object[ textAttribute ] = newText;
  return selectionStart + insert.length;
}

Why I make this weird looking function is because I can use it also for the flash TextField just with different parameters. So now we can add letters to a textfield in a html view as a flash TextField. But one big problem is that we loose the focus every time we click on our on screen keyboard. And there is a way to prevent the change of the focus which is very handy in this situation:

 // in our main application class we listen to the mouse focus change event.
addEventListener( FocusEvent.MOUSE_FOCUS_CHANGE, onMouseFocus );

// in the listener we check if the relatedObject is a Key,Screenboard ( these are my classes for the Keyboard that get mouseclicks )
// then we prevent the default behaviour of the event. which means no focus change is triggered.
private function onMouseFocus( fe:FocusEvent ):void {
if( fe.relatedObject is Key || fe.relatedObject is ScreenBoard ) fe.preventDefault();
}

We saw earlier that is was possible to write to javascript objects as normal in actionscript. I was even more surprised as its possible to listen to javascript events with actionscript functions. That allows me to listen to javascript focus changes and hide/show the keyboard. This way I can make an overlay keyboard that is only visible when I click in a textfield which I find is a very nice solution. So this is how I listened to the javascript events ( keep in mind that this is all actionscript ):

// register everytime the page has loaded!
private function onPageLoaded( e:Event ):void {
  webView.window.addEventListener( "focus", onJavaScriptFocusIn, true );
  webView.window.addEventListener( "blur", onJavaScriptFocusOut, true );
 }

// if we get a focus in event from js, check if its a inputfield or a textarea. then show the keyboard.
private function onJavaScriptFocusIn( e:Object ):void {
  if( e.target.localName == "input" || e.target.localName == "textarea" ) {
    dispatchEvent( new JavaScriptEvent( JavaScriptEvent.FOCUS_IN ) );
  }
}

// we lost focus - hide keyboard
private function onJavaScriptFocusOut( e:Object ):void {
  dispatchEvent( new JavaScriptEvent( JavaScriptEvent.FOCUS_OUT ) );
}

With all this you can build your onscreen keyboard that is working in flash as in html. I made a quick flexbuilder air project that you can download with a keyboard, textfield and htmlloader.

project online; drucklive 0

Nov4

Please have a look at our new project that is online now: http://www.drucklive.ch.

You can order canvas and in a few days wallpapers of your own pictures. It is made with away3d for the 3d preview of the room and the modular framework for the website architecture.

PropertyTween the indieas way 0

Oct25

I know there are so many different tweening engines out there and it makes really no sense program another one. But as I always had my one version from the sfug library I thought it would be the time to port that to the indieas library. Further more I not just copy it and adapted the package name I tried to improve it once more. So in the new version when you apply another tween on the same object it checks the tweened properties and takes over only the properties defined by the new tween and let the old tween running with the other properties. So no more flickering when to tweens are acting on the same target/property.

As always feel free to download the library: http://www.indieas.org/library/

indie.as goes art 0

Oct19

Lately I was programming on a web art project which is now ready to see.

Picture

This image gives you an impression. To see more click the image.

from guns to fireworks 3 0

Oct19

Get Adobe Flash player

from guns to fireworks 2 0

Oct19

Get Adobe Flash player

Developed by Dariusz Siedlecki and brought to you by FreebiesDock.com