From ff75ed1b6509c56479b75bc470de5737658cf61a Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 17 Sep 2012 03:52:48 +0200 Subject: added methods for changing image/video file/URL --- chuck/OSCGraphics.ck | 4 ++-- chuck/OSCGraphicsImage.ck | 8 ++++++++ chuck/OSCGraphicsVideo.ck | 8 ++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) (limited to 'chuck') diff --git a/chuck/OSCGraphics.ck b/chuck/OSCGraphics.ck index 2c3c25e..a4e666a 100644 --- a/chuck/OSCGraphics.ck +++ b/chuck/OSCGraphics.ck @@ -58,13 +58,13 @@ public class OSCGraphics { return video; } fun static OSCGraphicsVideo @ - newVideo(int pos, int geo[], float opacity, string file) + newVideo(int pos, int geo[], float opacity, string url) { OSCGraphicsVideo video; video.init(osc_send, "video", "s", pos, "__video_"+free_id, geo, opacity); - file => osc_send.addString; + url => osc_send.addString; free_id++; return video; diff --git a/chuck/OSCGraphicsImage.ck b/chuck/OSCGraphicsImage.ck index 927cacd..fa3bd85 100644 --- a/chuck/OSCGraphicsImage.ck +++ b/chuck/OSCGraphicsImage.ck @@ -1,2 +1,10 @@ public class OSCGraphicsImage extends OSCGraphicsLayer { + fun string + file(string file) + { + osc_send.startMsg("/layer/"+name+"/file", "s"); + file => osc_send.addString; + + return file; + } } diff --git a/chuck/OSCGraphicsVideo.ck b/chuck/OSCGraphicsVideo.ck index def61f4..e289573 100644 --- a/chuck/OSCGraphicsVideo.ck +++ b/chuck/OSCGraphicsVideo.ck @@ -1,2 +1,10 @@ public class OSCGraphicsVideo extends OSCGraphicsLayer { + fun string + url(string url) + { + osc_send.startMsg("/layer/"+name+"/url", "s"); + url => osc_send.addString; + + return url; + } } -- cgit v1.2.3