Random

Dec 13, 2007 at 7:37pm

Random

I need to add at least 15 different images and short quicktime movies to this patch and make then appear randomly on the same screen. wil anyone have a clue as how I’m to do that.Or is there a patch out there that does random selections of Quicktime movies?

max v2;
#N vpatcher 10 59 736 610;
#P origin 0 2;
#P window setfont Times 18.;
#P comment 397 341 57 1310738 if “no” then say so;
#P comment 552 330 126 1310738 if “yes” then start showing it;
#P comment 469 286 191 1310738 separate the movie_name and the “success” flag;
#P comment 465 246 191 1310738 look for messages that start with the word ‘read’;
#P comment 331 89 269 1310738 When the patch is opened , read in a movie. If successful , start playing it.;
#P user jit.pwindow 18 251 322 242 0 1 0 0 1 0;
#P window setfont “Fixedwidth Serif” 18.;
#P message 454 398 218 1441810 failed to read file;
#P newex 454 370 64 1441810 delay;
#P newex 454 342 97 1441810 select 0;
#P toggle 454 323 15 0;
#P message 345 467 230 1441810 blading.mov;
#P newex 345 435 130 1441810 prepend set;
#P newex 345 295 119 1441810 unpack s i;
#P newex 345 252 119 1441810 route read;
#P newex 325 58 97 1441810 loadbang;
#P newex 70 80 130 1441810 metro 33.33;
#P toggle 70 60 15 0;
#P message 325 129 185 1441810 read blading.mov;
#P message 264 129 53 1441810 read;
#P newex 214 201 141 1441810 jit.qt.movie;
#P window setfont Times 18.;
#P comment 345 491 103 1310738 Now Playing;
#P comment 355 195 269 1310738 will report “read 1″ if successful (0 instead of 1 if not);
#P fasten 2 0 16 0 219 237 24 237;
#P fasten 13 1 5 0 546 369 669 369 669 46 75 46;
#P connect 5 0 6 0;
#P connect 4 0 2 0;
#P connect 3 0 2 0;
#P connect 6 0 2 0;
#P connect 7 0 4 0;
#P connect 2 1 8 0;
#P connect 8 0 9 0;
#P connect 9 0 10 0;
#P fasten 15 0 10 0 459 424 350 424;
#P connect 10 0 11 0;
#P connect 9 1 12 0;
#P connect 12 0 13 0;
#P connect 13 0 14 0;
#P connect 14 0 15 0;
#P pop;

#35003
Dec 14, 2007 at 1:10am

One way would be to go from random to coll to jit.qt.movie.

Store the names of your movies in coll.
(1, read name.mov;) Use random to generate numbers to send this message to jit.qt.movie. Look at the help files for coll and jit.qt.movie and read the first jitter tutorial.

#118795

You must be logged in to reply to this topic.