Apr24th

Alternativa 3D : a new awesome 3D engine for flash

Nicolas Rajabaly 3D, AS3, Alternativa3D, Flash, Flash CS3 Read on

Alternativa 3D is a new 3D engine, highly optimized and smooth, heavey on the processor, but using the “T” key you can see some nice revealing triangle rendering.

The Russian Alternativa Team just put out some truly awesome demos of this engine (with a full rewrite 5.0 milestone 1).

Aternativa3D tech specs :

Alternativa3D tech specs:

* Signals system — only nesessary calculations;
* BSP — quality polygon sorting, “sharp” crossings;
* n-gons support;
* reusing layers (only changed regions redrawing, polygons are independent);
* objects hierarchy;
* only necessary matrix, coords and UVs recalculating;
* perspective correction — dynamic triangulation;
* collision detection.

Isometric mode was also optimized and now works much faster.

And this is not all. In a future they will create and implement some new features:

* dynamic lighting and shadows (point and directional lights);
* bump lighting;
* parallax mapping;
* automatic UV-mapping;
* sprites, 3D-sprites;
* sprite lighting;
* texture objects;
* Global Illumination imitation;
* sprite pre-render system (phases render on server using uploaded 3D-models);
* animation system (including inverse kinematics);
* 3D-objects interactivity;
* physics simulation.

Besides that, Alternativa3D engine is already adapted for coming Flash Player 10. Texture correction and lighting will work faster.

This technology applications are rather wide:

* 3D online first- and third person games;
* architecture visualisation;
* multyuser entertainment media;
* promo-sites;
* advertising (including “3D-banners”);
* science and educational interactive projects.

Check It

Apr24th

Saffron UML

Nicolas Rajabaly AS3, Air, Flex Read on

Saffron UML is made with Adobe Flex and exported in an Adobe AIR application.
Of course, this tool proposes to do analysis and framework buildings with Unified Modeling Language (UML).

Don’t know when this tool will be ready… it seems to take a bit more time than expected.

I cannot wait anymore!!

More Infos

Apr21st

FlashDevelop 3.0.0 Beta7 released

Nicolas Rajabaly AS2, AS3, Air, Flash, Flash 8, Flash CS3 Read on

This release contains Flex SDK related fixes/updates, UI stability improvements and few new features. Happy coding!

Changes:

* Flex/AIR completion updated
* Improved AIR projects with certification & packaging scripts
* Basic compatibility with Adobe Flex Builder projects (open read-only / import FB projects)
* Automatic output in “bin-debug” vs. “bin” depending on the selected “Debug” vs. “Release” configuration
* Flash compiler errors are captured and clickable in FlashDevelop
* Supports building current Flash project or current FLA
* View modified lines, you can enable it from the program settings
* New “test project” option: open a document (ie. html page) instead of the SWF file
* Optionally define the main class’ package when creating a project
* View code regions & improved sorting options in Outline view
* Support for trace capture in Quick Build (”-debug” option)
* Support for high-dpi setting and customizable UI fonts
* Match case option added to quick find
* Improved code generators (override, interface implementation)

More Infos

Download

Apr21st

SPL autoloading in PHP

Antoine Ughetto Php, Tips, Tutorial Read on

In php5 we have a fabulous new feature, autoloading Objects. This function load dynamically classes.Before this magic function, we had to include all needed files before using an object.
How it works ? Very simple :

function __autoload($class) {
    if(is_file($class . '.php')){
          require_once $class.'.php';
    }else{
          printf("Error when trying to load %s", $class);
    }
 
}
 
$mmpObj  = new MmpClass();

In php >= 5.1.2 a new SPL function upgrade this function. How ? Read the rest of this entry »

Apr4th

Youtube Player Loader Class in AS2

Nicolas Rajabaly AS2, Flash, Flash 8, Pixlib, Tips, Tutorial Read on

Just a little class that I made this week to load the youtube flash player in a flash. This class is made in action script 2 with the help of the pixlib.

import com.bourre.commands.Delegate;
import com.bourre.events.BasicEvent;
import com.bourre.events.EventType;
import com.bourre.events.NumberEvent;
import com.bourre.visual.MovieClipHelper;
import com.bourre.commands.CommandManagerMS;
import com.bourre.core.HashCodeFactory;
/**
* @author Rajabaly Nicolas
* @version 0.1
*/

class YoutubeLoader extends MovieClipHelper {

	private var _mc:MovieClip;
	private var _scale:Number;
	private var _commandMs:CommandManagerMS;
	private var _delCheckPlayer:Delegate;
	private var _mcl:MovieClipLoader;
	private var _listener:Object;
	//
	static public var LOAD_START:EventType = new EventType("onLoadYoutubePlayerStart");
	static public var LOAD_PROGRESS:EventType = new EventType("onLoadYoutubePlayerProgress");
	static public var LOAD_COMPLETE:EventType = new EventType("onLoadYoutubePlayerComplete");
	static public var PLAYER_IS_READY:EventType = new EventType("onYoutubePlayerReady");
	static public var PLAYERLOADER_IS_OPEN:EventType = new EventType("onYoutubeLoaderOpen");
	static public var PLAYERLOADER_IS_CLOSE:EventType = new EventType("onYoutubeLoaderClose");

