ActionScript 2.0 :: Verify _url On Current Domain?
Sep 22, 2004
I found this script on the web. What it is trying to do is verify the url so that if the swf is running on another url, the script will either give a message or do an action. Yet I have not got it to work?
Code:
protocol=_url.substr(0,_url.indexOf(":"));
if (protocol=="file") {
// Let's be nice:
[Code].....
View 5 Replies
Similar Posts:
Jun 22, 2008
I`m trying to set-up a script that changes the color of a movie clip, depending on the current url of the page... My code is:
Code:
var link = "http://localhost/v-v/indexSRP.php?kategorija=";
var link2 = "http://localhost/v-v/index.php?kategorija=";
if (_root._url.indexOf(link + "3") == 0) {
[Code].....
View 5 Replies
Aug 5, 2010
Using SharedObject.getLocal I can get access to what appears to be an infinite number of files simply by using unique identifiers in the method call; What I want to know is how can I retrieve a list of all active files or shared objects that have been saved for my current domain.
I'm trying to write a save game mechanism that allows you to save your game (potentially many megabytes) so using a single shared object seems like it might cause performance issues however if I use multiple objects I'm not sure how I'd find out what has been saved without using an object just to specify the id's of the other saves - then my question becomes what happens if this "header" object is removed or deleted - how can the player access the other files?
A snippet from the flash docs:
Local disk space considerations. Local shared objects have some limitations that are important to consider as you design your application. Sometimes SWF files may not be allowed to write local shared objects, and sometimes the data stored in local shared objects can be deleted without your knowledge. Flash Player users can manage the disk space that is available to individual domains or to all domains. When users decrease the amount of disk space available, some local shared objects may be deleted. Flash Player users also have privacy controls that can prevent third-party domains (domains other than the domain in the current browser address bar) from reading or writing local shared objects.
View 2 Replies
Jun 1, 2010
post the code for a working cross-domain securityfile that allows access only from the same domain as all the flashfiles and xml files are in?used to be easy in as2 but i think i dont know what i need to know about it in as3..
View 3 Replies
Apr 23, 2009
We are running FMS3 on Windows 2003 Server. Videos stream and play fine when inside our domain, but outside the domain the videos take anywhere from 20 or more seconds before playing.
After analizing the connections it was determined that the player is randomly trying to access ports until it gets to the one that works, but this is ONLY happening from people trying to view videos from outside our domain.
View 14 Replies
Jun 3, 2011
I have moved a web application from old domain to new domain. I cannot get Flash to engage. I have changed the domain in flash_images.php file to the new domain. I have a flash_box.swf file and I have a js file these are the only flash components that I see--old domain is e.g. www.example.com new domain is [URL]..I am not a flash developer, how do I get flash to work on the new domain?
View 3 Replies
Dec 9, 2011
I created some game and would like to let the users play it only on my domain, so to forbid to play it offline or put on some other site. Is there a way to do it? Somehow check domain or so?
View 1 Replies
May 7, 2009
How can I verify an swf has loaded, then tell it to do something?
loadMovie("clip.swf", "mcHolder");
View 1 Replies
May 11, 2011
I am making a simple tool for use around the office that takes up to maybe up to 8 inputs (text, combo box, t/f, etc)What is the best way to make sure that each field has something entered or selected? I am not worried about malicious code.
View 1 Replies
Mar 10, 2010
Is there a class in AS3 that will allow you to check if the pc on which the player resides has a current internet connection?
View 1 Replies
Oct 6, 2010
I am working on a CD project in flash. I have a main Projector(.exe) file which call other swf files. I compile all these files(.exe and swf) to installable CD which copy all the files on the local hard disk and make a shortcut on the desktop.
Now the problem is that I want to run my .exe file only if CD is in CDROM otherwise it loads another swf(from the local hard disk) which shows the message "please insert the CD and restart the application".
View 1 Replies
Sep 3, 2009
What I want to do is what parseInt and parseFloat does..basically I want to take ANY string and a radix value from 2->36, and then cut the leading part of the string that makes it a value in that radix.Let's call this method "cutValueFrom( str:String, radix:uint ):String".[code]and yes I could technically bang this out in some long ugly loop... but I want it faster then that. parseInt does it speedy like, I'm looking for something comparable, hence my desire for a good RegularExpressio.
View 2 Replies
Nov 5, 2010
My swf works fine when previewed locally but because of flash cross domain issues (link below) doesnt work live. [URL] Ive used a 'crossbrowser.php file to .load in xml but am not having success with the sendAndLoad command. [URL]
View 3 Replies
Oct 6, 2010
I am working on a CD project in flash. I have a main Projector(.exe) file which call other swf files. I compile all these files(.exe and swf) to installable CD which copy all the files on the local hard disk and make a shortcut on the desktop.
Now the problem is that I want to run my .exe file only if CD is in CDROM otherwise it loads another swf(from the local hard disk) which shows the message "please insert the CD and restart the application".
View 2 Replies
Dec 16, 2011
[AS3]
import flash.events.SampleDataEvent;
var data:SampleDataEvent = new SampleDataEvent(SampleDataEvent.SAMPLE_DATA);
[/AS3]
compile it with Flex 3.6 and run local works, then run in browser, works. compile it with Flex 4.5.1 and run local works, then run in browser, throws exception:
[Code]....
View 7 Replies
Nov 4, 2009
I am a total newbie and just learning from resources available here.. Today i was trying If statements to verify if the password entered in input box named "pass" . I code is as following..
on (release){
if (pass =="acc"){
gotoAndPlay(10);
}else{
gotoAndPlay(15);
}}
Even if I enter the correct password it displays the content in frame 15.
View 9 Replies
Jan 15, 2010
Using Flash CS4, whenver I try to publish anything, I get this message:
The file 'toplevel.as', which is required for typechecking ActionScript 2.0, could not be found. Please make sure the directory '$(LocalData)/Classes' is listed in the global classpath of the ActionScript Preferences.
$(LocalData)/Classes is listed, and toplevel.as is in C:Program FilesAdobeAdobe Flash CS4CommonFirst RunClasses
What is the problem? How do I verify or change the value of $(LocalData)
View 2 Replies
Feb 2, 2011
I am uploading files, jpgs, pngs, gifs, using filereference ... no problems.
my concern is the validity of the files that a user might upload.
for instance, I took a .txt file, changed it's extension to .jpg, and filereference was able to upload it to my server ( furthermore my php script was able to create a copy of it, resize the copy, and save it also ).
View 2 Replies
Mar 10, 2006
I have made my contact form and it works, but I need some kind of script to work with the "email" text field. I need it to only send me mails with real email addresses.
Btw. the form is off of this: [URL]
View 14 Replies
Jun 22, 2003
I want to verifiy if user insert an email. example:
[Code]...
View 1 Replies
Sep 22, 2007
I'm working on a simple non-XML-based slide show where the container MC dynamically loads sequentially numbered files (01.swf, 02.swf, 03.swf, etc). As you may already be gathering, I want to write a little loop that returns true if the file is there, e.g. if there's only files, 01.swf � 07.swf and the loop checks for 08.swf and doesn't find it, it returns false. BTW, in this particular case checking loader MC's _width won't work, so I need an alternative to that.
View 2 Replies
May 15, 2008
I am trying to create a form in actiocsript that verifies correct user input before submitting. So far I have the form checking that NewEmail contains characters, an "@" symbol and a "." symbol. However is there code that can check that the layout of the email is correct before submitting i.e. <"sometext"@"sometext"."sometext">
Also I need to insert a seperate name verifier to check that there are no numbers included in a text box. This is my code so far:
_global.detailsCheck = function() {
if ( _root.NewEmail.length == 0 | _root.NewEmail.length == "" | _root.NewEmail eq "") {
// Alerts the user that their password is incorrect
_root.Guide2 = "Please Fill All Detail Fields";
[Code] .....
View 2 Replies
Jan 25, 2009
I have a textfield. I want to verify if the content inserted by the use is a number, and if it is not I want to give a message.
How can I verify if it is a number?
View 5 Replies
Sep 18, 2003
How do you verify if a variable contains a specific set of characters. Let's say: my_var="My name is Peter and I like apples";
How do I test if my_var contains de word "Peter"?
View 3 Replies
Oct 6, 2010
I am working on a CD project in flash. I have a main Projector(.exe) file which call other swf files. I compile all these files(.exe and swf) to installable CD which copy all the files on the local hard disk and make a shortcut on the desktop.Now the problem is that I want to run my .exe file only if CD is in CDROM otherwise it loads another swf(from the local hard disk) which shows the message "please insert the CD and restart the application".
View 1 Replies
Mar 12, 2010
I have 2 input boxes one i will add an email the second i want it to compare the details.So i add a persons email, the second box the same email would be added and when i press submit it compares the two and if correct goes here... im using something like this.
on(press) {
if( usr==uName && pwd==pWord) {
gotoAndPlay(2);
[code]....
View 1 Replies
Oct 15, 2010
Is there a way to get at the setting in your server side ActionScript?trace("Here is the runtime size for this app: " +.?);
View 1 Replies
Dec 1, 2002
Wanted to know if it is possible to make a bool-variable in flash that is set to 'false' by default. It then checks if a file exists at a certain location, and if so, the bool-variable is set to 'true' ?
Something like:
if (c:/myTextfile.txt == true){*do stuff here*;}
What would be the correct code?
View 6 Replies
May 25, 2010
I'm creating an exercise where I have five movieclips that at first their alpha are at 0% and then they are shown randomly and I want to verify if they are all visible (100%) a text message (a dynamic text field) will be displayed. What I want you to explain me is how do I do this verification. Do I need to do this with an IF condition?
View 4 Replies
Feb 12, 2011
is there a way to verify that an image file exists at the stated URL before passing that URL to various URLmethods?
View 0 Replies