City Skyline Test | Depth Study

Gives feel of perspective and depth by reacting to mouse movements. The effect is parallax, read more…
The city images are very choppy and ugly, I know, it’s just a test.
[kml_flashembed publishmethod=”dynamic” fversion=”9.0.0″ movie=”https://circlecube.com/circlecube/wp-content/uploads/sites/10/2008/02/city.swf” width=”550″ height=”350″ targetclass=”flashmovie”]

Get Adobe Flash player

[/kml_flashembed]

Sample Actionscript. This in on one of the buildings which are separate movie clips. Adjust the equation for different effect.
The basic formula is as follows: this._x = _root._xmouse / (speed) + transform
[cc lang=”actionscript” tab_size=”2″ lines=”40″]
onClipEvent (enterFrame) {
this._x = _root._xmouse/7 – 50;
}
[/cc]

Update: Here’s a similar effect achieved by just negating the relation between the mouse and the building movie clips.

[kml_flashembed publishmethod=”dynamic” fversion=”9.0.0″ movie=”https://circlecube.com/circlecube/wp-content/uploads/sites/10/2008/02/city2.swf” width=”550″ height=”350″ targetclass=”flashmovie”]

Get Adobe Flash player

[/kml_flashembed]

[cc lang=”actionscript” tab_size=”2″ lines=”40″]
onClipEvent (enterFrame) {
this._x = -_root._xmouse/7 – 50;
}
[/cc]

Download Source Fla File