	public function YoutubeLoader(name:String, mc:MovieClip) {
		super(name, mc);
		_commandMs = CommandManagerMS.getInstance();
		_delCheckPlayer = new Delegate(this, _checkPlayer);
		System.security.allowDomain("http://youtube.com");
	}

	private function _checkPlayer():Void{
		if (_mc.isPlayerLoaded()) {
			_commandMs.remove(_delCheckPlayer);
			_mc._alpha=100;
			_mc._xscale = _mc._yscale = _scale;
			_oEB.dispatchEvent(new BasicEvent(PLAYER_IS_READY));
		}
	}

	private function _loadProgressPlayer(myTarget:MovieClip, myBytesLoaded:Number, myBytesTotal:Number):Void {
		var myPrcent:Number = Math.round(myBytesLoaded / myBytesTotal * 100);
		_oEB.dispatchEvent(new NumberEvent(LOAD_PROGRESS, myPrcent));
	}

	private function _loadCompletePlayer():Void {
		_oEB.dispatchEvent(new BasicEvent(LOAD_COMPLETE));
		_commandMs.delay(_delCheckPlayer, 250);
	}

	private function _loadStartPlayer():Void {
		_oEB.dispatchEvent(new BasicEvent(LOAD_START));
	}

	public function open(myId:String, myScale:Number):Void {
		_scale = myScale;
		_mc = view.createEmptyMovieClip(HashCodeFactory.getNextName(), 1);
		_mc._alpha=0;
		_mcl = new MovieClipLoader();
		_listener = new Object();
		_listener.onLoadStart = Delegate.create(this, _loadStartPlayer);
		_listener.onLoadProgress = Delegate.create(this, _loadProgressPlayer);
		_listener.onLoadInit = Delegate.create(this, _loadCompletePlayer);
		_mcl.addListener(_listener);
		_mcl.loadClip("http://youtube.com/v/" + myId, _mc);
		_oEB.dispatchEvent(new BasicEvent(PLAYERLOADER_IS_CLOSE));
	}

	public function release():Void {
		stopAllSounds();
		_mc.removeMovieClip();
		_mcl.removeListener(_listener);
		_oEB.dispatchEvent(new BasicEvent(PLAYERLOADER_IS_OPEN));
		super.release();
	}

}

To use it in flash :

import YoutubeLoader;
import com.bourre.commands.Delegate;
import com.bourre.events.NumberEvent;
import com.bourre.events.BasicEvent;

var myLoader:YoutubeLoader=new YoutubeLoader("THENAMEOFTHELOADERINSTANCE",this.createEmptyMovieClip("loadertest",this.getNextHighestDepth()));
myLoader.addEventListener(YoutubeLoader.LOAD_START,Delegate.create(this,_loadStart));
myLoader.addEventListener(YoutubeLoader.LOAD_PROGRESS,Delegate.create(this,_loadprogress));
myLoader.addEventListener(YoutubeLoader.LOAD_COMPLETE,Delegate.create(this,_loadComplete));
myLoader.addEventListener(YoutubeLoader.PLAYER_IS_READY,Delegate.create(this,_playerReady));
myLoader.addEventListener(YoutubeLoader.PLAYERLOADER_IS_OPEN,Delegate.create(this,_playerLoaderOpen));
myLoader.addEventListener(YoutubeLoader.PLAYERLOADER_IS_CLOSE,Delegate.create(this,_playerLoaderClose));
myLoader.open("37t52UpCaGE",200);
//myLoader.close();

function _loadStart(e:BasicEvent):Void{
	trace("_loadStart");
}

function _loadprogress(e:NumberEvent):Void{
	trace("_loadprogress"+e.getNumber());
}

function _loadComplete(e:BasicEvent):Void{
	trace("_loadComplete");
}

function _playerReady(e:BasicEvent):Void{
	trace("_playerReady");
}

function _playerLoaderOpen(e:BasicEvent):Void{
	trace("_playerLoaderOpen");
}

function _playerLoaderClose(e:BasicEvent):Void{
	trace("_playerLoaderClose");
}

Enjoy ;)

About

This is the R&D corner of Nicolas Rajabaly and Antoine Ughetto.
Enjoy it.
Lab : Check it

You want to be a contributor?!
Send a mail to :
antoine _AT_ makemepulse _DOT_ com




About

This is the R&D corner of Nicolas Rajabaly and Antoine Ughetto.
Enjoy it.
Lab : Check it

You want to be a contributor?!
Send a mail to :
antoine _AT_ makemepulse _DOT_ com

Categories