diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-09-17 03:52:48 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-09-17 03:52:48 +0200 |
commit | ff75ed1b6509c56479b75bc470de5737658cf61a (patch) | |
tree | b25f7731ca9f579603f5191743fa110a5187e247 /chuck | |
parent | abfc56b8c4fc768593c7afdd1961aab35c0468c4 (diff) | |
download | osc-graphics-ff75ed1b6509c56479b75bc470de5737658cf61a.tar.gz |
added methods for changing image/video file/URL
Diffstat (limited to 'chuck')
-rw-r--r-- | chuck/OSCGraphics.ck | 4 | ||||
-rw-r--r-- | chuck/OSCGraphicsImage.ck | 8 | ||||
-rw-r--r-- | chuck/OSCGraphicsVideo.ck | 8 |
3 files changed, 18 insertions, 2 deletions
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; + } } |