-
Need to update alpha masking program that shows different tints on different items
I have a program made in flash that displays items and how they would look with multiple tint options on them. I hired out part of the code about 6 years ago and am willing to pay for the corrections I need to update this. This was originally done in Flash 5 but I use the current version now.
The program consist of a main swf with different tints and alpha settings. Here is part of that code to give you an idea of what I'm working with.
SetVisibleTrue = function (s, e, prefix, postfix) {
// loop from s to e
for (var i = s; i<=e; ++i) {
_root[prefix+i+postfix]._visible = true;
}
};
SetVisibleFalse = function (s, e, prefix, postfix) {
for (var i = s; i<=e; ++i) {
_root[prefix+i+postfix]._visible = false;
}
};
SetVisibleFalse(1, 84, 'Tint', 'butt');
SetVisibleFalse(1, 7, 'side', '_btn');
SetVisibleFalse(1, 7, 'front', '_btn');
SetVisibleFalse(1, 7, 'rear', '_btn');
SetVisibleFalse(1, 2, 'eye', '_btn');
SetVisibleFalse(1, 7, 'side', '_btn');
SetVisibleFalse(1, 7, 'front', '_btn');
SetVisibleFalse(1, 7, 'rear', '_btn');
SetVisibleFalse(1, 2, 'eye', '_btn');
// TINT 1 SMOKE
Tint1Side_mc._alpha = targetTint;
Tint1Front_mc._alpha = targetTint;
Tint1Back_mc._alpha = targetTint;
Tint1Eye_mc._alpha = targetTint;
Tint1Mirror_mc._alpha = targetTint;
______________________________________
The object swfs that are opened by the main swf have the objects with assigned masking over certain areas.
This is what I have for the code on the items that are imported with the masking.
_root.Tint1Side_mc.setMask(this.Tint1Mask1_mc);
_root.Tint1Front_mc.setMask(this.Tint1Mask2_mc);
_root.Tint1Back_mc.setMask(this.Tint1Mask3_mc);
_root.Tint1Eye_mc.setMask(this.Tint1Mask4_mc);
______________________________________
This all works fine as it is but I wanted to start doing a 3d version with pictures and want the masking to follow as the item turns. I have made 8 pictures with the same instance name and the masking in the correct place per picture on 8 different keyframes, but it only works on the first one. I know if there are more than two items with the same instance name on the same keyframe then they wont function properly but if they are on different keyframes is it the same rule.
I was basically putting 8 photos masked to show the item turning and was controlling it from the main swf using a basic next function.
Please message me if you can help with this and what you would charge.
-
Also if you need a better explanation of whats going on. Message me. I can skype or show you a better example. Thanks.
-
Senior Member
Originally Posted by debofly
I have made 8 pictures with the same instance name and the masking in the correct place per picture on 8 different keyframes, but it only works on the first one. I know if there are more than two items with the same instance name on the same keyframe then they wont function properly but if they are on different keyframes is it the same rule.
Not really, the thing is on the 2nd keyframe your movie clips get destroyed, and new ones (with the same names, right) are created. The masking link that existed between destroyed clips is no longer there, so.
What you want is placing your 8 images on timelines of mask/masked symbols themselves.
edit: no I'm not up to it, if you were wondering, but I thought my explanation would help you or any future takers.
Last edited by realMakc; 06-30-2013 at 09:07 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|