header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
nannu
Points:0
Posts:0

5/24/2010 6:41:13 AM

Title: Error #1010: A term is undefined and has no properties. - color transform


hi all,

plzz fix it.....i want to change the color of the image which is dynamically loaded whenever the mouse is over the image and comes back to actual image color when the mouse is out
the as code is in script block...

private var myColorTransform:ColorTransform;
private function onImageMouseOver():void{
 img.transform.colorTransform = new ColorTransform(1, 1, 1, 1,255, 255, 255, 0); 
}
private function onImageMouseOut():void{
myColorTransform = new ColorTransform();
img.transform.colorTransform = myColorTransform;
}  
<mx:Image id="img" source="{rp2.currentItem.@mediahubthumbnail}" 
mouseOver="onImageMouseOver()"  mouseOut="onImageMouseOut()"/>  



1
Bran
Points: 0
Posts:0
5/24/2010 7:18:02 AM



it's working absolutely fine.Changed the image source to mine image. Here is your code that I used


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="1024" minHeight="768">
<mx:Script>
	<![CDATA[
	private var myColorTransform:ColorTransform;  
	private function onImageMouseOver():void{  
	img.transform.colorTransform = new ColorTransform(1, 1, 1, 1,255, 255, 255, 0);   
	}  
	private function onImageMouseOut():void{  
	myColorTransform = new ColorTransform();  
	img.transform.colorTransform = myColorTransform;  
	}
	]]>
</mx:Script>
	<mx:Image id="img" source="sampleImage.png"   
			  mouseOver="onImageMouseOver()"  mouseOut="onImageMouseOut()"/>
</mx:Application>

you can try including the colorTransform class import flash.geom.ColorTransform;

2
Chaolin
Points: 0
Posts:0
5/24/2010 7:22:32 AM



the error occurs when something is not recognized by flash. It should not occur on colorTransform class since its a flash native class. Which compiler sdk are you using. I checked on flex 3.4 with flash player 9. It works fine .

3
Admin
Points: 0
Posts:0
5/24/2010 7:28:37 AM



@nannu your email address with "@yahoo.co.in" address is bouncing mails/ is not valid. You will not be able to receive answer mails. Unless its a valid address.

Thanks

4
nannu
Points: 0
Posts:0
5/24/2010 7:35:11 AM



hi all,

bran ,is it due to image is in repeaters,i have used two repeaters to access the image arg
from the xml doc


well thank u...


hi admin team,
i am receiving the answer mails ,dont understand why it is bouncing back.
well i have provided another id.

thank u for ur support


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 3+1 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions