Return to Snippet

Revision: 19059
at October 15, 2009 13:03 by curiousmedia


Initial Code
import com.asual.swfaddress.*;

function handleSWFAddress(e:SWFAddressEvent):void {
	trace("# SWFAddress Path: "+e.path);
	
	switch(e.pathNames[0]) {
		case "section2":
			//code to go to section 2
			break;
		
		case "section1":
		default:
			//code to go to section 1
			break;
	}
}

SWFAddress.addEventListener(SWFAddressEvent.CHANGE, handleSWFAddress);

//Use setValue to change sections
//If left here it will override deeplinks by changing the value immediately
SWFAddress.setValue("/section1/");

Initial URL

                                

Initial Description

                                

Initial Title
Basic SWFAddress Setup

Initial Tags

                                

Initial Language
ActionScript 3