Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 19th, 2012, 08:01 PM
pudiki pudiki is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 1 pudiki User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 42 sec
Reputation Power: 0
ActionScript 3 - Automatically update dynamic text field in SWF

Just a word of warning I'm a designer so my knowledge of Action Script is extremely limited.

I was given the task to create an animation that will run on a TV in the foyer of our building. In this I have put a Welcome message and linked a text file to it so that we can include a visitor's name. e.g Welcome John Smith from Sony.

This all works well but what I need to know how to do is make the SWF file automatically refresh/update every so often so that if someone edits the linked text file we don't have to close the SWF and reopen it. It may not be the SWF that needs refreshing since it's not actually playing inside a browser window, it may be that the dynamic text field needs refreshing.

This is the code I have used for the dynamic text field (thanks to someone on the WWW for sharing it).

var loader:URLLoader = new URLLoader(new URLRequest("name.txt"));
loader.addEventListener(Event.COMPLETE, completeHandler);

function completeHandler(event:Event):void {
var loadedText:URLLoader = URLLoader(event.target);
name_txt_area.htmlText = loadedText.data;
}


Any help would be greatly appreciated.
Thanks
Rach

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > ActionScript 3 - Automatically update dynamic text field in SWF

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap