Results 1 to 2 of 2
Thread: help PLZ... Action Script
Hybrid View
-
August 1st, 2010, 01:51 AM #12Registered User
posts
Problem: 1120: Access of undefined property loader.
hey guys im new to this forum. also new to flex 3.
i have basic knowledge about flex.. still a beginner (just started learning from past few days)
i am getting this error very often.This might be a silly mistake, but still im not able to recognize whats the mistake.. PLZ any one help me...
The commented lines are place where i am getting errors:Code:<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ var loader:URLLoader = new URLLoader(); //loader.load(new URLRequest("external.txt")); //loader.addEventListener(Event.COMPLETE, onComplete); function onComplete(event:Event):void { external_txt.text = event.target.data; } ]]> </mx:Script> <mx:TextArea x="148" y="34" height="110" id="external_txt"/> </mx:Application>
on line //loader.load(new URLRequest("external.txt")); i get error as follows
1120: Access of undefined property loader.
online //loader.addEventListener(Event.COMPLETE, onComplete); i get following two errors,
1120: Access of undefined property loader.
1120: Access of undefined property onComplete.
so whats the problem here..?
URGENT PLZ..!!Last edited by cvinayc; August 1st, 2010 at 06:50 AM.
-
August 3rd, 2010, 04:50 AM #2
I think you'll need to give it another name... such as myLoader:URLLoader = new URLLoader();
and second, you'll need to import flash.net.URLLoader (or whatever Flex's equivalent is)AS2 / AS3 / JS / JQUERY / (X)HTML / HTML5 / CSS / CSS3 / PHP

Reply With Quote


Bookmarks