3 Replies - 1664 Views - Last Post: 09 April 2009 - 04:57 PM

#1 Bob20000  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 09-October 08

When changing movieclip color, I lose textfield color

Posted 05 January 2009 - 05:31 PM

Hi;

Trying to print multicolored pages and text. (That's why my textfield is inside my movieclip).
Want the user to have the ability to change page and/or text color with an onPress function.
Anyway, I can change my text (hi_txt) color and I can change my movieclip (page_mc) color, but once I change my movieclip's color, I lose my textfield color and I can't get it back.

Worked and googled all day to no avail.
Any help would be appreciated,
Thanks
Bob


import flash.geom.ColorTransform;
var mct:ColorTransform = new ColorTransform();

butt1.onPress = function(){
	mct.rgb = 0x0000ff;
	page_mc.transform.colorTransform = mct;
}

butt2.onPress = function(){
	page_mc.hi_txt.text = "Hi"
	page_mc.hi_txt.textColor = 0xff0000;
}


Is This A Good Question/Topic? 0
  • +

Replies To: When changing movieclip color, I lose textfield color

#2 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1137
  • View blog
  • Posts: 7,099
  • Joined: 07-September 06

Re: When changing movieclip color, I lose textfield color

Posted 05 January 2009 - 08:42 PM

Why not just place the textfield on top of the movieclip? Or create a second movieclip that is within the first and change the new one, so you aren't ever changing the colors of everything.
Was This Post Helpful? 0
  • +
  • -

#3 Bob20000  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 09-October 08

Re: When changing movieclip color, I lose textfield color

Posted 05 January 2009 - 09:27 PM

View PostBetaWar, on 5 Jan, 2009 - 07:42 PM, said:

Why not just place the textfield on top of the movieclip? Or create a second movieclip that is within the first and change the new one, so you aren't ever changing the colors of everything.


Thanks BetaWar;

I created a new movieclip and after I placed the original movieclip and textfield in it (with the textfield above the original movieclip), I was able to change the movieclip's color without it getting rid of the textfield color.

So now code looks like this:

import flash.geom.ColorTransform;
var mct:ColorTransform = new ColorTransform();

butt1.onPress = function(){
	mct.rgb = 0x00ff00;
	pago.page_mc.transform.colorTransform = mct;
}

butt2.onPress = function(){
	pago.hi_txt.text = "Hi"
	pago.hi_txt.textColor = 0xff0000;
}

Was This Post Helpful? 0
  • +
  • -

#4 DynamoAthletic  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 09-April 09

Re: When changing movieclip color, I lose textfield color

Posted 09 April 2009 - 04:57 PM

I noticed this question and have a similar one. I am just observing for now and trying to learn from others.. This is my first post on this forum.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1