Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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 December 5th, 2003, 11:56 PM
squallm1 squallm1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Mexico City
Posts: 17 squallm1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 48 m 12 sec
Reputation Power: 0
loadVariables

Hi!

Sorry about this basic question, I'm new with Action Script.

I made a txt file and a basic movie in flash with dynamic text.

It works without problems, but if I want to put the dynamic text inside a symbol, it doesn't read the variable.

I think it is because the target, so I tried to put _root, 0, 1, 2 and 3 but doesn't work, the action is in the first layer and the first frame:

loadVariables("message.txt", _root);

I'm using MX 2004

Thanks a lot for your help.

Miguel Mendez
Mexico City

Reply With Quote
  #2  
Old December 6th, 2003, 12:39 AM
mg8's Avatar
mg8 mg8 is offline
SAWEET
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: New York
Posts: 128 mg8 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 31 m 40 sec
Reputation Power: 5
Send a message via AIM to mg8 Send a message via MSN to mg8
Isn't there a tutorial on how to do this exactly?

I believe so because I did it too ;\

Reply With Quote
  #3  
Old December 6th, 2003, 01:34 AM
jmichels's Avatar
jmichels jmichels is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Orlando, FL
Posts: 177 jmichels User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 18 m 12 sec
Reputation Power: 6
If the dynamic text field is located within a clip with an instance name like "clip" and the text field had a variable name like "field" the text file would read:

&_root.clip.field=Your text goes here.

The scripting in Flash would look like this:

loadVariablesNum("message.txt", 0);
Attached Files
File Type: zip load_variables.zip (3.7 KB, 275 views)

Reply With Quote
  #4  
Old December 6th, 2003, 01:45 PM
squallm1 squallm1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Mexico City
Posts: 17 squallm1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 48 m 12 sec
Reputation Power: 0
loadVariables2

Thanks a lot for your answer jmichels, it works, but if I make a new symbol and put in the original symbol it doesn't work anymore, I can't understand the logic of where goes the action script and the text of the txt file, please help!!
Attached Files
File Type: zip archive.zip (3.8 KB, 273 views)

Reply With Quote
  #5  
Old December 6th, 2003, 04:50 PM
jmichels's Avatar
jmichels jmichels is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Orlando, FL
Posts: 177 jmichels User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 18 m 12 sec
Reputation Power: 6
My pleasure. I've attached a new file below. When I swapped and modified some of your symbols, it worked inside the extra clip. The actionscripting always goes in a layer above the text field. The text that you will be using always follows the equal sign in the text file. You can always use html as well.
Attached Files
File Type: zip load_variables2.zip (4.6 KB, 310 views)

Reply With Quote
  #6  
Old December 7th, 2003, 11:01 PM
squallm1 squallm1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Mexico City
Posts: 17 squallm1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 48 m 12 sec
Reputation Power: 0
Talking Thanks a lot!

Thanks a lot jmichels! Now I understand how it works.

Reply With Quote
  #7  
Old December 7th, 2003, 11:27 PM
jmichels's Avatar
jmichels jmichels is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Orlando, FL
Posts: 177 jmichels User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 18 m 12 sec
Reputation Power: 6
My pleasure squallm1. Glad to have helped.

Last edited by jmichels : December 8th, 2003 at 02:17 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > loadVariables


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT