[F8] AS2 Load A Variable Via IP Address Link?
Hi All
I'm currently having a problem with loadVariables. Is it possible to load a variable in a text file into flash player via the IP address to the text file?
i.e.: loadVariables ("\172.17.62.5animation$FSCOMMANDkey.txt", this); The above code does not work
================================================== ============== What I'm trying to do: I have developed Flash projects for a client Company that are run via flash exe's. These projects sit on a network server. This company is now concerned about the security of these projects. If someone should copy the files off the server they should not play. I thought of a solution that has a text file on the server with a variable that is loaded into the player at runtime. The link to this txt should be absolute, so if the folder is copied off the server and taken off site the flash player will no longer be able to find the network folder with the text file.
Does this required php, asp etc? Or is there another way to load a variable into flash player from a IP addressed folder?
================================================== ==============
PATH on server: \172.17.62.5animation$FSCOMMAND
Txt file text is: &Keylock=786
The code in my flash file:
loadVariables ("key.txt", this); //load the Keylock variable into flash
trace(Keylock);//trace "786"
KeyDisplay=Keylock//Dynamic textbox to show 786 on screen
LockVar = parseInt(Keylock);//Set LockVar variable to Keylock value and convert 786 string to int
trace("Lock = "+LockVar); //
if (LockVar == 786) {//if statement checks value and sends the playhead accordingly gotoAndStop("Menu", 1); } else if (LockVar != 786) { gotoAndStop(20); }
Thanks for your time and assistance it is appreciated -Aslam
FlashKit > Flash Help > Flash ActionScript
Posted on: 08-08-2008, 08:24 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Load A Variable Via IP Address Link?
Hi All
I'm currently having a problem with loadVariables.
Is it possible to load a variable in a text file into flash player via the IP address to the text file?
i.e.: loadVariables ("\172.17.62.5animation$FSCOMMANDkey.txt", this);
The above code does not work
================================================== ==============
What I'm trying to do:
I have developed Flash projects for a client Company that are run via flash exe's.
These projects sit on a network server. This company is now concerned about the security of these projects.
If someone should copy the files off the server they should not play.
I thought of a solution that has a text file on the server with a variable that is loaded into the player at runtime. The link to this txt should be absolute, so if the folder is copied off the server and taken off site the flash player will no longer be able to find the network folder with the text file.
Does this required php, asp etc?
Or is there another way to load a variable into flash player from a IP addressed folder?
================================================== ==============
PATH on server:
\172.17.62.5animation$FSCOMMAND
Txt file text is:
&Keylock=786
The code in my flash file:
loadVariables ("key.txt", this); //load the Keylock variable into flash
trace(Keylock);//trace "786"
KeyDisplay=Keylock//Dynamic textbox to show 786 on screen
LockVar = parseInt(Keylock);//Set LockVar variable to Keylock value and convert 786 string to int
trace("Lock = "+LockVar);
//
if (LockVar == 786) {//if statement checks value and sends the playhead accordingly
gotoAndStop("Menu", 1);
} else if (LockVar != 786) {
gotoAndStop(20);
}
Thanks for your time and assistance it is appreciated
-Aslam
Link A Variable To Load A Movie?
hi,
at first sorry for my terrible English! Iam a german
here take a look:
set("_root.menu1.link1.theTitle", "Home");
set("_root.menu1.link2.theTitle", "Story");
set("_root.menu1.link3.theTitle", "Friends");
set("_root.menu1.link4.theTitle", "About Me");
set("_root.menu1.link5.theTitle", "2002 - 2004");
set("_root.menu2.link1.theTitle", "News");
set("_root.menu2.link2.theTitle", "Forum");
set("_root.menu2.link3.theTitle", "Mail Face");
Everything works, but how can i link a variable to a movie or to load a swf.data in a movie ???
help please!
mfg
Load Variables And Build A Button Link To A Php Page With Get Variable?
how to build a button link to a php page with get variable?
ok so i have a php script which writes the variables i need to a text file.
the textfile named pagefile.txt has the following.
var1=2
var2=0
(var 1 is the value for 'next page' and var2 is the value ofr 'previous page')
so heres what i want to do:
1) load the variables var1 and var 2 into my flash file from the text file.
2)my flash file is basically just a button.
when the user releases the button i want the page to go to mysite.php?page=[var1 value]
so onrelease getURL mysite.php and append ?page=[the value for var1; in this case 2]
it seems so simple, yet i have no idea how to accomplish this..
please help!!
thanks!
Can Link To A Web Address?
Hey
Is it possible to create a link to an outside email address?
I can't seem to find a way to do that.
Thanks!
nad
How To Link Email Address
Hi guys...I dont practice much in Flash and now I am trying to create a website.....
Can someone tell me how can I link an email address to a Name? I cannot figure that thing out...
thanks
Malik
How Do I Link To A E-mail Address?
I am new to flash. How do I link from a current button in a template to an e-mail address? Or just plain linking to an e-mail. Thanks for the help.
Using IP Address In Flash Link
Hello,
I designed a web page for a client with some Flash video and a few other pieces of Flash. Now the client is moving the one page website from a hosted server at Network Solutions to a server in-house.
Can I use the IP address in the absolute URL in order to play the Flash video which is a progressive download and also the other Flash pieces which are just a few buttons.
I have never had anyone ask me this before so I have no idea how it would work.
Thanks!!!
Email Address Link
Hi,
I wanna put an email address link in my flash site. When someone simply clicks on the address, i just want the default software to open (e.g. outlook etc.)
Cheers
[F8] How Do You Create An Email Address Link
How do you create an email address link in a movie clip so that when you click on it, it opens your email app. You see them all the time in blue and underlined. I've found the get URL mailto:abc@defghi.com, but that doesn't seem to produce the same result.
Thanks,
jc
Creating A Link To An E-mail Address
I added this to link:
ActionScript Code:
mailTo:lelasivan@go.com?subject=Some subject&body=Some text
but i would really like to pass some variables to this URL, how could i do that? i tryed replacing text with some variables but they appeared as if i wrote text, what to do? (is it possible or should i just make contact form for that?)
Simple Question About Email Address Link
I create a button so when user click on it, it suppose to send an email to the address.
This is the script that I use and I don't understand why it doesn't work.
on (release) {
getURL("mailto:creativecrossing@yahoo.com", "_blank");
}
Variable To Address A MC
This isn't working, please help...I think Flash is reading the variable cliptoplay)as a mc instancename...
this is the code in maintimeline:
var played;
var cliptoplay;
played = "no";
cliptoplay = "clip0";
This is the code on button one, will play clip1 after current clip (cliptoplay) finishes:
on (release) {
if (_root.cliptoplay == "clip1") {
continue;
} else if (_root.played == "yes") {
_root.cliptoplay.gotoAndPlay("end");
} else {
_root.clip1.gotoAndPlay("play");
}
}
whats the proper way to code a variable in a MC name?
Variable To Address A MC
This isn't working, please help...I think Flash is reading the variable cliptoplay)as a mc instancename...
this is the code in maintimeline:
var played;
var cliptoplay;
played = "no";
cliptoplay = "clip0";
This is the code on button one, will play clip1 after current clip (cliptoplay) finishes:
on (release) {
if (_root.cliptoplay == "clip1") {
continue;
} else if (_root.played == "yes") {
_root.cliptoplay.gotoAndPlay("end");
} else {
_root.clip1.gotoAndPlay("play");
}
}
whats the proper way to code a variable in a MC name?
Using A Variable To Address A GotoAndPlay
Back again,
I've done it before and I can't figure out how.
I have a variable called, address
that holds,
_root.mainscreen.fruittype.dropboxname
now that changes so I can't address the goto that simply
what I need is,
eg.
address .gotoAndStop(7)
Thanks
Casp
'grabbing' Variable From Address Bar...
Hi,
I want my flash movie to be able to look at the URL of a certain page and 'grab' a variable that is in there.
The variable sits at the end of the page address like:
www.MyURL.com/index.aspx?page=main&variable=1564
and the string I want the flash movie to recognise is &variable=1564
I can get my movie to recognise a string from a .txt file, but I can't work out how to get it look at the address bar to grab the info
Any help would be greatly appreciated
Thanks
How Can I Reference A Variable In A Url Address?
i have a variable called url
and one button which needs
getUrl (http://www.allways.com/my variable url
i have tried to reference this variable but with no success
any help would be appreciated
thanks Mat
Using A Variable Name To Address A Movie Clip
I'm stuck on how to refer to a movieclip's name through a variable.
If I set root variable "currentMovie = bigRed_mc;", how can I use that variable name to instruct the movie to address the movie clip name stored in said variable?
for instance "_root.currentMovie.gotoAndPlay("destroy");" wouldn't work because it would simply look for that movie clip name and come up empty.
I thought "_root[currentMovie]gotoAndPlay("destroy"); would work, with or without parenthesis, but it comes up with syntax errors either way. Can you use a variable to store and refer to a movie clip name and it's properties? If so, what is the proper syntax?
Thanks in advance for any help!
Variable Email Address In Form?
Anyone know how to extend Lee's PHP & Flash Form to recieve/send variables in the "$to =" area instead of this:
Code:
<?PHP
$to = "me@whatever.com";
$message .= "
Message: " . $_POST['theMessage'];
$sentOk = mail($to,$message,$headers);
echo "sentOk=" . $sentOk;
?>
i.e.
like this:
Code:
<?PHP
$to = $_POST['theNumber']['theService'];
$message .= "
Message: " . $_POST['theMessage'];
$sentOk = mail($to,$message,$headers);
echo "sentOk=" . $sentOk;
?>
View the test URL here: :arrow: http://getwebdesigner.com/textsend.html
It's pretty straightforward. I use variables for the Cell Phone SP's(theService) and the user enters the desired cell phone number(theNumber) to be text-messaged.
Pleas Help.
How Do You Dynamically Address A Movie Clip Via A Variable?
I am having great difficulty trying to figure out how to dynamically address a movie clip by using a variable name that contains the name of the movie clip.
Below is a portion of my code, it works ONLY if I HARDCODE the movie clip instance name into the "gotoAndPlay" line which will not work for my application:
var i:Number = 0;
var lotNum:Number;
var lotNumFlag:Number;
var propStatus:Number;
var currentLot:Number;
var clipPosition:String;
function getTheStatus_Result (re : ResultEvent)
{
lotNumFlag = re.result.items[0].Lot;
propStatus = re.result.items[0].Status;
currentLot = lotNumFlag;
if (propStatus == "active") {
clipPosition = "upGreen";
["Lot_mc"+currentLot].gotoAndPlay(clipPosition);
}
}
In the case above currentLot = 1
if i substitute the last line of the IF statement with:
Lot_mc1.gotoAndPlay(clipPosition);
it will work, but the "Lot_mc*" name must come from a variable, as it needs to be dynamically generated as there will be MANY different movie clips such at Lot_mc1 thru Lot_mc50. And this code is part of a loop that progresses through all of the movie clip names so they cannot be hardcoded..
Any help would be appreciated, I would think what I want to do here should be possible, somehow...?
Steve
GetURL Url Address Defined By Entered Variable
Can I use the getURL command like this?
var user:String;
>visitors enter a string into the user variable
>then
getURL (http://www.homepage.com/"whatevertheuservariableis".htm, _blank);
Open No Address/scroll Popup With A Passed Variable...
I was able to fix my login problem... but i am trying to open the window with no scroll bars or address bar
im having some issues with the proper script to pass the variables and load it in the featureless window
here is the code on the submit button...
Code:
on (release){
this.username = this.username.text;
this.password = this.password.text;
getURL("clients/redirect.php", "_blank", "POST");
}
can anyone help? i am at a COMPLETE loss
Load Variables From Address Bar
i founded out, there is a way to load vars from addressbar like ../movie.swf?user=fphilipe .
i don't know how it works but i know it works. ultrashock uses this in the main page:
<param name=movie value="homepage-new78.swf?initData=Hey+Fphilipe%2C+welcome+back+%21%21%21%0AYour+last+visit+was+on%0A2004-01-19+18%3A32">
does somebody knows how it works???
Load Variables From Address Bar
is there a way to load variables from the address bar?
i mean like "../flash.html?name=BlaBla&email=blabla@bla.com"
it shoulds appear in the flash movie inside the html in dynamicfields.
Load Variables From Address + Username Add
i am trying to make a login for my site and i have the save text files to my server and that takes what ever you put in as your username and save a txt file that is username.txt so if you put in steven as your username it would save steven.txt
Any way i have that working and i need a login but i cannot get it to look somewhere on my server and what ever is in username it will load up that file +".txt" can you help me get it looking in say /members/username add ".txt"
Absolute Address In Load Movie
sorry for the newbie question, using MX on mac 10.2.6
How do I do an absolute address. Say the file is "menu.swf", and the folder it is in is "source" and I am using the load movie command:
loadMovieNum("menu.swf", 5);
And the file that is loading it is "top.swf" and it resides just outside the "source" folder in the "all" folder.
all (folder)
top.swf
source (folder)
menu.swf
I just don't know what the correct labeling/mark would be ( / , _ " ) etc...
what would be the full load movie command for this example.
thanks in advance for this simple question.
Load Variables From What The User Types In Address Bar
Hi,
I was just surfing and suddenly I found this site... www.youaremyfriend.com
How this site function really surprised me and I really want to learn how I can do the same thing myself. I hope some of you help me
What the site does is that you can put your first and last name before the domain name in the address bar and the flash file will use your enterd first and last name in the playing animation! Try this... www.Jack.Smith.youaremyfriend.com
Have any idea how it works?
Hadi
Load Movie Based On Explorer Address?
Hi!
I've got a question for all of you FLASH-masters out there.
I'm currently working on a website, based on ASP and a database. It loads the content on the page from a database.
Now to the problem. I've got a flash menu/image viewer at the top of the page. ( ex. When I klick on "About" the menu/movie clip shows an "About" image). The problem is that the website is based on only ONE page (default.asp) So, whenever I klick on a link, let's say "About" the page reloads and the About page is shown, BUT! the flash menu/movie is reloaded and moves back to the start of the timeline ( In this case the "welcome" image).
My question is: Is there a way to tell what part of the movie clip to be shown based on the explorer address, or is there another way around this problem?
I don't want to use frames on my website because then the scroller is "miss placed".
I hope I have explaind my problem fairly well, so you all can understan what the h*ll I'm talking about.
Thank you!
HOW TO : Load Email Address From A .txt File For A Mailto Button
I have been trying to do this for a while and have fallen on my face.
I can't get my head around loadvars..... can't spot similar anywhere on the board, so here goes....
i wish to have a button which on release loads an email address from a text file, then sends using on(release); "mailto:email@email.com"
So that the recipient can be altered in a text file by changing the variable there, not in the flash file.
any ideas how i do that !?!
thanks very much for any hints in advance.... C
Load Variables Email Address From Text File Anyone?
I have the code below attached to a movieclip which i am attempting to use to call in an email address from a text file. The idea being that the textfile can be altered by a luddite, and the recipient email adress changed in the flash file.... but i'm not doing too well...!
The best i have achieved is undefined email or garbage.
all help greatfully received. thanks.
___________________________________
on (rollOver) {
this.gotoAndPlay(2);
}
on (release) {
loadText = function(){
loadText = new LoadVars();
loadText.load("email.txt");
loadText.onLoad = function() {
emailAddress = this.eAddress;
}
}
submit.onRelease = function(){
getURL("mailto:"+emailAddress);
}
}
on (rollout) {
this.gotoAndPlay(1);
Html Link To Load Swf Then Load Specific Xml File
Hi I'm still learning a lot to do with actionscript and not even sure if this can be done so this is a long shot!
I want to have a link in html to load an xml file in a swf - haha does that make sense??
Eg: The user to be able to click on the websites link on "http://crushdesign.co.uk/links.html"
Then that take them to "http://crushdesign.co.uk/portfolio.html" BUT in the Web section of the swf!
Thanks guys
Load Variable From Txt File To Load Movie From Server
my webserver has a dynamic ip adres
now i have a program that writes my ip adress to a static server.
my question:
load textfile and make the link for the swf complete
i think it should look something like this but i can't find it anywere
code:
loadVariablesNum("redirectphp/currentip.txt", 0);
this.gastenboek.loadMovie("http://"+ip+"/flash/Guestbook.swf");
the txt file is like:
&ip=90.128.82.20
the swf file is in flash 7
please help me
Using A Variable For A Link
Hi all,
A bit of a newbie question I'm afraid..
I have a ticker which I have managed to read the titles into a text field from the URL, and also display the link in another text box (so I knew it existed) but my problem now is using the variable as the link for the button.
Can anyone please point me in the right direction.
Many Thanks
Matt
Variable In A Link?
sorry if this is a rather easy question but I am having trouble finding my answer.
in flash i have links that take the user to different pages but i would like to include a variable in the link to take them to the proper spot.
I have the variables loaded in my flash movie, such as fu=bar and i can get it to display ok but i can't put it into my link.
on (release) {
getURL("http://linktootherplace/(how_do_I_put_a_variable_here???).html
}
Variable In Link
a quite simple question perhaps...
I have a movieclip and want it to be clickable:
Code:
on(release){
getUrl("");
}
now the problem is I want to link to portfolio.php?id=......my variable...
the variable already exists and with every picture changes...that'snot the problem...the problem is how to get the getUrl function to load it WITH the variable in it..like:
portfolio.php?id=1
the following:
Code:
on(release){
id_link="portfolio.php?id="+id_text;
getUrl(id_link);
}
does not work
the variable id_text is loaded as a frame-action in the same frame as the object is in but on another layer. it is a variable loaded from a xml file.. the value of it is alright but it just doesn;t seem to be working when there's an getUrl method
Using A Link To Set A Variable
the FSCommand tutorial just doesn't make sense to me without detailed examples (i'm new to actionscript/flash). If someone could point me in a good direction or help to explain this to me I'd appreciate it.
I have a text box that dynamically loads user names and displays them like a list. I want the user to be able to click on one of these user names and have it alter one of the variables in the same flash movie, which will display alternate contents in another dynamic text field.
For example, they click on the username, and the other text field will display "You have chosen John".
to populate the users text field I have a PHP file called users, that sets a variable called users, and it populates it based off of what it retrieves from the database. This all works fine, but how the heck do I get those names to becomes links which will set the variable "person" for the other text field?
I tried this for my links
Code:
&users=<a href="javascript:;" onClick="setvar('mymovie.swf','&person=John')">the text link</a>
I also tried that without the double quotes, only used single quotes and it didn't work. I also used %26 instead of & before person and that didn't make a difference.
and then this in the html document that has the Flash movie in it
Code:
<SCRIPT LANGUAGE="JavaScript">
<!--
//make sure the movie is loaded first then tells the movie what page its on
var movie_ready = "false";
function setvar(yourmovie,thevariable)
{
if(eval('yourmovie').PercentLoaded() == 100)
{
eval('yourmovie').SetVariable("users", thevariable);
movie_ready = "true";
}
}
//-->
</SCRIPT>
When I do this, my users list text box will display nothing at all, when I take this code out and put my strictly HTML link code back in, it works fine. Will the text box not recognize the onClick and then stops processing the code or?
help and ideas would be appreciated
thanks
How To Use A Variable As A Link
Hi there!
I spent the whole morning to figure out, how I can use a variable as a hyperlink in Flash.
The variable itself is added to Flash as an URL-praramter. I know that Flash gets the variable, because I can show its content in a dynamic textfield.
My first thought was something like this:
Code:
on (release) {
getURL(my_var);
}
But that doesn't work...
Thanks for your help in advance!
Greetings
LapisInfernalis
Variable In A Link?
Here's my actionscript so far
HTML Code:
_txt.text = id;
when i put in a link i did this:
http://mylink.com/somefolder/_txt
it's not working.
what do i need to do to get the variable in the link. if that made sense?
Using A Variable In A Link
How do I use a variable in a link of a geturl? I want to loadmovienum(flash/folder2/+variable+".swf")
I hope you got the idea.
Load Variable/load Movie Jpg Question
I'm trying to load a path and a jpg file name from an external file and then apply it to a variable. Then using the LOADMOVIE action I want to use the variable as an expression to load the JPG into a particular movie.
My action script is as follows:
onClipEvent (load) {
loadVariablesNum("sniffer.txt", 0);
}
Sniffer.txt reads
link1=home1.jpg
I then have:
loadMovie(link1, "1");
on frame 2.
The weird thing is that it works in the Debugger but not when I publish it as a SWF or HTML.
Any ideas?
Walt
Link Variable Problem
hi me again
it's a flash 4 script
the link is as follows:
Set Variable: "text1" = "Brainstorm"
Set Variable: "link1" = "www.bitcc.com/internet.html"
and then the link opens in a new window.
I'm working with 2 html frame pages.
"left",wich contains the fla, and "main" in wich I want the link to open in.
what I want to know is:
how do I do this?
what scrip can I use?
I just want the link to open in in the "main" html frame
I'd appreciate any help I can get on this one!!!
thanx
I Have A Menu With Set Variable, But How Can I Link These Var...?
hi,
at first sorry for my terrible English! Iam a german
here take a look:
set("_root.menu1.link1.theTitle", "Home");
set("_root.menu1.link2.theTitle", "Story");
set("_root.menu1.link3.theTitle", "Friends");
set("_root.menu1.link4.theTitle", "About Me");
set("_root.menu1.link5.theTitle", "2002 - 2004");
set("_root.menu2.link1.theTitle", "News");
set("_root.menu2.link2.theTitle", "Forum");
set("_root.menu2.link3.theTitle", "Mail Face");
Everything works, but how can i link a variable to a movie or to load a swf.data in a movie ???
help please!
mfg
Variable To Link On Button?
OK I have a movie clip with two text fields and a button that dynamically duplicates and then is filled with data (house1, house2, house3, etc.) is there a way to take a variable like "url1=http://ivanmayes.com" and attach it to a GetURL on the button on release?
Variable To Link On Button?
OK I have a movie clip with two text fields and a button that dynamically duplicates and then is filled with data (house1, house2, house3, etc.) is there a way to take a variable like "url1=http://ivanmayes.com" and attach it to a GetURL on the button on release?
|