1 person found this helpful
I'm sure you can. If each item of a gauge is an individual movieclip, then at each frame for each item's timeline where it might stop for a different style, you can have a variable in the movieclip that gets set to a particular value respresenting that style. And when you want to retrieve all the variables of the different items, in your main timeline you have a function that collects them.
Thank you NedWebs.
How would i go about adding the variable to each movie clip and where in each movie clip would i put the variables?
Would it be of any help if i uploaded my onto this forum?
1 person found this helpful
I am assuming each movieclip is a separate guage item/feature, and each frame in each movieclip is a different style. So that means there might be a "needle_mc" movieclip where various different frames in that movieclip display the different styles of needles one can select.
If that is the scenario you intend, then I would have one layer for actionscript that extends the length of the timeline so that it is accessible to all the frames in the movieclip's timeline--extending the length of the timeline means it only has a keyframe in frame 1, and regular frames added up thru the extent of the style selections in the other layer(s). In frame 1 of that layer the needle style variable would be declared, liklely as the first style in the movieclip...
var style:String = "style1"; // you could use part numbers or whatever
Then, I would have a second actionscript layer that has all the stop() frames for the different styles, and in each stop() frame, the needle style variable would be assigned as needed...
style = "style2";
so when you need to determine what style(s) got selected, in your main timeline you could have a function that collects each of the variables from the different movieclips...
var needle_style:String = needle_mc.style;
var dial_style:String = dial_mc.style;
I don't know if "style" is a reserved word of any kind, so consider it as just an example name... it may fly and it may not.
Thanks Ned!!! I think im getting the point.
Can you point me in the direction or give me some tips as to how to create the output data file?
I believe you can write to text files from Flash... i would like to do this for now... and possibly at some later point shoot the data to an email.
Im getting an error with:
Styles was not a reserved word in Flash. Is there something i have to do to declare Styles as a variable so i dont get the error message?
It says "Statement must appear within on handler".
Im such a noob.
Im still having a hard time with the actionscripting part of my project... is there any more help that you can offer me?
Ned - Im still stuck on this project... Can you offer me anymore guidance??
Hi Ned. can you help me out on this a bit more? i would really appreciate it. thanks.