Archive for the ‘Uncategorized’ Category

Problem opening web links from a flash CD

Wednesday, March 24th, 2010

Problem: Flash executable file does not open web links on a Mac using getURL / navigateToURL when Safari is not set as the user’s default browser. Users with Firefox get browser focus, but the page doesn’t load.

Reason: Not sure.

Solution: Using ActionScript, determine whether we’re on a Mac or PC, if Mac, run an AppleScript file using fscommand.

AS2:

// what OS are we on?
operatingSystem = System.capabilities.os.substr(0, 3);
trace("I am a " + operatingSystem);

//actions for your button.
myButton.onRelease = function() {
    openMacLink();
}

function openMacLink() {
    //if operating system is Mac, run the openWebpage applescript in your fscommand folder
    if (operatingSystem == "Mac") {
	fscommand ("exec", "openWebpage.app");
    }
    //else, we're on windows and just run regular getURL
    else {
    	getURL("http://www.yourwebaddress.com", "_blank");
    }
}

AS3

// what OS are we on?
var operatingSystem:String=Capabilities.os.substr(0,3);
trace("I am a " + operatingSystem);

//actions for your button.
myButton.addEventListener(MouseEvent.MOUSE_DOWN, openMacLink);

function openMacLink(event:MouseEvent) {
        //if operating system is Mac, run the openWebpage applescript in your fscommand folder
	if (operatingSystem=="Mac") {
		fscommand("exec", "openWebpage.app");
	}
//else, we're on windows and just run regular navigateToURL
        else {
		var request:URLRequest=new URLRequest("http://www.yourwebaddress.com");
		navigateToURL(request, "_blank");
	}
}

Great, we’re halfway done. Now we need to make an AppleScript for each link. On your mac open up the AppleScript Editor (Script Editor prior to Snow Leopard). It looks like this:
script editor

Paste in the AppleScript (change yourwebsitehere.com to what you want to link to):

tell application "Safari"
	activate
	do JavaScript "window.open('http://www.yourwebsitehere.com')" in document 1
end tell

Now save the applescript as an application into your fscommand folder.
Save as an application

Synesthesia research – color to sound. color to shape.

Thursday, May 28th, 2009

University of Sussex Synesthesia Research Publications – haven’t sorted through them yet.

The Synesthesia Battery – A series of online tests to be taken by synestheses.  Most promising so far, especially for color to sound.   Need to find out what research groups have done studies with this test and how to access their results.  Talk to Allison or Wes.

Edward M. Hubbard’s Synesthesia Research – have not sorted through them yet.

Other:

A Brief History of Synaesthesia and Music

Newton’s Opticks overview