RegEx – search and replace

The problem is to search bit of text and replace any occurance of the searched string with something new, with RegEx class and built-in replace function of String class it is very easy.
Continue reading

Posted in actionscript, flash | Tagged , , , | Comments Off on RegEx – search and replace

Link: WAMP vs SKYPE conflict

Whoever was using WAMP and Skype has encountered problem with shared ports, following link contains the solution (look in the comments) to resolve it:

WAMP and Skype Conflict

and this is the comment you should search at above link (for your convenience):

Submitted by Hobbsy on Sun, 03/22/2009 – 22:45
I also encountered this

I also encountered this problem a while back…

A much better solution than starting WAMP before Skype is to follow the advice on the URL you posted:


In skype if you click “tools ” then “options” and connection down the left, untick the box “use port 80 and 443 as alternative incomming ports”

That worked for me about 6 months ago, and haven’t looked back since 🙂

Posted in php | Tagged , | Comments Off on Link: WAMP vs SKYPE conflict

Multi-touch handling in AIR for Android/iOS

To handle multitouch in AIR you need to listen to TouchEvent events like TouchEvent.TOUCH_BEGIN. Which event you will listen depends on the Multitouch.inputMode defined, possile values are enumerated in MultitouchInputMode class. We will use MultitouchInputMode.TOUCH_POINT which specifies that events are dispatched only for basic touch events, such as a single finger tap.

It would be also good to make sure that we have touch enabled device or if we have enough number of touch points recognised, this information can be fetched from Multitouch class.


var m_oTouchIDs:Object;

if(Multitouch.supportsTouchEvents)
{
    Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
    m_oTouchIDs = { };
    //we have touch screen
    stage.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
    stage.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);
    stage.addEventListener(TouchEvent.TOUCH_MOVE, onTouchMove);
}

protected function onTouchMove(e:TouchEvent):void 
{
    //update
    var p:Point = m_oTouchIDs[e.touchPointID] as Point;
    p.x = e.localX;
    p.y = e.localY;
}
		
protected function onTouchEnd(e:TouchEvent):void 
{
    delete m_oTouchIDs[e.touchPointID];//release
}

protected function onTouchBegin(e:TouchEvent):void 
{
    m_oTouchIDs[e.touchPointID] = new Point(e.localX, e.localY);
}


Than you have an object containing position (and it could contain other details if needed) of each touch point which could be later used e.g. in a loop to verify what was “clicked”.

best regards

Posted in air for android | Tagged , , | Comments Off on Multi-touch handling in AIR for Android/iOS

16.10.1978 – Election to the papacy – Karol Wojtyła becomes Ioannes Paulus PP. II

16.10.1978

Pope_John_Paul_II – Election_to_the_papacy

WIKI - Pope John Paul II on 12 August 1993 in Denver (Colorado)

WIKI – Pope John Paul II on 12 August 1993 in Denver (Colorado)

Continue reading

Posted in history | Tagged , , , , , , , , | Comments Off on 16.10.1978 – Election to the papacy – Karol Wojtyła becomes Ioannes Paulus PP. II

Link: Gesture, accelerator and geolocation simulator

Little gem:)
Gesture, accelerator and geolocation simulator

Posted in air for android, flash | Tagged , , , , , , , , , , | Comments Off on Link: Gesture, accelerator and geolocation simulator