[Xerte] Moving Flex-style panels with text

Tenney Julian Julian.Tenney at nottingham.ac.uk
Thu Oct 25 12:07:02 BST 2007


I just remembered: I built some of this into the engine too:
 
if you give a page an id, then do:
 
pageID.drawPanel(50,50,400,400,0x898989, "Panel Title", true);
//x,y,w,h,colour,title,drag
 
You get a draggable panel that drags the page contents. 
 
It already did that - give it a try. 
 
I just added some events. When such a panel is dragged, it fires the
following: onStartDrag (when the user clicks it); onDrag (as the mouse
moves whilst dragging it) and onStopDrag (when it is dropped). If you
download the latest build, you'll get those events to tap into as well,
 
thanks,
 
Julian


________________________________

	From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Tenney Julian
	Sent: 25 October 2007 09:22
	To: Xerte discussion list
	Subject: RE: [Xerte] Moving Flex-style panels with text
	
	
	Hi Paul,
	 
	Use a decision icon to place more than one page on the screen at
the same time. Set the erase and eraseOnExit properties to 0, then the
flow will zip through all the pages, display the contents and move out
of the decision with everything on the screen. Add as many pages to the
decision as you want, and add your content to those pages.
	 
	If you give a page an ID, then you can use that in an event
response to capture onPress and onRelease. Use onPress to execute a
script that does page ID.startDrag(false,x,y,w,h); and onRelease to
execute a script that does pageID.stopDrag(); 
	 
	As well as facilitating this drag and drop, the use of a
decision icon in this way is very useful for managing complex pages,
where you might have many icons in the tree,
	 
	Julian
	 
	 


________________________________

		From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Paul Swanson
		Sent: 24 October 2007 22:30
		To: xerte at lists.nottingham.ac.uk
		Subject: [Xerte] Moving Flex-style panels with text
		
		

		Hi all, 

		I really like the Flex-style panels available in Xerte,
and would like to use them as "callout" containers. I can do this easily
enough if they are not draggable. But in order to get the text to move
with the panels, each panel has to be a page object, so it seems you can
only have one on the stage at a time. If I use a Graphic icon for the
panel, and then a Text icon for the text, should't I be able to use an
onDrag event, grab the x & y coords of the graphic icon, do a little
math and then move the text object accordingly? I've tried using an
Event Interaction with onDrag as the event and the id of the graphic
icon as the icon "property", but it doesn't seem to trigger anything.
And I've tried just adding a text icon to the even that prints "I'm
being dragged around!" but the text never appears, which leads me to
believe I'm not doing the Event properly. Any tips?

		_____________________________ 

		 Paul Swanson 
		 Harland Financial Solutions 
		_____________________________ 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20071025/68794c16/attachment.html


More information about the Xerte mailing list