by Daniel | Jan 16, 2010 | actionscript
I’ve just launched my new portfolio site. This is v3.0 of sitedaniel.com, and takes a more minimalist approach to the design than the previous versions. This site is powered by ActionScript3.0 and XML, and uses some fun BitmapData effects.
link
by Daniel | Dec 9, 2009 | actionscript
Here is a great post about how to make sure your XML loaded over HTTPS in Internet Explorer doesn’t fall victim to a nasty bug.
If you’re getting Sandbox Security errors but your crossdomain.xml file is set up correctly then you might need to alter the header values in your server response. This really is a weird bug and could have taken a long time to get to the bottom of.
Something else to note is that Fiddler2 interfered with the crossdomain.xml loading and caused this error to recur.
by Daniel | Sep 25, 2009 | Uncategorized
This site for Moonbeam Films went live last week. It is AS3.0, XML controlled and uses the Gaia framework. It also uses the Google Maps API which is very easy to set up and use.
http://www.moonbeamfilms.co.uk
by Daniel | Sep 4, 2009 | actionscript
UPDATE 29/09/09: This technique is possibly no longer valid with the latest version of Papervision3D.
Here is a small example I put together quickly today to demonstrate how to drag in 3D using Papervision and the InteractiveUtils.getMapCoordAtPointDO3D function.
Since my last post on this in December last year, the Papervision getMapCoordAtPointDO3D method returned object’s x and y values seemed to have changed by a factor of 36.
UPDATE 29/09/09: This technique is possibly no longer valid with the latest version of Papervision3D.
private function _updateDrag(e:Event):void
{
// get the update position on the plane
var obj:Object = InteractiveUtils.getMapCoordAtPointDO3D(_selectedPlane,
_selectedPlane.container.mouseX,
_selectedPlane.container.mouseY)
// move the dragged plane to the new postion with the offset
_selectedPlane.x = _selectedPlane.x + obj.x * 36 - _drag_X_offset;
_selectedPlane.y = _selectedPlane.y - obj.y * 36 + _drag_Y_offset;
}
Click here to see it in action.
The source files can be downloaded here.
by Daniel | Jun 11, 2009 | actionscript
Quite often I need to restrict a number to a range with a defined maximum and minimum value. Rather than using if else statements you can do this simply with Math.max and Math.min:
var restricted_value:Number = Math.max(MIN_VALUE, Math.min(MAX_VALUE, value));
Recent Comments