A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: help with actionscript3 in Flash CS4

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    1

    Unhappy help with actionscript3 in Flash CS4

    I keep getting this error
    ReferenceError: Error #1065: Variable newURLRequest is not defined.
    at Reservations_dynamicMM_fla::MainTimeline/mouseDownHandler()
    here is my code

    import flash.net.URLRequest;
    import flash.net.URLLoader;
    import flash.events.Event;

    var content_req:URLRequest=new URLRequest("bikescript.txt");
    var content_ldr:URLLoader=new URLLoader(content_req);
    content_ldr.addEventListener(Event.COMPLETE, onComplete);
    function onComplete(event:Event):void
    {
    content_txt.htmlText = event.target.data;
    }
    input_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    function mouseDownHandler(event:MouseEvent):void {
    var myLoader:Loader=new Loader();
    myLoader.load(newURLRequest("inputMM.swf"));
    addChild(myLoader);

    I am a newb any help out there much appreciated have been hung up on this for too long!!!

  2. #2
    Senior Member
    Join Date
    Jul 2008
    Posts
    391
    Before
    PHP Code:
    myLoader.load(newURLRequest("inputMM.swf")); 
    After
    PHP Code:
    myLoader.load(new URLRequest("inputMM.swf")); 

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