Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-03-2010, 01:54 PM   #1
Registered User
Join Date: Oct 2010
Posts: 3
Default Load an External Php variable into Actionscript in flex.


i have being trying to load an external variable from a php file into my actionscript.I am using flex and i have tried lot of examples listed on google,i have gone through all the tutorials,codes..etc..all of them were made using cs3 or cs4.And when i ran them i dint get any output at all.Either i got that loader wasnt defined or nothing in my textarea.

if possible please guide me on the following or kindly give a small sample that works on flex3.i am also not sure of what i shud write in my php file.

i have added the code of my mxml file for this which is not working and shows me a blank textarea.

Any help would be appreciated..thanks in advance

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="httx://xxx.adobe.com/2006/mxml" xmlns:custom="test.external.*" layout="absolute" initialize="load()">
private function load() : void { 
  var loader:URLLoader = new URLLoader(); 
  loader.addEventListener(Event.COMPLETE, onComplete); 
  loader.load(new URLRequest("C:\apache2triad\htdocs\flexu\external.txt"));  
private function onComplete(e:Event):void { 
  ext.text = URLLoader(e.target).data;  

<mx:TextArea id="ext" x="296" y="199" >

<mx:Button click="load()" x="343.5" y="274">

Last edited by dino_reborn; 10-03-2010 at 01:58 PM.
dino_reborn is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 10:37 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.