I May Find A Bug Using Flash MX, Please Verify It
Hi, I have implemented several test cases and found inaccuracy. Using either "setProperty action" or "write a statement to assigns a value" to set X and Y coordinates of a car image (Movie Clip) animation, car velocity value is rounded differently depending on whether add or subtraction operation is needed.
The followings are four examples where the car image moves in four different directions (East, West, North, South) with respect to a coordinate. In these examples, car velocity is assumed to be constant - i.e., 10/12 in a 12fps movie. The velocity is traced by finding the difference of the coordinate after an addition or subtraction operation.
velocity = 10/12 ; //Example 1 setProperty("/carA", _y, carA._y - velocity); velocity becomes 0.85
//Example 2 setProperty("/carA", _y, carA._y + velocity); velocity becomes 0.80
//Example 3: setProperty("/carA", _x, carA._x - velocity); velocity becomes 0.85
//Example 4 setProperty("/carA", _x, carA._x + velocity); velocity becomes 0.80
These examples show the velocity value, which is 0.83, is rounded down to 0.80 when added to a coordinate; and rounded upto 0.85 when subtracted. The same trend holds true for other non-zero velocity values with fractions.
If you need any further information, please let me know.
Thank you very much.
FlashKit > Flash Help > Flash MX
Posted on: 07-29-2002, 08:22 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Verify Url Value In Flash
briefly, what i'm trying to achieve is:
i need to modify a website in dreamweaver where the page template has a table with a top cell where a flash menu sits and a bottom cell where the contents (in html) changes depending on the page you're in.
the buttons in the flash menu change formatting highlighting the button related to the current page. so if you're in the "about us" page, the about button on the flash menu would be diffrent from the other buttons, and so on
dreamweaver knows which page is the current page, but i don't know how to send the message to flash...
i've tried with some if statements in flash looking at the url, but they didn't work
hope this is clear and i welcome any suggestions
thanks
Verify Flash To Php Transmittion --> Display Back In Flash
I need a way for flash to transfer form variables to a php process page, and for the php to send a reply back to flash, so flash will display a confirmation of transmittion.
--------------------------
This is something I found that worked with another flash form but its in ASP.
The ASP coding sends reply_verify back to flash
-----
<%
Dim reply_verify, returnToFlash
reply_verify = Request.Form("i_name")
returnToFlash = "reply_verify="; & Server.URLEncode(reply_verify)
Response.Write returnToFlash
%>
----
This is the PHP that I thought would do it, but I guess I'm doing something wrong.
PHP Code:
//Confirmation Sent Back To Form "reply_verify" = "i_name"; $sendStr .= rawurlencode(reply_verify); echo $sendStr;
Any help would be greatly appreciated
zip (php and fla)
html
swf
PHP Mail Form In Flash- Verify + Print Option Needed
Here's a nice little working fla with php file that will send the textfield data to your designated email address. problem is i can't get it to display the data on a "pre-sending" page on which the user can double check to make sure contents are correct before sending, or go back to correct them and keep the existing data (so she doesn't have to start all over). i also want to be able to print out the contents of the "pre-sending" page before sending.
can anyone help me on this??? please???
cheers
oh, download the file here:
http://cyberbeehive.com/temp/formA.zip
PHP Mail Form In Flash- Verify + Print Option Needed
Here's a nice little working fla with php file that will send the textfield data to your designated email address. problem is i can't get it to display the data on a "pre-sending" page on which the user can double check to make sure contents are correct before sending, or go back to correct them and keep the existing data (so she doesn't have to start all over). i also want to be able to print out the contents of the "pre-sending" page before sending.
can anyone help me on this??? please???
cheers
oh, download the file here:
http://cyberbeehive.com/temp/formA.zip
Could Someone Please Verify?
So I've been trying to get my flash video to play on the internet for the longest time but it still doesn't work. I was wondering if this is the problem?
I found this in the flash help...
About configuring FLV files for hosting on a server
When you work with FLV files, you might have to configure your server to work with the FLV file format. Multipurpose Internet Mail Extensions (MIME) is a standardized data specification that lets you send non-ASCII files over Internet connections. Web browsers and e-mail clients are configured to interpret numerous MIME types so that they can send and receive video, audio, graphics, and formatted text. To load FLV files from a web server, you might need to register the file extension and MIME type with your web server, so you should check your web server documentation. The MIME type for FLV files is video/x-flv. The full information for the FLV file type is as follows:
I'm using .flv movie and it doesn't play on the internet which is on a server. Could someone please verify this and tell me if I need to do this in order for my flash movie to play on the internet?
Thanks
-Ostil-
Php Password Verify
hi everybody, i have a question. In this script below there
is a section where i have (!passwd.length) and (!repasswd.length).
this is a password field and a retype your password field. I would like to set this up so that the re-type your password field has to match with the first password you typed in, otherwise you would get a message like 'passwords do not match' So you are only permitted to send this form if the password fields match.
Any help would be greatly appreciated. Thanks in advance,,,
on (release) {
if (!FirstName.length) {
EmailStatus = "Please Enter your first name.";
}
else if (!lastname.length) {
EmailStatus = "Please enter your last name";
}
else if (!Email.length || Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {
EmailStatus = "Please enter a valid E-mail";
}
else if (!telephone.length) {
EmailStatus = "Please enter your telephone #";
}
else if (!company.length) {
EmailStatus = "Please enter your company";
}
else if (!passwd.length) {
EmailStatus = "Please choose your password";
}
else if (!repasswd.length) {
EmailStatus = "Please re-type your password";
}
else {
loadVariablesNum ("MailPHP.php", "0", "Post");
gotoAndPlay(10);
}
}
How Can I Verify Domain Name
hey guys
i am making a movie.. i have to need a url validation type functions...
When the SWF file is displayed at mywebsite.com, it displays an image within that directory, or displays nothing at all.
When the SWF file is displayed at any-other-doamin.com, it displays a predefined image such as no-site.gpg
in short i need to get "url variable withing movie..where this movie is uploaded"
how can i do it?
thanks in advance
[F8] Verify Value In NumericStepper
Greetings,
I'm trying to put together a quick simulation/tutorial for registering one of our products. I've got 7 input text fields and 6 numeric steppers inside a movie clip. I need to verify that the student entered in the correct values/data when they click the "register" button. If they enter the correct information, they go to a final screen. If they enter the wrong information, they get an error message. I've got the text fields figured out, but can't figure out how to do the NumericSteppers. Here is what I've got that works for the text fields:
code: this.bRegister.onRelease = function():Void {
if (SiteName_txt.text == "SKC" && Description_txt.text == "Savi Knowledge Center"
&& FirstName_txt.text == "John" && LastName_txt.text == "Doe" && Unit_txt.text == "Training"
&& PhoneNo_txt.text == "4085551234" && Email_txt.text == "johndoe@savi.com") {
_root.attachMovie("smaMainRegistered", "finish", _root.getNextHighestDepth());
_root.finish._x=400.0;
_root.finish._y=300.0;
_root.attachMovie("GoodJob", "Good", _root.getNextHighestDepth());
_root.Good._x=400.0;
_root.Good._y=300.0;
}
else {
_root.attachMovie("error", "error", _root.getNextHighestDepth());
_root.error._x=550.0;
_root.error._y=90.0;
}
};
I've tried adding the following to the if statement: code: && latDegree.NumericStepper == 37 and code: && latDegree.NumericStepper == "37" When I enter either one of these to test it on the numericstepper with latDegree instance name, it brings up my error message no matter what value I enter in the stepper. Any thoughts/advice welcome.
Thanks!
How To Verify Emails?
Hey all,
I have made my contact form and it works, but i need som kind of script to help me with the "email" text field.
I need it to only send me mails with real email addresses.
Can someone please help.
Thanks in advance
Btw. the form is off of this:
http://www.kirupa.com/developer/acti..._php_email.htm
Anyone Care To Verify This?
Recently I was having problems getting a preloader to work correctly. Well it turns out that the preloader doesn't work if you try to view the .swf file by itself in the web browser.
Sometimes I will do a "quick test" by viewing the .swf file directly. I had always assumed it was no big deal since you see the .swf file regardless.
In other words, let's say your preloader is named "preloader.swf"-and in your browser address bar, if you simply type in http://www.mycompany.com/preloader.swf , the preloader will not work (assuming your ActionScript is at the beginning of the timeline)-the movie clip will fully load, which will simply be a long pause for dial-up customers. However, if you use the object tags found associated with an HTML/XHTML document and provide the appropriate URL, then it does work.
Anyone care to verify this with a dial up connection?
How To Verify Variable Existence
'elp.
I need to know if a variable exists, if it has been defined, to redefine it (clear it). I have about 300 variables in input texts fields and I need to clear them, they have names like d_3_4_5 and I need a loop to clear them, the problem is that, if I set a variable to "" it creates it, so I get 9984 variables that I don't need, nor want.
also, is there a way for me to list all the varables in a movie? loop through them and set them to what I want?
or is there a way to completely remove a variable? name and everything? (the void(variable) doesn't work)
Verify That Text Is Entered
I'm developing a movie which:
#1 asks the user to type a question into a text box
#2 checks to see if there is text in that text box
#3 if YES, then go to a random frame in the movie - or - if NO, then display a message saying the user HAS to enter a question into the text box.
I'm really new at this (d'uh) and assume that this is possible. yes?
thanks in advance for your input!
How To Verify A Jpg Exists When Using LoadMovie(jpg)...
I'm loading jpg's dynamically into a sort of slideshow. The first function below gets the jpg, then goes into a preloader interval until the jpg is loaded. However, if there is no jpg found, it seems to get stuck permanently in my checkImageLoaded loop.
Is there some kind of check to see if 'loadMovie(jpg) == true' or something similar so I can decide whether to abort the checkImage loop?
code:
// +++++++++++++++
// initiate the image load
function loadImage(imageUrl){
clearInterval(_root.imageLoadInterval);
loadMovie(imageUrl, photoPlaceholder);
_root.imageLoadInterval=setInterval(checkImageLoad ed,100);
}
// +++++++++++++++
// checks to see how much image has been loaded
function checkImageLoaded(){
imageBytesLoaded=photoPlaceholder.getBytesLoaded() ;
imageBytesTotal=photoPlaceholder.getBytesTotal();
if((imageBytesLoaded >= imageBytesTotal) && (imageBytesLoaded > 0)) {
photoPlaceholder._width = 240;
photoPlaceholder._height = 160;
clearInterval(_root.imageLoadInterval);
}
}
Verify That A Txt File Exist
Hi,
I have a problem. I must make my fla file to verify that a txt file exist: if exist, I want it to go to next frame, else, I want it to exit or display an error message.
I use load variables to load something from the txt file and on onData, it moves to next frame. The problem is that if the file doesn't exist my fla doesn't do anything. It remains only my black background and that's all. Can you help me?
Thank you.
Verify Data From ASP Page
I'm being asked to do the following...
capture a number from the user (got that part) and determine if it matches a number in a database.
Basically, send the captured text as a variable to an ASP page, get a response back and run an if / else function.
Does anyone have any example with some if/else logic dealing with ASP.
Never done this... in AS 3, what do you have to do to communicate with ASP? Anyone have a simple working example of this?
Thanks!
Verify A Number Has Been Entered
I have a form and I want to check if the data entered is a number if it isnt I want to be able to return an error message. I have the form pretty much nailed apart from this little problem.
Code:
// set some variables
//
//
mailform = "mailform.php";
confirm = "thanks";
error1 = "contact name required";
error2 = "company name required";
error3 = "number required";
error4 = "valid email required";
error5 = "input required";
error6 = "weight required";
codeError = "need code";
response.text = "";
//
//
//
//
// validate email function
//
function validate(address) {
if (address.length>=7) {
if (address.indexOf("@")>0) {
if ((address.indexOf("@")+2)<address.lastIndexOf(".")) {
if (address.lastIndexOf(".")<(address.length-2)) {
return (true);
}
}
}
}
return (false);
}
//
// clear form
function clearform() {
username.text = "";
company.text = "";
code.text = "";
telephone.text = "";
email.text = "";
from.text = "";
to.text = "";
weight.text = "";
nextDay_rb.setValue(true);
sameDay_rb.setValue(false);
before9_rb.setValue(false);
before12_rb.setValue(false);
response.text = "";
}
// form check
//
function formcheck() {
if ((((email.text == null)) || (email.text.length<1)) || (email.text == "valid email required")) {
email.text = error4;
formData.action = "";
}
if (!validate(email.text)) {
email.text = error4;
formData.action = "";
}
if ((username.text == null) || (username.text == "")) {
username.text = error1;
formData.action = "";
}
if ((company.text == null) || (company.text == "")) {
company.text = error2;
formData.action = "";
}
if ((code.text == "") || (!isNaN(code.text))) {
code.text = codeError;
formData.action = "";
}
if ((telephone.text == "") || (isNaN(telephone.text))) {
telephone.text = error3;
formData.action = "";
}if ((from.text == null) || (from.text == "")) {
from.text = error5;
formData.action = "";
}
if ((to.text == null) || (to.text == "")) {
to.text = error5;
formData.action = "";
}
if ((weight.text == null) || (isNaN(weight.text))) {
weight.text = error6;
formData.action = "";
}
if ((validate(email.text)) && (email.text != error4) && (username.text != "") && (username.text != error1) && (company.text != "") && (company.text != error2) && (code.text != "") && (code.text != codeError) && (telephone.text != "") && (telephone.text != error3) && (from != "") && (from.text != error5) && (to.text != "") && (to.text != error5) && (weight.text != "") && (weight.text != error6)) {
return (true);
}
}
//new LoadVars function
function sendInfo() {
trace("formcheck() returned true, run actions");
//test trace
formData = new LoadVars();
formData.username = username.text;
formData.company = company.text;
formData.code = code.text;
formData.number = number.text;
formData.email = email.text;
formData.from = from.text;
formData.to = to.text;
formData.weight = weight.text;
formData.delivery = deliveryGroup.getValue();
formData.action = "send";
// make new LoadVars for returned data
returnData = new LoadVars();
// send information
formData.sendAndLoad(mailform, returnData, "POST");
// load the returned data
returnData.onLoad = function(success) {
trace("----------------connected to php page----------------");
if (success) {
response.text = "thanks, a confirmation email has been sent to your email address";
} else {
trace("no returned data");
}
};
//------------test formData info, this will trace before returnData info
trace("formData.action ="+formData.action);
//test trace
trace("formData.name ="+formData.name);
//test trace
}
//end sendInfo()---------
stop();
I have highlighted the area that I need to change, many thanks in advance
Nick
Verify Text Field
I have a text field that I wanna know if it has already had text entered into it. Can you do this with something like ??
if (_root.MC.letter.text == "") {
trace("Empty");
}
Verify Email Address - Help
Hi all,
Im 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";
// Stops the movie from going to the next frame
stop();
} else if (_root.NewEmail.indexOf("@") == -1) {
_root.Guide2 = "Please Give A Valid Email Address";
stop();
} else if (_root.NewEmail.indexOf(".") == -1) {
_root.Guide2 = "Please Give A Valid Email Address";
stop();
} else {
//submit details
gotoAndPlay ("ExitFrame");
}
}
Any help would be much appreciated...
Verify Gateway Exists
I am looking for actionscript code to verify if a gateway url exists or is valid if not then carry any other action/function. Any ideas.
By the way this board rocks.
Can't Seem To Verify The _y Property Of Movie Clips
I've just started creating a simple puzzle game in Flash 5. The concept is simple; you click on a square to select it and then click on a different square to swap them around. When the squares are all in their correct place a whole image will be visible. The problem I'm having is in a function that is rather critical to the game. I need to check after every swap which squares are in their correct positions. To do this I get the _x property and the _y property of each square and compare them with some numbers in 2 arrays (one for the x co-ords and another for the y). I can the game to recognise when a piece is in the correct x position - but not the y position, nor both of them together. Here is some example code:-
// This code checks the x property and if it is correct, changes the corresponding variable
if((getProperty("square1", _x))==49.6){correct[1] = 1}
// This code should do similair to above, but instead check the y property - it doesn't recognise when it's correct for some reason
if((getProperty("square1", _y))==49.9){correct[1] = 1}
// The final if statement will check the x and the y property before changing the corresponding variable to correct
if((getProperty("square1", _x))==49.6 && (getProperty("square1", _y))==49.9){correct[1] = 1}
The second and third code examples don't work for some reason! I need help ASAP please. The correct code would be helpful. Thanx for your help. I can post the .fla or the whole actionscript if necessary.
Simon Plenderleith
How Do I Verify That A Character Exists In A String?
Hi,
I'm doing a login/registration page in Flash that takes in the person's email address.
I want to script in a function that checks whether the string they enter contains a '@' character, and prompts them to enter a valid email address if it doesn't.
Is there an AS function called 'find' that can be used on a single string? AS Dictionary is quiet about this one too if it does exist.
Thanks
Lassi
HOW - Verify Form Fields Are Filled In?
Hey All;
Is there a simple way to get MX to verify that *required fields in a flash form are filled in, when the submit button is pushed??
I tried using:
on (release){
if (field1 = ""){
gotoAndStop ("fieldempty");
} else {
getURL (".../cgi-bin")
}
}
but no luck.
Any suggestions??
Circusboy
Email Form Verify Fields
I have a generic email feedback form where the user fills in 4 fields:
name
email address
subject
body
Before sending the variables to my cgi script, I want my flash file to verify that:
1) the fields have been filled in
-and-
2) I would really like to verify that the email address is in the format "something" + @ + "something.com/net, etc."
I know this is possible, but can't quite get it right. Anyone have some input?
RH
How Do You Check An .XML File To Verify A Variable?
How do you have flash check an .XML file to verify a variable. Like to password protect something, you would say:
if(passwordvariable = "opensesame"){gotoAndStop("1")
but if I wanted to have 50 passwords, would i have to enter each one of them into the actionscript, or could i say "look at sfdjgjk.xml"?
BTW, I'm using flash mx 2004 professional.
THANX!
[CS3]Verify URL Existence Before Using 'loadMovie(someURL)'
Probably this problem has already been discussed but...
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.
Thanks
Verify A Wmv Exists For Error-handling
Hi.
I have a Flash move that pop's up a Windows Media Player Windows to play a video. I'd like to setup some error checking code to check whethter the movie's exists, and if it doesn't- load error.swf in Flash instead of popping up the window. Any ideas on what bastard combination of scripts could do this?
Since Flash isn't directly making the call for the video- it's calling a javascript that loads the popup, which in turn loads the video.... I'm just not sure how to get it done.
Thanks!
Verify _url On Current Domain
Hey everyone!
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?
Here is the script, can someone implement it and tell me how they got it to work?
Code:
protocol=_url.substr(0,_url.indexOf(":"));
if (protocol=="file") {
// Let's be nice:
// If the leecher downloaded the SWF, well let them play it
// on their on computer
//
message="It seems you are trying out this SWF on your local hard disk. That's ok, but be aware that this SWF will only work if played on the source site"
} else if (protocol=="http") {
// doubleSlash
// ===========
// The location of the first occurance of a "//" in the url.
// url's are formed as following:
//
// [protocol]://[server]/[pathname]
//
// Where protocol is any udp such as ftp, file, http, etc
//
doubleSlash=_url.indexOf("//");
//
// server
// ======
// Isolate the server name: Go past the "//", and everything
// between the doubleslash and the next "/" (single slash")
// is a server name
server=_url.substr(doubleSlash+2,_url.indexOf("/",doubleSlash+2)-doubleSlash-2);
//
// Let's get rid of the "www" prefix, because
// sometimes servers recognize the address without this
// prefix.
// Here's a little catch!
// What if the user typed "http://www.6FootMedia.com"
// That is not the same as "http://www.6footmedia.com"
// (The difference is in the caps)
server=server.toUpperCase()
//
// Get rid of the WWW. prefix
// so we can focus on examining only the server domain name
if (server.indexOf("WWW.") <>-1) server=server.substr(server.indexOf("<A href="http://www.")+4,server.length/">WWW.")+4,server.length);
//
if (server.indexOf ("FRUNDER.COM") <> -1 or server.indexOf("FLASHKIT.COM") <> -1) {
message = "Copyrights are being preserved";
} else {
message = "Alert! This film's copyrights are being infringed! A message is being sent to author that you have copied his work. Expect the copyright police to arrive 15 minutes at your doorsteps.
Offending website path: " + _url;
// Here you can put code to redirect the film to another frame
// or to getURL to a page on your site that reports a stolen goods page...
}
}
box1=prefix;
Thanks!
How I Do To Verify If A Child Was Added Or Not, Even It's Not A Null Value
Hi, I'm doing a animation that when you put a mouse over a object it create frame which grows until a certain size and start all over again. Take look the code:
Code:
package Animation
{
import flash.display.Sprite;
import flash.display.DisplayObject;
import flash.display.Shape;
import flash.events.MouseEvent;
import flash.utils.Timer;
import flash.events.TimerEvent;
import flash.display.DisplayObjectContainer;
public class OpeningRect extends Sprite
{
private var _content:DisplayObject;
private var _shape:Shape;
private var _timer:Timer;
private var _num:Number;
private var _mouseOut:Boolean;
public function OpeningRect(content:DisplayObject)
{
_content = content;
addChild(_content);
addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
}
public function onMouseOver(event:MouseEvent):void
{
_num = 0;
_mouseOut = false;
_timer = new Timer(150);
_timer.addEventListener(TimerEvent.TIMER, effect);
_timer.start();
addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
}
public function onMouseOut(event:MouseEvent):void
{
_mouseOut = true;
}
public function effect(timerEvent:TimerEvent):void
{
if (_shape != null)
removeChild(_shape);
_shape = new Shape();
_shape.graphics.lineStyle(_num, 0x2778B3, 1);
_shape.graphics.beginFill(0, 0);
_shape.graphics.drawRoundRect(0, 0, _content.width, _content.height, 2, 2);
addChild(_shape);
trace(_content.width);
trace(_num);
_num += 3;
if (_num == 15)
{
_num = 0;
if (_mouseOut)
{
_timer.stop();
if (_shape != null) removeChild(_shape);
return void;
}
}
}
}
}
The problem is that the function, in the line 43, verify if have shape is null or not so the second time that you put the mouse over again the shape is not null anymore but it's not added in the Sprite. So the solution would be test if the shape is added or not in the Sprite, but I don't know how to do it.
I would like to know if it is the best way to do that animation.
Thank you very much.
[CS3]Verify URL Existence Before Using 'loadMovie(someURL)'
Probably this problem has already been discussed but...
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.
Thanks
Verify _url On Current Domain
Hey everyone!
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?
Here is the script, can someone implement it and tell me how they got it to work?
Code:
protocol=_url.substr(0,_url.indexOf(":"));
if (protocol=="file") {
// Let's be nice:
// If the leecher downloaded the SWF, well let them play it
// on their on computer
//
message="It seems you are trying out this SWF on your local hard disk. That's ok, but be aware that this SWF will only work if played on the source site"
} else if (protocol=="http") {
// doubleSlash
// ===========
// The location of the first occurance of a "//" in the url.
// url's are formed as following:
//
// [protocol]://[server]/[pathname]
//
// Where protocol is any udp such as ftp, file, http, etc
//
doubleSlash=_url.indexOf("//");
//
// server
// ======
// Isolate the server name: Go past the "//", and everything
// between the doubleslash and the next "/" (single slash")
// is a server name
server=_url.substr(doubleSlash+2,_url.indexOf("/",doubleSlash+2)-doubleSlash-2);
//
// Let's get rid of the "www" prefix, because
// sometimes servers recognize the address without this
// prefix.
// Here's a little catch!
// What if the user typed "http://www.6FootMedia.com"
// That is not the same as "http://www.6footmedia.com"
// (The difference is in the caps)
server=server.toUpperCase()
//
// Get rid of the WWW. prefix
// so we can focus on examining only the server domain name
if (server.indexOf("WWW.") <>-1) server=server.substr(server.indexOf("<A href="http://www.")+4,server.length/">WWW.")+4,server.length);
//
if (server.indexOf ("FRUNDER.COM") <> -1 or server.indexOf("FLASHKIT.COM") <> -1) {
message = "Copyrights are being preserved";
} else {
message = "Alert! This film's copyrights are being infringed! A message is being sent to author that you have copied his work. Expect the copyright police to arrive 15 minutes at your doorsteps.
Offending website path: " + _url;
// Here you can put code to redirect the film to another frame
// or to getURL to a page on your site that reports a stolen goods page...
}
}
box1=prefix;
Thanks!
[MX] Button To Verify Which Movie Clip Is Present
I am trying to get my navigation working properly.
What I want to happen is when I click button 1 to play movie clip 1, that the movie clip that is already present (2,3,or 4) goes to next frame to play an exiting animation and then movie clip 1 starts.
Create Array And Loop To Verify Many Char_txt
hay - im pretty new to this so excuse my ignorance, please.
i have a dynamic text box where a user can input a string of letters by
pressing movie clips (acting as buttons)
>>>this is the script on the actions layer of the maiin timeline
answ = "";
// this is the script on the movie/button in the same layer
onClipEvent(load){
cha_txt = "B";
}
//and this is the script inside the movie/button on the actions layer
this.onPress = function() {
_parent.answ += cha_txt;
//_parent.answ = _parent.answ + cha_txt;
}
>>>this all works fine
the problem is that i have another button, which when pressed i want it to
activate a number of movies, e.g., if i type in "abcgiytv" letters into the text
box and then press the "go" button a video of a person speaks those lettes one by one in succession and then another video clip will tell you that you have typed in the wrong answers.
I need to study and understand this script but im not sure what i should be
studyingif/else/variables/event handlers ect. to see an example of what i am trying to achieve look at the following website
>>>http://www.so-net.ne.jp/pr/chance/bb/top.html
thanks for your help
SSL Client Cert Verify Required Issue
Hi,
I built a basic flash app that get a text file from my website and show it to user. My web server is apache httpd and I activate the "SSLVerifyClient require" mode so only user have valid certification can access my tool.
I successfully lauch this app into my web server. After certificate authentication, I manage to download the swf and run from my browser (Firefox 2).
But when the flash app start to request the text file from my secure website, it failed. I found out that the reason is the flash app is not sending the client certificated when requesting the text from server.
Anyone have any idea how to fix this??
Thank you.
Cheers,
comcrazy
Input Text, Verify No Empty Fileds
Can't understand this:
I have input text fields on the stage. Their var names in text properties are called (Surname, Fno, contactNo, QueryDetail) with no instance names. On the script below I am checking to see that the fields are not empty when submitting, if so it must goto frame6 and stop if it's not goto frame2 and stop. But for some reason it submits the values as blank to the dbase and goto frame2. Am I missing something or must I clear the text fields beforeentering the frame? Thanks...
on (release) {
if(Surname == "" && Fno == "" && contactNo == "" && QueryDetails == "") {
gotoAndStop(6);
}else{
loadVariables("http://blabla/flash.php", this, "POST");
gotoAndStop(2);
}
}
You don't need eyes to see just the vision because there are always more ways and different answers to what we are used to...
Verify And Display Image Size Before Uploading.
We are using the input type=file for our clients to browse and select images on their hard drive to achieve the following:
1. Immediately display the image in the browser using JavaScript after they select it.
2. Read the file size using JavaScript to warn the client of exceedingly large files that would take unusually long periods of time to upload.
3. Read the width and height of the image using JavaScript in order to store that information in a database for output later on.
Apparently, Microsoft has removed the ability for JavaScript to read the full local path of the file selected. Can this be achieved in Flash?
[F8] Contact Us Form Won't Verify Infomation And Send Information
Ok, so I used a tutorial on
http://www.flzone.com/showDetail.asp...form/index.htm
OK, so I used the above tutorial on www.southcoastauto.us
Anyways, when I try to use the contact form, it doesn't check to make sure the fields are filled and it doesn't pass the information over to the .php file.
I think I am having problems with the submit button actionscript
Code:
on (release) {
if (name eq "" or subject eq "" or message eq "" or email eq "") {
stop ();
} else {
loadVariablesNum ("form.php", 0, "POST");
gotoAndStop (2);
}
}
At form.php", 0, "POST, I think that the 0 should be something else but I don't know what.
But anyways, if you go to the above website, you can see for yourself that the fields don't verify if one is empty. And since that isn't working, nor is the rest of it where it sends the information to form.php
Could someone clarify if this will work for me?
BTW, as for the levels in the flash. I also have the form under scene 1 > page 4, if that makes any difference.
ALSO, I have discovered that if I click the reset button, then the first part of the actionscript work so that you can not hit submit til all the fields are filled in.
Verify Error 1030# Stack Depth Unbalanced 1 = 0.
Hi,
Iam trying to inject some code into the SWF File using an opensource Java Framework. My code is getting injected correctly. I saw this, when i tried to decompile the SWF file into which i injected the code. But there is something that needs to be handled when it comes to handling the instruction sets available inside the method where i injected the code. I just wanted to know what that 1 and 0 points to, in the below given error message.
Verify Error 1030# Stack Depth unbalanced 1 != 0.
If somebody can help me out in making me understand the 1 and 0 in the error message, i can further proceed to correct the mistake that i have done.
Thanks,
Prabakaran Srinivasan.
My 'find' Won't Find Empty Lines And } Now
on 750 buttons I'm trying to go from:
{
Sound01
}
}
}
to:
{Sound01}
by deleting the empty lines and these } using find & replace - and when I hit replace all - it says none found, even though I copy directly from button code...
Is possible this happened by earlier having copied code from AS window - pasting it onto main stage to hold it while busy doing something else - then later double-clicking it and copying it into the find/replace window - which strangely puts little squares in wherever there was a carriage return??? Help please.
Where Can I Find Flash 5?
Does anyone know where I can get a copy of Flash 5? (not a cracked version please) Macromedia doesnt sell older versions of Flash. I need Flash 5 because that seems to be the best version of Flash that properly imports linework from Illustrator. In MX and MX 2004, the linework (dashed lines) does not interpret properly.
I would appreciate anyone's help on this.
Thanks.
Can't Find Flash.ocx
I ran the uninstall program for flash player. I keep getting a popup stating "Cannot find flash.ocx". How do I stop the computer from searching for it?
[FLASH MX] Find And Replace
Hello, all. I've seen the code to do what I'm about to ask how to do somewhere, but I can't remember where now.
Is there a way to find a string inside a string, and replace it? I've done lots of searches, but, to my great surpirse, to no avail.
Thanks in advance,
Furry
[edit]
BTW - I'm using Flash MX, if you didn't see the title of this thread...
[/edit]
I Find Problem In Flash Mx
i find problem in action code in flash mx
when i want write code to open exe file and i test it he don't working
this is sample :
fscommand ("exec", "multimedia\ddbplay.exe");
when i click in the button he not open the exe file
but when i write the same code in flash 5.0 he is working witout any problem
what is solve?????
|