XML Feeds

.

[javascript-dev] Re: can't move fpic with Maxobj.rect, is there another way?

Emmanuel Jourdan c74-mailinglists at e--j.com
Tue Oct 23 22:40:01 MDT 2007


On 24 oct. 07, at 04:18, Dan wrote:

> I've got a workaround where I send information out one of my js  
> object's outlets and use "script move" messages to [thispatcher],  
> but it seems so much less elegant since I'm doing everything else  
> in Javascript.  Am I missing something obvious?

There's something wrong, in the meantime, you can send the "script  
move" message from JavaScript, which is slightly more elegant.

Cheers,
ej


inlets = 1;
outlets = 1;

//// these functions look the same to me, but moving the fpic doesn't  
work.
////
//// is there a way to move an fpic object in javascript?

function move_myPanel(X, Y)
{
	/// get my panel object
	var myPanel = this.patcher.getnamed("myPanel");	

	/// move the 100x100 Panel
	myPanel.rect = [X, Y, X+100, Y+100];
}

function move_myFpic(X, Y)
{
	/// move my Fpic
	this.patcher.message("script", "move", "myFpic", X, Y);
}


More information about the javascript-dev mailing list