Page 1 of 1

how to script

Posted: Fri Jul 01, 2005 14:39
by Anonymous
hi folks

i know how to make one symbol of a flash file react to sound (e.g. changing size), but what if this symbol is animated in flash (e.g. moving from left to right) already, how do i have to built up the timeline in flash? i tried to put the script (_root.symbol._xscale = raudioleft.............) in every second frame of the main timeline, where "symbol" is animated, but it doesn't work well. can u help me?

cheers

Posted: Fri Jul 01, 2005 23:49
by levon
im not sure if this will work but try it:

have a movie clip on the main stage called movie1, inside this have one called movie2. put the actionscript _root.symbol._xscale = raudioleft............ on movie2. and animate movie1.

i think that should work, but i havent tested it

Posted: Sat Jul 02, 2005 11:26
by Anonymous
hi
thanks for your answer....
do you mean i should put the script on the symbol itself or in the frames of the timeline where movieclip 2 is?
i'll try this out and report what happens
greets

Posted: Thu Jul 07, 2005 09:43
by edwin
Hi,
download the following file to see a good example on how to use the flash scripting useing the resolume paramters.

http://www.resolume.com/download/flashparams.fla

remember a few things:
1 - when loading this flash file in resolume (swf of course) make sure the timeline mode is set to flash (right click the channel to set this property).
2 - make sure your flash movies run on 25 + fps., 12 is too slow to respond well. the example file is set to 25 fps.


cheers
Edwin

Posted: Fri Jul 08, 2005 17:17
by Anonymous
hi edwin
that's really a powerful option with flash parameters used in resolume, but it's not solving my problem, unless i misunderstood you.
say i got three symbols responding to sound by changing size- now i want to combine this symbols to one new symbol, which for example follows a path. how can i do this? if you don't know what i mean i'd like to send you my fla, if you got time for this.....

cheers

Posted: Sat Jul 09, 2005 04:13
by levon
you will have to use levels, and such, i surgest you do some flash tutorials with coding, and learn the hierarchies of objects, movie clips and etc.

a nice site is http://www.flashkit.com, its where i learn most of the coding stuff. and there is a realy good book by macromedia aimed at actionscripting.

Posted: Fri Oct 06, 2006 16:55
by stanleystark
edwin, is there a way to keep timeline control by resolume and at the same time use flash parameters?

Posted: Mon Oct 30, 2006 09:45
by edwin
hi stanleystark,
if you put your code in a movieclip you can still use the normal timeline.
when you set the timelinemoe to resolume, resolume will control the playback so it will force flash to play each frames.
Resolume wil tell flash give me frame 1, then 2, 3, 4, 5 etc.
So if you have a script in frame 3 for instance that says jump to frame 2 it will be ignored by resolume. Only when timelinemode is set to flash functions as gotoAndStop(Play) will work correctly.

But this is only applicable to the main timeline, that's the only timeline we have control over. So the timelines of movieclips are untouched.

Cheers
Edwin

[Edited on 30-10-2006 by edwin]

Posted: Wed Feb 07, 2007 00:51
by vj.emtv
hi all !

thanks to your flashparams fla, I think I've finally understood the basics of scripting in flash for resolume control ! yeppeee !

a question remains though :
1 - when loading this flash file in resolume (swf of course) make sure the timeline mode is set to flash (right click the channel to set this property).
is there a way of making resolume load flash files with the timeline mode set to flash by default?
that'd be sooo nice..

[Edited on 6-2-2007 by vj.emtv]

Posted: Wed Feb 07, 2007 02:33
by vj.emtv
actually a second question remains !

on the first frame of the movie clip, there's this code:

Code: Select all

//declare variables
var rparameter1;
var rparameter2;
var rparameter3;
var rparameter4;

//initialise variables
rparameter1 = 100;
rparameter2 = 100;
rparameter3 = 0;
rparameter4 = 100;
what do these initial values correspond to ? to the 0-100 midi values ?
or what ?