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 February 10th, 2004, 12:59 AM
paulc218 paulc218 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 32 paulc218 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
loading variables from an external file

Hello, I am trying to create a swf file that will load dynamic text from an external txt file. I can do this fine when I use a button, but I want the variables to load automatically when the movie loads. I am creating flash banners that I can edit with a php script. the script will create the text file and then the banner is customized by using the external file. I haven't be able to load the variables automatically yet, so I haven't worried about the php yet. Is this possible?

http://open-a-business.com/index.html

Reply With Quote
  #2  
Old February 10th, 2004, 01:24 AM
stage_watchman's Avatar
stage_watchman stage_watchman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: europe
Posts: 274 stage_watchman Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 20 h 51 m 55 sec
Reputation Power: 0
its easy, to load ext. files into a flash file, you should be able to do it with flash5,
check www.falshkit.com for more this type applications.
hope this helps
-stagy

Reply With Quote
  #3  
Old February 10th, 2004, 01:37 AM
paulc218 paulc218 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 32 paulc218 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Do you know how to do it? Or do you know a direct link to an article because I can't find one. I know how to load an external file if I use a button, but I need to load it without a button. Event handlers do not work without using a button, onclip event doesn't work without a movie clip. I just need the external to load in the first frame without any action taken by the user.

Reply With Quote
  #4  
Old February 10th, 2004, 06:23 AM
Kryo's Avatar
Kryo Kryo is offline
WOO!!! I'm a member!!!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Uk
Posts: 95 Kryo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 10 m 49 sec
Reputation Power: 5
Send a message via ICQ to Kryo Send a message via MSN to Kryo Send a message via Yahoo to Kryo
In the banner create a dynamic text field and label the instance (or Variable) to output. In the first frame of the _root movie use...

loadVariablesNum ("bannertxt.txt", 0);

now in the text file you want to read from makesure you put at the top...

output=THEN THE TEXT YOU WANT TO READ HERE

and that should do it...

Dynamic Text Banner

Last edited by Kryo : February 10th, 2004 at 06:37 AM.

Reply With Quote
  #5  
Old February 10th, 2004, 10:26 AM
paulc218 paulc218 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 32 paulc218 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
yes that works. I was not listing the variable as an instance, I was only labeling in the "var" field. Works great now, thank you so much.

Reply With Quote
  #6  
Old February 10th, 2004, 10:35 AM
paulc218 paulc218 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 32 paulc218 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
one more question...
now that i have added it to a real banner which uses the text with a motion tween, instead of it using the text in the file, it says: "_level10.instance10.t"

Do you know why?

I am using a mask layer about the text layer, and the text field is a movie clip. Thanks again.

Reply With Quote
  #7  
Old February 10th, 2004, 11:02 AM
Kryo's Avatar
Kryo Kryo is offline
WOO!!! I'm a member!!!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Uk
Posts: 95 Kryo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 10 m 49 sec
Reputation Power: 5
Send a message via ICQ to Kryo Send a message via MSN to Kryo Send a message via Yahoo to Kryo
would it be possible for me to see the .fla file? maybe i can help from that...

Reply With Quote
  #8  
Old February 10th, 2004, 05:36 PM
paulc218 paulc218 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 32 paulc218 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
sure. http://open-a-business.com/flazip.zip

Thats the first time I have ever zipped anything myself, so let me know if it works.

Reply With Quote
  #9  
Old February 10th, 2004, 06:29 PM
Kryo's Avatar
Kryo Kryo is offline
WOO!!! I'm a member!!!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Uk
Posts: 95 Kryo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 10 m 49 sec
Reputation Power: 5
Send a message via ICQ to Kryo Send a message via MSN to Kryo Send a message via Yahoo to Kryo
I believe I've found a small workaround...

The movie is having a problem with the Masked layer, I've removed that and added an instance name to the text1 movieclip.
Also added a target to the loadVariablesNum...

Hope this helps...

Reply With Quote
  #10  
Old February 11th, 2004, 10:30 AM
paulc218 paulc218 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 32 paulc218 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
so I can't use a masked layer when trying to input from a text file? Or do I just need to continue researching how to do it?

Thanks again

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > loading variables from an external file


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 2 hosted by Hostway
Stay green...Green IT