A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] Invalid URL Request?

  1. #1
    Senior Member
    Join Date
    May 2009
    Posts
    280

    resolved [RESOLVED] Invalid URL Request?

    Trying to figure out how a few simple combinations of a string results in a fail conversion to a url.

    PHP Code:
    for(i;i<numberOfProjects;i++)
        {
            var 
    currentN:Number = new Number(1);
            var 
    l:Loader = new Loader();
            var 
    locationOfPicture:String = new String("http://<my domain>/PROJECTS/_IMAGES/" currentN.toString() + "-0.png");
            var 
    urlRQ:URLRequest URLRequest(locationOfPicture); //Project number + card Image (card image is always  0) 
    The result:
    Code:
    TypeError: Error #1034: Type Coercion failed: cannot convert "http://www.oarlus.eu/PROJECTS/_IMAGES/1-0.png" to flash.net.URLRequest.
    	at Editor_fla::MainTimeline/loadCompleteF()[Editor_fla.MainTimeline::frame3:35]
    	at flash.events::EventDispatcher/dispatchEventFunction()
    	at flash.events::EventDispatcher/dispatchEvent()
    	at flash.net::URLLoader/onComplete()
    Last edited by shabasky; 02-19-2010 at 09:34 PM.

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    var urlRQ:URLRequest = new URLRequest(locationOfPicture);
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Senior Member
    Join Date
    May 2009
    Posts
    280
    Im so bad.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center