Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-17-2006, 06:23 AM   #1
Registered User
Join Date: Feb 2006
Location: Someplace very flat that's only about 600ft. above sea level.
Posts: 3
Send a message via AIM to Tactical_Snake
Default problems loading external data

I've got two problems.. Please bear with me as it's kind of my first time using flash... ^.^;
1. I need to load some text from an external txt file, but it doesn't seem to work quite right.
In a test (this is for a project, and since it's inundated with things I've been using test files before trying code in the main file), I've set up a dynamic text box, multiline, named it 'vampinfo'. Then I wrote this action script, put it on the stage, and it says this:
loadVariables("vamp_info.txt", vampinfo, "GET");
Obviously supposed to read in info from the file 'vamp_info.txt'.
I also set the text box to have a black border.
When I test the movie, the black border flashes quickly, but no text ever shows up, and the output gives me this:
Error opening URL "file:///G|/vamp_info.txt?my%5Fmcl=%5Bobject+Object%5D"
each time it loops the movie. I'm not sure if it's having problems because of code, or if it's having problems reading from my flash drive. It's a small movie, so I haven't had to send it to the desktop to work from it, like the main project. But then again, it didn't work when altered for the project and that was all on the main drive...
On the other hand, might it be because i haven't figured out how to pull out the information...? I mean, in the next example for this, since it's a movie clip, it's got lines like these: artist = artistdatamc.artist1
since the text file has lines like &artist1=Yaddda Yadda Yadda. The Vamp. text has a &name= lsjfldskj line...
Also, if a file is in another folder, how do you write the path for that...? ^.^;;; (deeply embarrassed) The project has most of the text files ordered into different folders for organisation, so... (the files referenced so far are all in the root, of course. :P But for later...)

Oh, also, we (it's a group project) asked another professor for help, and while she suggested using this:
_root.createEmptyMovieClip("artistdatamc", _root.getNextHighestDepth());
loadVariables("data2.txt", artistdatamc);

artist = artistdatamc.artist1
artist = artistdatamc.artist2
artist = artistdatamc.artist3
artist = artistdatamc.artist4

But that hasn't worked in the main project, either.

2. The other item I'm having trouble with is getting an external swf to load into a movie clip. There will be a little scrolling line of thumbnails, but they're different based on which section you're in, so yeah.
We tried this, but of course, it didn't seem to do anything:
createClassObject(mx.controls.Loader, "loader", 5);
loader.contentPath = "screenslider_interactive.swf";

Thanks in advance, and sorry for these probably being pretty elementary, or something. Just got stuck being 'lead programmer' for the group before they decided what language to use... ^.^;;;
Tactical_Snake is offline   Reply With Quote
Old 03-17-2006, 08:27 AM   #2
Join Date: Mar 2005
Posts: 66
Default hi

Here is an earlier post showing how to load your data from a text files using LoadVars();


Hope it helps

Also please make sure you end each var pair in the text file with &

i.e text file containing URL to external swf or text file


hope it helps

Vikana 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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
External data problems on upload diz ActionScript 2.0 0 05-08-2005 03:52 PM
loading external images into array geminity ActionScript 2.0 0 02-14-2005 06:27 PM
Problems loading an external swf into mc. Please help! kidfixit ActionScript 1.0 (and below) 4 01-24-2005 05:15 PM
Tricky problem with loading external swf into targetted Movie Clip asWarrior ActionScript 2.0 1 06-20-2004 02:14 PM
Loading external data into an external swf donstylez ActionScript 1.0 (and below) 0 03-13-2003 11:54 PM

All times are GMT. The time now is 09:29 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, 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.