How Do I Get The Http Address?
i am trying to get a flash ".swf" file to set a variable for the url that the file is embedded on. i know there has to be a way! I am using the " this._url; " to get the url, but all it gives me is the url to that swf file. I want the entire page's address to be my variable, not the swf url. I am trying to send that variable over to a php page to write it to mysql, but i can't get it to give me the right variable. lvOut.address = this._url; //this sends the variable to php it does send the variable, but the variable is not the full url to the page it is loaded on, it is the url to the flash file Please help! I would like example codes, not other sites or posts! Thanks!!!! Tim
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 11-09-2005, 01:52 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How Do I Get The Http Address?
i am trying to get a flash ".swf" file to set a variable for the url that the file is embedded on. i know there has to be a way! I am using the " this._url; " to get the url, but all it gives me is the url to that swf file. I want the entire page's address to be my variable, not the swf url. I am trying to send that variable over to a php page to write it to mysql, but i can't get it to give me the right variable.
lvOut.address = this._url; //this sends the variable to php
it does send the variable, but the variable is not the full url to the page it is loaded on, it is the url to the flash file
Please help!
I would like example codes, not other sites or posts! Thanks!!!!
Getting A Current HTTP Address
I'm sure this a common Actionscript method, but my websearch on how to do this is turning up no results.
Using MX 2004 I am trying to get the current value of the web address in which the swf is residing and have actions take place based on the HTTP locations.
ie;
var a:String = this.HTTPaddress;
var b:String = this.HTTPaddress;
(have certain actions take place based on above vars.)
Thanks for all your help!
HTTP Status 404 Http://localhost:8080/flashservices/index.html
Why if I type "http://localhost:8080/flashremoting/gateway" (flashremoting is the context root)in the address bar, I will get a HTTP Status 404 error: The requested resource (/flashservices/index.html) is not available.
If every thing is ok, it should show a blank page, right?
Thanks
By the way, if I set gateWayUrl to "http://localhost:8080/flashremoting/gateway", I will get an error of "flashgateway.adapter.NoSuchServiceException: No service named flashremoting is known to Flash Remoting MX."
if I set it to "http://localhost:8080/flashremoting/", I will get an error of "NetConnection.call.BadVersion"!
I am quite confused now, can anyone help me out?
I am using flash mx 2004 pro, flash remoting mx with components installed. And tomcat 5.0
[F8] Links In Single Swf To Http:// Http://www And Https://
Hey everyone, I have an swf with several links to "http://www.infiniteguitar.com/blahblah.php". You can see the swf on the top left of the site here: http://www.infiniteguitar.com/ where it says "Lesson Links".
My problem, is that the links only work when the address bar in the browser specifically says "http://www.blahblah" with the "www". However, if I used the following URLs, the links don't load:
http://infiniteguitar.com
https://www.infiniteguitar.com
Is there something I have to do in the actionscript to make the links load no matter what the beginning of the URL says. I'd like the links to work on secure pages as well as when the "www" is not present in the URL.
Thanks for any help!
GetURL Works In Http://www.site.com But Not In Http://site.com
I'm using a getURL function to pass some querystring parameters which changes what content is displayed on the page. The function works correctly on the address 'http://www.site.com', but for 'http://site.com' there's no action at all aside from the cursor change. The two addresses are pointing to the same files. The function is as follows:
Attach Code
this.onRelease = function() {
getURL("http://www.site.com/Default.aspx?Region=1", "_self");
};
Loadmovie --- Http://www.mysite.com ::: Http://mysite.com
Ok, I'm aware that when using loadmovie and embedding your main Flash movie into HTML, absolute URLs are best used.
Does anyone know why they only work with the http://www prefix rather than http:// ?
Or more importantly, anyone know how I can get round it?
Here's a couple of examples:
http://www.telekin.co.uk/outback/
http://telekin.co.uk/outback/
Click on one of the 3 boxes in both instances and you'll see what I mean.
I've tried searching but got nowhere. Anyone else had this problem?
Thanks in advance!
Http://www.domain = OK Http://domain = ERROR?
I have a page that if the URL path in the browser is http://www.domain the page works fine but if the path is http://domain I get that message informaing me that a script is causing it to run slowly and to disable running the script. I really don't understand how to troubleshoot this as it is the exact same page either way. I dont really understand why that can cause flash to malfunction?
Any ideas?
Thanks.
Address Bar.
Hey,
I'm trying to make an address bar like that of the one in internet explorer, so that when you type in an address it's displayed, for example if the user enters 'www.mypage.com', then it should take the person to that website.
Thank you.
!phara0h
Ip Address
hello,
is it possible to get the users ip address by just using actionScript?
if there is what is the code?
if there isn't how else could i get the users ip?
thanks,
elo
http://www.transporter.at
Sub Address
hi, i have a flash website and want to upload another flash page to the site, but have it located at another sub address. so lets say the main website is at "website.com", i want to upload something to website.com/animation.
i want to be able to access website.com/animation directly, without going to website.com first.
how do i publish this?
thanks for any help, i probably should post this on the newbie board. but i'm not a newbie, i'm just dumb.
thanks
mc
IP Address
Can you grab a client's IP address through flash a flash movie?
Is It Possible To Know What URL Address You Are On?
Pardon my ignorance, but is there a way to find out what URL the page is on? or am I missing a fundamental stop(); and something else?
I have a menu that I use in my htm documents for a web site to navigate through it. When a page is selected, an animation is played and it graphically indicates the new page being viewed.
The problem I have is that as soon as the page loads, the movie plays from the begining as the swf gets loaded again. I have tried a stop(); at the first frame, but then the movie doesn't go to the frame where it is supposed to graphically indicate what page the user is on.
My tought is that if I can somehow read the URL I am on, then on my first page I can do some if statements to take me to the frame for each particular page so the user has the right graphical display.
Your help is much appreciated.
Is There A Way I Could Get The IP Address....
Hi you all!!!
Is there a way to get the IP Address (from within the movie) of the machine the Flash Movie is playing on?
Here's the scenario: I have multiple Flash Movies playing on remote machines, and each one has to validate against a SocketServer I have running on the Server from which the movies where downloaded from. Now the validation "UserName" has to be the IP Address.
I need to send this IP to the SocketServer so it (The Server) can look up each machine on a DB.
As always, I'll appreciate any help.
Thanks,
Francisco
Getting An IP Address
Does anyone know if you can snag an IP address in flash. Would like to be able to restrict only certain IP addresses from being able to get into my swf file. Any help would be greatly appreciated.
IP Address
I was wondering if anybody can help,
I have only just started using flash/dreamweaver....... I have made up a contact form in flash that posts to a CGI script. On the form itself I want to display the users IP address, this is to stop people abusing the form.
I have no problem using something like shtml to get the ip but I do not know how to pass that variable into flash or if there is an easier way just using action script itself
Thanks for the help in advance
Grimmis
Ip Address
i want to know the ip address of users who have entered my website
Ip Address
i want to know information about the visitors who entered my site like their
ip addres and their dns name and when they entered the site
Mx: Getting Address Url
If I have an swf [nav bar]say on www.site.com/games
is there a way I can read the address and have a text field display games, then if I had the the swf nav bar on the index page, make the text field display home?
I dont mean by using _swf, becuase that only gives the address of where the swf file was downloaded.
How Do I Get The Url Address?
this is probably a very simple one:
i have a simple SWF in an html page.
this html page can get a query (index.html?some=thing )
in my swf i need to get the whole url and then forward the query to another url.
how?
Get IP Address
Probably silly Q here but am going to ahead and ask. I basically need a way to obtain IP address in flash. What I have so far;;
In PHP:
<?
$ip = getenv('REMOTE_ADDR'); //~ get ip address
$ip = "&ip=".$ip."&"; //~ make it a flashable variable
echo $ip; //~ spit it out
?>
In FLA with dynamic text box named "myTextBox" and on the first frame- the actionscript is:
myLoadVars = new LoadVars();
myLoadVars.specificvariable = "Value";
myLoadVars.sendAndLoad("http://www.mysite.com/ip.php", this, "GET");
myLoadVars.onLoad = function() {
myTextBox.text = this.ip;
};
Now it's not working. Can anyone help me out to get this fixed? Thanks!
Get MAC Address
Hello folks,
I was wondering if there is any way to retrieve the MAC address of the client using AS?
Thanks
Swf Address
the sample code that swf address comes like this:
but as you can see, in the line below it uses timeline to switch pages
gotoAndStop('$/error/');
my question is what can i replace gotoAndStop with so i can build the pages dynamically
thanks
ActionScript Code:
// Custom utilities
function replace(str, find, replace) {
return str.split(find).join(replace);
}
function toTitleCase(str) {
return str.substr(0,1).toUpperCase() + str.substr(1);
}
function formatTitle(title) {
return 'SWFAddress Website' + (title != '/' ? ' / ' + toTitleCase(replace(title.substr(1, title.length - 2), '/', ' / ')) : '');
}
// SWFAddress actions
function btnClick(e:MouseEvent) {
SWFAddress.setValue(e.target.deepLink);
}
function btnRollOver(e:MouseEvent) {
SWFAddress.setStatus(e.target.deepLink);
}
function btnRollOut(e:MouseEvent) {
SWFAddress.resetStatus();
}
// SWFAddress handling
function handleSWFAddress(e:SWFAddressEvent) {
try {
if (currentFrame == 2 && e.value == '/') {
play();
} else {
gotoAndStop('$' + e.value);
}
SWFAddress.setTitle(formatTitle(e.value));
} catch(err) {
gotoAndStop('$/error/');
}
}
SWFAddress.addEventListener(SWFAddressEvent.CHANGE, handleSWFAddress);
stop();
SWF To Run Only On Specified IP Address
I'm designing and hosting Flash sites on my dedicated server.
Is there a way (script) for me to ensure that the SWFs only run if they are hosted on my server (IP Address)?
URL Address?
How do i know my application URL address??? Does it suppose to be like this...
http://localhosti forgot the port no.)/xxxxxxxx(where file/application existed)???
For your all acknowledgement, i'm installing flash comm sever under Developer Installation Mode and under Win XP OS, not under Window Server or any other web server... so am i suppose to have web server like apache or Window Server just to have the URL address??? am i wrong???
IP Address
I just added an option to send a text message to my cellphone on my site... I wanted to know if there's a way to get a users IP address using ActionScript, so that I can get it in case someone decides to stalk me...
Raf
Help With Mc Address
i need to include a text that is in a external file (txt). I can call him from the _root, but when i try to do the load from one movieClip it doesn't work.
this is the code that i put in the button:
on (release) {
loadText = new LoadVars();
loadText.load("data.txt");
loadText.onLoad = function() {
texto.text = this.historia;
location.text = this.location;
};
}
thanks in advanced!
Get URL From Address Bar
How can I have actionscript read the URL that is in the address bar?
I have an if statement that needs to compare the url in browser to a variable.
Code:
if(!pagesURL! == aLink) {
this.onpagebg._visible = true;
} else {
this.onpagebg._visible = false;
}
Ip Address
Anyone has any tips or has done displaying ip address in flash?
i just need to display in a simple flash page the ip address or location of the person who is viewing this file?
thanks.
SWF Address
I need to use this one a site I am working on, unfortunately the documentation isn't very good and I can't find anything else...
has anyone used this that can give me a quick run down?
Thanks!!
Help With Mc Address
i need to include a text that is in a external file (txt). I can call him from the _root, but when i try to do the load from one movieClip it doesn't work.
this is the code that i put in the button:
on (release) {
loadText = new LoadVars();
loadText.load("data.txt");
loadText.onLoad = function() {
texto.text = this.historia;
location.text = this.location;
};
}
thanks in advanced!
How To Address An Mc In A Different Swf?
Starting my mother.swf the movieclip mc_picture is loaded as well. Also a special button.swf is loaded into a level.
Pushing a button in this button.swf loads grandchild.swf. And when reaching frame 10 of this grandchild.swf I want the MC, namely the mc_picture to go to alpha=50.
I placed the actionscript on the keyframe in the timeline.
_root.mc_picture._alpha=10;
I also used the "new name" 'mcp' for the mc_picture,
(as I had loaded it with:
_root.attachMovie('mc_picture','mcp',3);
_root.he1._x=400.3
_root.he1._y=275.1
What do I do to address my mc_picture so that it will obey?
Thanks for helping,
Aribert
IP Address
Hi
I was searching the web about IP address and found this:
http://www.flash-db.com/remoting/?se...tion/Geography (I don't know if there is a better one or not)
You see, in any page that this swf is on, we can have the users IP address but what about saving IP addresses??!!
this technology dosen't worth if we can't save the IP addresses...
Plese tell me if there is a way to save the IP addresses or if possible give me a better link about this issue that can save the IP addresses too
Regards,
Ali
Ip Address
I have come across a few sites that show my I.P address listed on their page. Would anyone know where would I be able to find a tut on how to do the same for my site?
IP Address
Is there anyway that flash can actually get the IP address of the user as a text string? or in any shape or form
Z
Swf Address
How to use it? Or can anyone point me to a good links or documentation thanks.
Http: // Oh My God
I've got this actionscript on the send button of a flash form mailer. I sourced the mailer from the flashkit fla library.//
on (release) {
loadVariablesNum ("mail.php", 0, "POST");
-----------------------------------------------------------------------
It then calls this php file...//
<?php
$TextVariable = '&results=';
$response = 'your message has been delivered.';
echo $TextVariable;
echo $response;
mail ("scottclarkuk@hotmail.com", "mail from site", "
your message has been delivered.:
name: $fullname
email: $address
user comments:
$query
Sent From : $REMOTE_ADDR
");
?>
This works on some systems and I've had mail come thru from other systems BUT on others the following is displayed in a new browser window...//
HTTP Error 405
405 Method Not Allowed
The method specified in the Request Line is not allowed for the resource identified by the request. Please ensure that you have the proper MIME type set up for the resource you are requesting.
Please contact the server's administrator if this problem persists.
HELP!!HELP!!HELP!!HELP!!HELP!!HELP!!HELP!!HELP!!HE LP!!HELP!!HELP!!HELP!!HELP!!HELP!!HELP!!HELP!!HELP !!HELP!!HELP!!HELP!!HELP!!HELP!!HELP!!HELP!!HELP!! HELP!!HELP!!HELP!!HELP!!HELP!!
What does this error message refer to and how can I resolve it? It seems to me that the problem doesn't lie in the actionscript or the php, as it has been working for some systems. So.....
Thanks for taking the time to read this
Scott
How Is This Possible?http://www.kff.com/
plz someone tell me how can i give this reflection in my site using my name (furqan) if there is possible, then plz provide me any source code or link about this
thanx
Furqan
XML From Http
Ever spent weeks making something, then when finally uploaded you remember that flash can't reqest XML from an http address. I have.
I need help.
There must be a way.
Getting The End Users IP Address
I have a loadvariable command to load a variable into a Perl script. What the client wants is for me to get the IP address of the end user. What is the AS to call up the end users IP?
IP Address Locking
what i mean about ip address locking is that can i do a script in flash to lock on a certain ip so that my swf would only run on a server with my specified ip address?
Address To Clipboard ?
Hi,
IŽd like to give my users more comfort and let them copy my address (in my .swf-file) to her clipboard.
Is there a function in actionscript like"copyToClipBoard" or something like that? All my books beautiful Flash-books donŽt have an answer for this problem.
Can you help me?
THANX
MX ADDRESS ERROR
Everytime I open the actions panel in Flash MX I get the bomb and restart with the message 'address error' .
I have talked to customer and tech support and Macromedia and think it is the worst support program I have ever dealt with in my entire life. I am personally offended by how I am being treated as a customer.
Any help would be grateful.
I am running OS 9.2.2 .
I hear the gurus hang out in here : >
Eric
ericthelight@covad.net
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?
|