Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can ActionScript work via an Imported Text File

Status
Not open for further replies.

Kirderf

Technical User
Oct 4, 2000
183
US
I got the html file to work from an imported text file. Now I need to open a new layer from a link from an imported text file.

The text will read like this:
"To open the file click here."

From an existing button I have the followin actionscript:
on (rollOver) {
request = 8;
}
on(release){
if (request < location) {
_global.direction = 0;
}else if(request > location){
_global.direction = 1;
}else if(request == location){
_global.direction = 2;
}
_level1.floor="login.swf"
_global.floorColor=0x6666CC;
location = 8;
elevatorDoor.gotoAndPlay("close");
}

Can I send this script through via a text file?

I'd gladly pay you on Thursday
for a hamburger today!
 
Don't quite understand what you want to do...

You want to set the above script in motion, through a kind of link type in a loaded text file?

If so the link could actually be a call to some asfunction (you can have several of these), but the asfunction has to be defined within the Flash movie itself.
 
yes, I want to set the script in motion through a loaded text file. How would I go about doing this?

I have looked for tutorials on this, but I might be getting into something that is not often used.

Would I need to create the above script inside an .as file and then call it from the text file?

I'd gladly pay you on Thursday
for a hamburger today!
 
An external .as file won't work at runtine. The .swf has to be compiled with the .as in authoring.
Why do you want to load a script and have it executed through a text file?
 

Here is the link of the site I am working on. I the Contact Us page is an example of one that is using imported text.
If you click on the "Client Login" page you will see what the text looks like in flash.

The company wants to keep the look consistant and be able to edit each page by changing text files.

The problem is that they want to jump from page to page from links inside the text and there is a lot of action script that changes the colors of the doors and which direction the door moves to go to the next floor.

Any suggestions would be great!



I'd gladly pay you on Thursday
for a hamburger today!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top