# Multiple Search tool AS3 wont work?

**URL:** https://forum.kirupa.com/t/multiple-search-tool-as3-wont-work/296324
**Category:** Uncategorized
**Created:** [September 13, 2009, 4:06pm UTC](https://forum.kirupa.com/t/multiple-search-tool-as3-wont-work/296324 "2009-09-13T16:06:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![anix](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@anix](https://forum.kirupa.com/u/anix)
#### Post date: [September 13, 2009, 4:06pm UTC](https://forum.kirupa.com/t/multiple-search-tool-as3-wont-work/296324/1 "2009-09-13T16:06:24Z")

</div>

I am trying to develop a tool that can be used to search multiple sites at one like google, bing etc. However I keep running into the following errors:

```auto

## [Tweener] Error: The property '_color' doesn't seem to be a normal object property of [object MovieClip] or a registered special property.
## [Tweener] Error: The property '_color' doesn't seem to be a normal object property of [object MovieClip] or a registered special property.
## [Tweener] Error: The property '_color' doesn't seem to be a normal object property of [object MovieClip] or a registered special property.
TypeError: Error #1010: A term is undefined and has no properties.
    at search_fla::search_1/frame1()

```

My code is below, can anyone please help this is annoying??  
[AS]

var text\_in\_field:String = “Search in”; // Default text on input textfield  
var bg\_input\_text\_color:String = “0x333333”; // Input textfield background color  
var btn\_text\_color:String = “0x666666”; // Search button text color  
var btn\_bg\_color:String = “0x000000”; // Search button background color  
var btn\_over\_color:String = “0x222222”; // Search button color over  
var btn\_text\_over\_color:String = “0xFF0000”; // Search button text color over  
var input\_text\_border:Boolean = false; // Enabled input text border (only true and false, without “”)  
var input\_text\_border\_color:String = “0x171717”; // Input text border color  
var input\_text\_bg:Boolean = false; // Enabled input text border (only true and false, without “”)  
var input\_text\_bg\_color:String = “0x666666”; // Input text background color  
var aSearch:Array = new Array([“Google”, “[http://www.google.com/search?q=](http://www.google.com/search?q=)”]  
,[“Yahoo”, “[http://search.yahoo.com/search?p=](http://search.yahoo.com/search?p=)”]  
,[“Bing”, “[http://www.bing.com/search?q=](http://www.bing.com/search?q=)”]  
,[“Live”, “[http://search.live.com/results.aspx?q=](http://search.live.com/results.aspx?q=)”]  
);

import caurina.transitions._; // Import animation classes  
// Set color and settings to objects on stage  
Tweener.addTween(bg, {\_color:bg\_input\_text\_color});  
Tweener.addTween(btn.txt, {\_color:btn\_text\_color});  
Tweener.addTween(btn.bg, {\_color:btn\_bg\_color});  
text\_mc.input\_text.border = input\_text\_border;  
text\_mc.input\_text.borderColor = input\_text\_border\_color;  
text\_mc.input\_text.background = input\_text\_bg;  
text\_mc.input\_text.backgroundColor = input\_text\_bg\_color;  
text\_mc.input\_text.text = text\_in\_field + " " + aSearch[0][0];  
// Set position for every logo engine  
for (var i:Number = 0; i \< aSearch.length; i++)  
{  
switch (aSearch_[0])  
{  
case “Google”:  
logos.google\_btn.y = i \* 20;  
break;

```
    case "Yahoo":
        logos.yahoo_btn.y = i * 20;
    break;
    
    case "Bing":
        logos.bing_btn.y = i * 20;
    break;
    
    case "Live":
        logos.live_btn.y = i * 20;
    break;
}

```

}

more\_btn.addEventListener(MouseEvent.MOUSE\_UP, moreOut);  
less\_bttn.addEventListener(MouseEvent.MOUSE\_UP, lessOut);  
btn.addEventListener(MouseEvent.MOUSE\_UP, btnOut);  
btn.addEventListener(MouseEvent.MOUSE\_OVER, btnOver);  
btn.addEventListener(MouseEvent.MOUSE\_OUT, btnOutEff);

// Erase default text on input textfield  
text\_mc.input\_text.onSetFocus = function():void  
{  
for (var i:Number = 0; i \< aSearch.length; i++)  
{  
if (this.text == text\_in\_field + " " + aSearch\*[0]) this.text = “”;  
}  
};  
less\_btn.visible = false;  
var clicks:Number = 0;  
var which:Number = aSearch[clicks][1];

// Pagination - button more and less  
function moreOut(evt:MouseEvent):void  
{  
clicks += 1;  
less\_btn.visible = true;  
if (clicks \< 3)  
{  
var pix:Number = logos.y - 20;  
Tweener.addTween(logos, {y:pix, time:.2});  
}  
if (clicks == 2)  
{  
more\_btn.visible = false;  
}  
which = aSearch[clicks][1];  
text\_mc.input\_text.text = text\_in\_field + " " + aSearch[clicks][0];  
};  
function lessOut(evt:MouseEvent):void  
{  
clicks -= 1;  
more\_btn.visible = true;  
if (clicks \>= 0)  
{  
var pix:Number = logos.y + 20;  
Tweener.addTween(logos, {y:pix, time:.2});  
}  
if (clicks == 0)  
{  
less\_btn.visible = false;  
}  
which = aSearch[clicks][1];  
text\_mc.input\_text.text = text\_in\_field + " " + aSearch[clicks][0];  
};

// Search button actions  
var to\_search:String;  
function btnOut(evt:MouseEvent):void  
{  
to\_search = text\_mc.input\_text.text;

```
var request:URLRequest = new URLRequest(which + to_search);
try {
  navigateToURL(request, '_blank'); // second argument is target
} catch (e:Error) {
  trace("Error");
}

```

};  
// Search button effects  
function btnOver(evt:MouseEvent):void  
{  
Tweener.addTween(this.bg, {\_color:btn\_over\_color, time:.4, transition:“easeOutQuad”});  
Tweener.addTween(this.txt, {\_color:btn\_text\_over\_color, time:.4, transition:“easeOutQuad”});  
};  
// Search button effects  
function btnOutEff(evt:MouseEvent):void  
{  
Tweener.addTween(this.bg, {\_color:btn\_bg\_color, time:.4, transition:“easeOutQuad”});  
Tweener.addTween(this.txt, {\_color:btn\_text\_color, time:.4, transition:“easeOutQuad”});  
};[/AS]
