Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 9th, 2024, 4:12 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Dragging between photos in slideshow module; eg ipod touch
PostPosted: May 13th, 2010, 9:43 pm 
Offline

Joined: January 26th, 2009, 6:55 pm
Posts: 4
I was wondering if it is possible or if anyone has tried creating an ipod touch type of interface. I would like to drag a photo off screen or left or right and have the next one center up. Thought I might get it to work using separate window and stacking photos to the right and then dragging, instead of a scrollbar. Not sure how I would get it to center on screen.

Thanks.

David


For this message david armstrong has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Dragging between photos in slideshow module; eg ipod tou
PostPosted: May 18th, 2010, 11:39 am 
Offline

Joined: April 5th, 2008, 2:41 pm
Posts: 102
Location: Sydney
Opus: Opus Pro Edition 9.51
OS: Windows 8.1
System: Acer Aspire V touch screen edition 4G RAM
G-day! - Im actually fiddling with this very thing at the moment - Heres how Im thinking it should work.....
Ok, draw a rectangle ( say for example if your using a resolution of 1280x1024 for example )...you make your rectangle 640x480. ( so it sits in the middle of your screen. ) - I gave mine a black background by the way.

Next, create another rectangle WITHIN the first. give it ( just for reference ) another colour say - blue perhaps.
Now, take the blue rectangle ( that you just created INSIDE the first, and stretch it to its limits within the bounderies of the first.....- then while your still clicked on this INNER rectangle, use your arrow key ( left or right ) to move the INNER rectangle BEYOND the bounderies of the first, and stretch it right to the edge of the page.

Next, move the OTHER side of the INNER rectangle back in the OTHER direction, and stretch THAT end ALSO to the opposite side of the page. ( you should end up with a black rectangle in the middle of the page with a much LONGER blue one that seems to go right across your screen. - ( try to imagine a strip of film sliding - with a square in the middle.

Next of all comes your " pics " . ( but I iitially tried just simple coloured squares - just to get some movement happening ).

Ok, NEXT step: create say 10 rectangles and place them WITHIN that INNER rectangle - its easy - just make the first one, and then make duplicates till your left with a rectangle in the middle of your screen - and a long blue rectangle that appears to run through it and extends to the edge of your page, with ten white bordered squares on it. ( you can actually give each square a different background colour so you can tell if one moves in either direction.


The "movement" is the trick - Ive been fiddling with various methods.

One I tried was that when you click on each of those 10 squares, its told to shift that whole inner blue rectangle an exact amount of pixels ( this can be great for going in one direction only though! :D

A better idea was to have 2 invisible rectangles that overlay in the middle of my original rectangle - depending on WHICH SIDE of the picture you touch - the picture ( or white square in this case ) will move the long blue rectangle in that particular dirction - this sorted out the left OR right movement.

Im currently looking at "zoom" - which means when the next picture ( or square ) DOES come into focus - an enlarged version of that same picture moves to the front of the stack and appears directly ABOVE its original ( and smaller ) counterpart.


I have NO "scripting" experience and this is a far as I have got with the interface thus far.

At the very least, I hope this has been of benefit (and hopfully NOT too confusing ).

Believe me, Im no "Mack or Larz " - THESE people ( among others ) are gods when it comes to this stuff.

But for what its worth... - thats how I have it to the point it is at right now.

Cheers!. and glad to be of hopfully some help :lol:

_________________
Acer Aspire V touch
Opus Pro 9.51


For this message Viper4054 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Dragging between photos in slideshow module; eg ipod tou
PostPosted: May 18th, 2010, 5:27 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
V,

You inspired me to see what could be done :-)

Here's a published example (Photo Flicker). Just point it at a folder full of JPEGs and flick till your heart's content.

http://www.live.interaktiv.co.uk/index. ... &Itemid=19

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Dragging between photos in slideshow module; eg ipod tou
PostPosted: May 18th, 2010, 8:54 pm 
Offline

Joined: April 5th, 2008, 2:41 pm
Posts: 102
Location: Sydney
Opus: Opus Pro Edition 9.51
OS: Windows 8.1
System: Acer Aspire V touch screen edition 4G RAM
Nice work Mack! :D

Pretty much the same direction I was going.

Im glad to have been an inspiration - thats why we're all here. you've inspired me back! now I want to hammer the rest of it out -tell you what though, it would be interesting to compare the source file because for the life of me, I'd like to refine the smoothness of movement like yours. - and also, im having a rough time getting "space" to insert my zoom - I understand the tirigger ( Im using a collision detection ) - but the rate looks great on your model - care to e-mail me what you have as a professional courtasy perhaps?

rick_pope@bigpond.com

This is why I love this forum - ideas that bounce! :wink: - enough said! :lol:

_________________
Acer Aspire V touch
Opus Pro 9.51


For this message Viper4054 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Dragging between photos in slideshow module; eg ipod tou
PostPosted: May 19th, 2010, 8:27 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Morning Viper,

Haven't really decided what to do with the source code but as you're running Opus 6.0 it won't load anyway :-(

Mack

P.S I wouldn't post an email address, in full form, on an open board - the bots and spammers will eat it up and you'll be receiving junk until 2020!

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Dragging between photos in slideshow module; eg ipod tou
PostPosted: May 19th, 2010, 9:47 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 511
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
Seems to be the season for this type of thing. I have just started trying to replicate the 'flick' action to be used with a multi-touch monitor Win 7 and Opus. I have the pick up and move scripting done and am just about to get the actual 'flick' scripting done. I'm having difficulty deciding how to transition between the picking up and the 'throw' movement. So far, my script just works with a single named object. I haven't thought about how I can pick up any object on screen and flick it.

My concern is that the last time I did this type of thing, it worked fine in preview, but when published, Opus ran out of steam and the motion became very jerky, but I had about 10 objects following the mouse pointer and there was a lot of scripting to get the 'laggy' movement in all the objects.
It seemed to be caused by the event handler and subsequennt scripting using a lot of processing power, but I never did find out why it worked better in preview than when published, so I gave it up.

_________________
Whoever designed this, never actually used it!


For this message sandyn has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Dragging between photos in slideshow module; eg ipod tou
PostPosted: May 19th, 2010, 5:00 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
It seems there are two kinds of 'flicking'? I thought ipods did more of a scrolling series of photos or frames. The other method discussed seems to be grabbing a single photo and setting it in motion in a direction to go off screen.

Viper mentioned "collision detection". I think that could be a trigger to simply 'take over' the grabbed object and move it to a fixed point off screen. Probably would have to use something like SetLayer() to assist with that.

Scrolling chain of images would be a bit more involved... focus on getting the most proximate object to center stage, and setting position of all the others using relative coordinates.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Dragging between photos in slideshow module; eg ipod tou
PostPosted: May 19th, 2010, 5:35 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 511
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
The way I do it is to attach an event handler to an object, then using that to trigger a function. The function then controls the movement of the object, but related to the movement of the mouse. so I can flick it off screen, or I could pull down a reel of images....once I figure out how to do that dynamically.

Using a script to control the motion of an object allows you to add all kinds of effects such as the first object lags the pointer by X pixels and takes Y seconds to reach the pointer position. then the next object will lag by X+A pixels and take Y+B seconds to reach the pointer position. You can get a kind of elastic effect on dragged objects, but you can also have no lag, so the object will just follow the pointer.
see
viewtopic.php?f=9&t=3170
for an example. Each dot in that example could be an image, or any object.


My doubts about my method is how to dynamically register an event handler. I haven't had time to think about how to do it and the amount of processing power the event handler takes when it's initiated by a mousemove.

Sandy

_________________
Whoever designed this, never actually used it!


For this message sandyn has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Dragging between photos in slideshow module; eg ipod tou
PostPosted: May 19th, 2010, 8:58 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Sandy,

Quote:
My doubts about my method is how to dynamically register an event handler. I haven't had time to think about how to do it and the amount of processing power the event handler takes when it's initiated by a mousemove.

Do you think this would work? Put a Frame00x object in front of the image (no fill, no border).

Some time ago Mackavi posted links to his Interactv 'functions' -- one of which was implementation of the Mouse-click 'picking-up' the object. ( I think he used Right-click to 'release', but that could be changed to Mouse-up perhaps). So use that to pick-up the empty, invisible Frame.

Use a ticker action or a while loop then to test for collision (or IsIntersecting) of Frame00x with some object just off to the right (e.g., a vertical line... also not seen). In fact, do the same on the left side, and use the Switch/Case depending on whether test is true for 'right' or 'left'. Actions/statements in 'case Left' would simply set var_Direction to -1 to use later (or maybe just put your 'move left' actions here directly).

BTW, an option/necessity here would be that the Frame00x is dropped:
a. that can be a Trigger (in standard Actions anyway)
b. set-up "object returned if not dropped in a dropzone" -- so it goes back to center or original position.

Advantage, I think, might be that you do not have to continuously monitor for your mouse.

Quote:
how to dynamically register an event handler.
Can you say more about what that means, or better outline the action sequence?

I would think you can just register event for MouseOver or MouseClick on an object. If you need to consider many many objects, then either narrow the possibilities to fixed zones... or perhaps pass the relevant object to the function to use with the RegisterEventHandler(). I forget what the limitations or challenges were with this, but I think it turned out doable.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Dragging between photos in slideshow module; eg ipod tou
PostPosted: May 21st, 2010, 11:28 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 511
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
I was developing the application for a multi-touch monitor and Win 7. I haven't had time to check which touch actions correspond to which trigger in Opus. I paid for the monitor, but that doesn't guarantee you get access to it!!
I want to use the event handler, because it is relatively simple to get an object to follow the mouse pointer, but I can also modify the response of the object. It's a nice effect. There is a chunk of script which defines where the object goes rather than just dragging and dropping

I have to experiment with other event handler triggers. With my current method. I register the event handler on page show, but what I need to be able to do is register the event handler when I select the object, but it doesn't work and I'm not sure if it can?..cart coming before the horse??.
Selecting the event handler dynamically:- at the moment I have event handlers registered to named objects, but I need to change the object (if it was an image for example), but putting the image in a frame gets round that :-)
My main problem is time. I have a database application which was a monster to get working and it's too easy to get distracted by much more interesting things!

I suppose this should be in the advanced section since it's scripting.

_________________
Whoever designed this, never actually used it!


For this message sandyn has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Dragging between photos in slideshow module; eg ipod tou
PostPosted: May 21st, 2010, 1:23 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Use this!

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Dragging between photos in slideshow module; eg ipod tou
PostPosted: May 21st, 2010, 2:46 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
but what I need to be able to do is register the event handler when I select the object, but it doesn't work and I'm not sure if it can?..cart coming before the horse??.... I suppose this should be in the advanced section since it's scripting.
Go ahead and start a thread over there. Meanwhile I'll dig up REH code I played with.

As Mack suggested.... 'this'
-- use Std trigger for MouseOver or MouseClick, and call a function funcName( this )
-- put your REH scripts in funcName( whichObj )
e.g. var xyz = whichObj.RegisterEventHandler( etc etc )

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group