Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > General > Gaming and Game Development

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-01-2012, 10:20 AM   #1
gen8
Registered User
 
Join Date: Aug 2012
Location: Adelaide, Australia
Posts: 2
Default [AS3] Color Transform across frames

Hoping someone can offer some advice for this problem! I'm making a dress-up game and have hit a brick wall with some code. I'm no Flash expert and this is my first venture into AS3, so first off apologies for that =}

I am using colorTransform to change the colour of a mask in a movieclip, controlled with buttons to change the frame to a new object and also buttons to control the colour selected.

The problem is that if I change a movieclips frame, it forgets what colour was chosen and defaults back to the original colour of the mask. I've tried spreading the mask over all the frames, and short of having a mask object on every frame I'm not sure how to do it.

Is there a way to stop this happening? So that if I move to a new frame and select say blue, frame 2 (and all the other frames) will remember the colour?

I've attached a zip with a .swf and .fla example of the code I'm using to change frames and colours. Thank you kindly in advance for any help you can offer!
Attached Files
File Type: zip Demo.zip (11.0 KB, 42 views)
gen8 is offline   Reply With Quote
Old 08-02-2012, 03:31 AM   #2
mltt
Registered User
 
Join Date: Aug 2012
Posts: 4
Default

try changeColor(BoxMC, 0xFFFF00)
mltt is offline   Reply With Quote
Old 08-02-2012, 07:20 AM   #3
gen8
Registered User
 
Join Date: Aug 2012
Location: Adelaide, Australia
Posts: 2
Default

That essentially just changes the whole box which, while it works, isn't what I need sorry. I only want to change the mask colour, because the game I am making will also have other layers for outlines, shading etc and the mask is the only thing that changes colour.

I need to be able to change the mask object within the movie clip and keep that colour over all frames somehow.
gen8 is offline   Reply With Quote
Old 08-02-2012, 12:11 PM   #4
mltt
Registered User
 
Join Date: Aug 2012
Posts: 4
Default

than make "static" thing with "dynamic" mask.
Attached Files
File Type: zip Demo1.zip (9.4 KB, 37 views)
mltt is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:54 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.