how to script

Post your questions here and we'll all try to help.
Post Reply
Anonymous

how to script

Post 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

levon
Posts: 483
Joined: Fri Oct 08, 2004 03:38
Location: adelaide, australia

Post 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

Anonymous

Post 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

edwin
Team Resolume
Posts: 1207
Joined: Thu Oct 07, 2004 10:40

Post 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

Anonymous

Post 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

levon
Posts: 483
Joined: Fri Oct 08, 2004 03:38
Location: adelaide, australia

Post 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.

stanleystark
Posts: 62
Joined: Tue Nov 30, 2004 16:29

Post by stanleystark »

edwin, is there a way to keep timeline control by resolume and at the same time use flash parameters?

edwin
Team Resolume
Posts: 1207
Joined: Thu Oct 07, 2004 10:40

Post 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]

User avatar
vj.emtv
Posts: 17
Joined: Mon Feb 28, 2005 20:54
Location: France

Post 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]

User avatar
vj.emtv
Posts: 17
Joined: Mon Feb 28, 2005 20:54
Location: France

Post 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 ?

Post Reply