Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flash General Questions > Other Flash General Questions

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-04-2005, 08:03 PM   #1
jonald
Registered User
 
Join Date: Aug 2005
Posts: 4
Default control URL through an external file

I have a button within a .swf that when clicked, opens a new browser window and goes to a new URL. I would like to be able to control the URL through a seperate external file. My goal is to not have to re-export my .swf if I need to update the URL the button is linking to. Any advice or thoughts would be greatly appreciated. Thanks.
jonald is offline   Reply With Quote
Old 08-05-2005, 04:09 PM   #2
patmanwb
Registered User
 
Join Date: Jul 2003
Location: California
Posts: 85
Default

You could load the URL into the Flash movie in the Flashvars property of the embed tag. This way you would just need to update your html or in the case of having some middleware you could update it with a database.

There are lots of examples of how to do this on this site and also I think in the help that is included with MX.

If you have further questions let me know and I can set you up with a quick and dirty example.
patmanwb is offline   Reply With Quote
Old 08-05-2005, 07:31 PM   #3
patmanwb
Registered User
 
Join Date: Jul 2003
Location: California
Posts: 85
Default

Jonald,

Please post your PM question in the forum so that everyone can share in the benefit of the answer.

Thanks!
patmanwb is offline   Reply With Quote
Old 08-05-2005, 11:39 PM   #4
jonald
Registered User
 
Join Date: Aug 2005
Posts: 4
Default sorry about that - I'm a bit new to forums

Thanks for your help. I really appreciate you take the time to help. I am still a little confused though.


I thought you would use a text file. Something like:

ActionScript Code:
var link = "http://www.google.com"


and then do something in the fla like:

ActionScript Code:
loadVariablesNum("text.txt"); button.onRelease = function() {      getURL(link, "_self"); }


Is this way off? Overall I am a little confused about how you create, load and then use the variable. When I define the variable in the fla, it seems to work well. But when I try the external file, things fall apart.

Thanks again.
jonald is offline   Reply With Quote
Reply


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


All times are GMT. The time now is 07:43 AM.

///
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.