A lot of people have posted similar threads but Im still having trouble. Ive managed to get flashserver to send data to Max but its sending data the other way thats causing me stress!
All I want to do is control movie clips from within Max. I used the code from the flashserver instructions,
argv = ; // create a new array
doc = doc.substr(0, doc.length – 1); // chop off ‘;’ at the end
argv = doc.split(" "); // split at spaces and convert to array
argc = argv.length; // get number of elements in array
for(i = 0; i < argc; i++) // loop through all arguments
msg += "argument "+ i +" is "+ argv[i];
clip = argv; // get name of MovieClip
frame = argv; // get the frame number
Iv then sent the message "clip1 2" to flashserver (clip1 being my movie clip name and 2 being the frame i want to play from) that gave me an error message telling me flashserver couldnt undertand. Ive also tried sending the message broadcast clip1 2, this didnt do anything. Im probably missing something really small but any help would be much appreciated.
Am 08.02.2008 um 00:31 schrieb Adam Chambers:
> Iv then sent the message "clip1 2" to flashserver (clip1 being my
> movie clip name and 2 being the frame i want to play from) that
> gave me an error message telling me flashserver couldnt undertand.
The message "clip1 2" won’t do anything, it has to be "send
number> clip1 2".
> Ive also tried sending the message broadcast clip1 2, this didnt do
This means that there is something wrong in your Flash code. I’d
advise you to print the received data to a text field in Flash to see
whether it gets through. If that looks ok print the movie frame name
and frame number you’re extracting from the array…. that’s the
normal way how to solve problems. In the end you probably just have
something wrong with your movie clip1. Try setting up a button in
Flash that when clicked does the same thing and then investigate what
the difference is between that button and the command sent from Max.
PS: don’t send me Flash files, I won’t fix them for you
Ive got everything working now anyway. Really getting the hang of it. Im designing an interface in flash for my fft analyzer and mixing desk. Your object is great! ill send you the finished product once its done. I think im going to have to use 2 computers one for flash and one for max msp as it crashes quite a lot. Do you use this technique.
Thanks a lot for your help.
Am 12.02.2008 um 19:25 schrieb Adam Chambers:
> cheers Olaf.
> Ive got everything working now anyway. Really getting the hang of
> it. Im designing an interface in flash for my fft analyzer and
> mixing desk. Your object is great! ill send you the finished
> product once its done. I think im going to have to use 2 computers
> one for flash and one for max msp as it crashes quite a lot. Do you
> use this technique.
I usually get away with one machine in my projects, but it really
depends on what you’re doing. It’s quite easy to flood Flash with too
much data and first Flash will block, followed by flashserver
blocking, followed by Max crashing. I can only recommend to use a
polling meachnism, so that Flash signals Max when it wants new data.
Thats much better than sending Flash too much data all the time that
it can’t handle. Flash is not threaded, so as long as it’s buzy doing
something else (graphic things most likely) it won’t even look at the
incoming data from Max and flashserver will return you the "client
blocked xx milliseconds" warning.
Always monitor the CPU usage of your Flash movie and then decide
whether there’s anything left to run Max/MSP on the same machine.