# 1034	Type Coercion failed: cannot convert \_ to flash.net.URLRequest

**URL:** <https://forum.kirupa.com/t/1034-type-coercion-failed-cannot-convert---to-flash-net-urlrequest/314996>\
**Category:** flash\
**Created:** [October 14, 2010, 2:33pm UTC](https://forum.kirupa.com/t/1034-type-coercion-failed-cannot-convert---to-flash-net-urlrequest/314996 "2010-10-14T14:33:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vigordesign](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/vigordesign/32/2567_2.png) [@vigordesign](https://forum.kirupa.com/u/vigordesign)\
**Post date:** [October 14, 2010, 2:33pm UTC](https://forum.kirupa.com/t/1034-type-coercion-failed-cannot-convert---to-flash-net-urlrequest/314996/1 "2010-10-14T14:33:05Z")

</div>

Hello!

I’m [SIZE=2]working[/SIZE] on a little game/quiz where the user has to get 8 or more questions correct. If they get 8 or more correct and hit submit, their scores will be sent to a server. I don’t have the server info yet, but I believe I’m pretty close to solving this on the flash end of things, as far as sending out the url with the total number correct appended.

I’m getting the following error.

```auto

TypeError: Error #1034: Type Coercion failed: cannot convert "http://www.website.com/complete.asp?13" to flash.net.URLRequest.
    at coElvFoodProg_testKev2_fla::_3strikes_56/clickgetTotals()

```

Here are the parts of my aS that apply -

```auto
var appendURL:String = "http://www.website.com/complete.asp?";
var urlString:String = "";

getTotals.addEventListener(MouseEvent.CLICK, clickgetTotals);

//////////// CLICK TO GET TOTALS ////////////
function clickgetTotals(event:MouseEvent):void{
    trace('show score!');
    showScore();
    if(score >= 8){
        trace("Win!!!!");
        winOrLose.visible=true;
        MovieClip(winOrLose).gotoAndStop("win");
        urlString = appendURL + score ;
        trace(urlString);
        navigateToURL(urlString);
    }
    else if(energy <= 7){
        trace("you lose!!");
        winOrLose.visible=true;
        MovieClip(winOrLose).gotoAndStop("lose");
        
    }
}

```

It seems like the navigate to URL part isn’t working because if I comment out that line I don’t get the error. I did adapt the url parts of this code from as2 to as3, so there may be a problem there as well. Anyone know how to remedy this?

Thanks so much!  
Kev
