Simple Forms Not Working On Flash 8?
Hello,
i'm trying to make a simple form, using the old but effective tutorials scattered around... I've developed forms successfuly in the past, but now the same procedures doesn't seem to work.. the strange thing is that the source files of the tutorials work, but my application doesn't; to be more precise, it works, but the mail i'm receiving back is blank, just the strings declared in the PHP file; tracing within flash, the loadVars object contains all the correct data, but somewhere in the road it gets lost. Does anybody knows the answer for this problem? I know almost nothing of PHP
Here's the code I've got (based upon a tutorial by CyanBlue)
ActionScript Code: _global.sndMail = function(hasta) { var pqte = new LoadVars(); for (i=1; i<=hasta; i++) { var nTemp = tsp["c"+i].ct.text; pqte[nTemp] = tsp["i"+i].text; } pqte.onLoad = function(ok) { if (ok) { trace("Email Sent!!!"); } else { trace("Problem sending an Email!!!"); } }; pqte.sendAndLoad("form.php", pqte, "POST");};
tracing unescape(pqte) yields this
PHP Code:
");
}
}
else
{
echo("This script runs only in Flash!!!");
}
?>
=&");
}
else
{
echo("=&result=2&<?php
if ($_POST)
{
$mailTo = "berrios@instrumental.cl";
$mailSubject = "[Contact] Website Contact from - (" . $_POST['NOMBRE'] . ")";
$Header = "MIME-Version: 1.0 ";
$Header .= "Content-type: text/html; charset=iso-8859-1 ";
$Header .= "From: " . $_POST['E-MAIL'] . " ";
$output = "<BR>";
$output .= "De : " . $_POST['NOMBRE'] . "<BR><BR>";
$output .= "e-mail : " . $_POST['E-MAIL'] . "<BR><BR>";
$output .= "comentario : " . $_POST['comentario'] . "<BR><BR>";
$output = nl2br($output);
if (e-mail($mailTo, $mailSubject, stripslashes($output), $Header))
{
echo("&onLoad=[type Function]&COMENTARIO=HERE I WROTE MY COMMENT&EMPRESA=HERE I WROTE MY COMPANY NAME&E-MAIL=HERE I WROTE MY E-MAIL&NOMBRE=HERE I WROTE MY NAME Email Sent!!!
The text is sent with all caps, so i tried to change some variables to all caps and others not for testing purposes... i didn't add the "company" field because the example php file had only three fields, wanted them to work before changing more things around...
Thanks in advance,
Sir Patroclo
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 10-17-2006, 07:31 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Flash Forms And Simple If Else Condition
I created a Flash form for users to fill out. When the form is submitted they leave the movie. I want to return users back to a specific frame in the flash movie after the form has been submitted.
I have control over the redirect URL after the form submits and I can dynamically provide variables in an ASP file.
The variables print properly in a dynamic text box so I know the values are coming across.
I tried to solve my problem by pulling variables from an ASP file and then using those values to take the user to the thank you page or the primary content. If var0 = 1 then take them to the thank you page, else take them back to the primary content. The way I am doing it below doesn't work...
Any suggestions?
loadVariablesNum ("variables.asp", 0);
if (var0 = 1) {
gotoAndPlay (10);
stop ();
} else {
gotoAndPlay (5);
stop ();
}
Flash Forms And Simple If Else Condition
I created a Flash form for users to fill out. When the form is submitted they leave the movie. I want to return users back to a specific frame in the flash movie after the form has been submitted.
I have control over the redirect URL after the form submits and I can dynamically provide variables in an ASP file.
The variables print properly in a dynamic text box so I know the values are coming across.
I tried to solve my problem by pulling variables from an ASP file and then using those values to take the user to the thank you page or the primary content. If var0 = 1 then take them to the thank you page, else take them back to the primary content. The way I am doing it below doesn't work...
Any suggestions?
loadVariablesNum ("variables.asp", 0);
if (var0 = 1) {
gotoAndPlay (10);
stop ();
} else {
gotoAndPlay (5);
stop ();
}
Anyone Had Experience With Forms And Flash? Simple Problem I Think
hello friends,
i've created a flash form that im using to send four variables to a php script.. I am having some trouble sending the
variables to the script.. In fact, i cant get it to work at all.
I have created the file
http://members.optushome.com.au/panus/flash.swf
The drop down buttons are set in the movie mode which i think is correct, along with the submit button.
I looked up what action script I should use but found many different ones. I tested a couple of them out but they don't
seem to submit anything at all, the submit button isn't functioning. It's like the submit button isnt attaching itself
to the values of the drop down buttons, and then not submitting..
I tried using
On (Release)
Load Variables ("mailto:form.php", 1, vars=POST)
End On
I'm pretty new to flash and was hoping for a little help.
the flash file is located here if you want to have a look
http://members.optushome.com.au/panus/flash.fla
regards
-n
Working With Forms
Hi all,
pls someone help me with forms. I want user to add information to a form fields (in web site(flash)) and then after pushing "Send" button, to send this information to a specific e-mail address.
Thanks in advance,
Nerijuz.
Flash "forms" Behavior - Simple Main Frame Sim
I have a Flash object that is emulating a main frame application. I have the user tab to a particular spot, enter a value, and if the value is correct, I send the user to another frame in the object. If the value is not correct, the user is alerted and directed to correct the entered value.
The actionscript involved uses text objects which listen for values; once anything at all is entered in the target text area, the last of 4, the focus shifts to a hidden button. The button is supposed to respond to the user striking ENTER by testing the value of the text area and responding accordingly.
The problem: although the button receives the focus, it does not respond to the ENTER key. The code for the button and the text area are below (the text and the button are in the same layer).
Button code:
PHP Code:
on (release, keyPress "<Enter>") {
// assign text entered to variable for testing
newPathCEc = text4_CE26c_var;
if (newPathCEc == "S") {
//jump to next frame, frame 10
gotoAndStop(10);
} else {
loadMovieNum("../images/feedback_incorrect_daace26c.swf", 4);
}
}
Code for textbox:
PHP Code:
stop();
//set focus on first text area
Selection.setFocus(text1_CE26c);
inputButton_CE26c._focusrect = false;
unloadMovieNum(4);
inputButton_CE26c._focusrect = false;
//prevent text in all but the last test region, allowing all to receive the tabbed cursor
text1_CE26c.restrict = " ^A-Z 0-9";
text2_CE26c.restrict = " ^A-Z 0-9";
text3_CE26c.restrict = " ^A-Z 0-9";
text4_CE26c.restrict = " A-Z";
text1_CE26c.tabIndex = 1;
text2_CE26c.tabIndex = 2;
text3_CE26c.tabIndex = 3;
text4_CE26c.tabIndex = 4;
//code to direct tabbing action so user moves through subsequent text areas
increment = 0;
keyListener1_CE26c = new Object();
Key.addListener(keyListener1_CE26c);
keyListener1_CE26c.onKeyDown = function() {
a = Key.getCode();
if (a == 40 || a == 9) {
next = increment++;
Selection.setFocus("text"+next+"_CE26c");
//Selection.removeListener(textboxListener);
}
};
// send focus to hidden button if the user types anything into the last text region
textListener4_CE26c = new Object();
text4_CE26c.addListener(textListener4_CE26c);
textListener4_CE26c.onChanged = function() {
if (text4_CE26c.length == 1) {
Selection.setFocus(inputButton_CE26c);
//trace("I've changed");
Selection.removeListener(textListener4_CE26c);
}
};
My Forms Stopped Working.
Hello,
This morning I got an email from my contact form.
The email came blank. The information the user filled out didn't come through.
I did a test myself and it came out blank too.
I did a test on my other forms and they came blank too.
I did a test my shopping cart and I get no emails at all from the cart.
So I emailed my hosting and so far they haven't been able to figure out what the problem is.
So I signed up with another hosting to see if it does the same thing. And to my surprise, it did the same thing. Blank form.
I have not touched the forms so no changes has been done to them.
Any one has a clue or having the same problem?
Thank you
Bijan
Simple Forms
Can anyone help? I am working my way through the simple form tutorial, and I am stuck on the section where I attach script to the send button. The last two commands, "End if" and "End on" dont appear to there to select. I am using Flash 5, has this changed in the update from 4 to 5?
If anyone could help it would be fantastic.
Thanks
Alan
Simple Forms
I am only a beginner so i dont know, but can i make a form in flash that users can type into and then send it directly to my email account with out the use of C.G.I
Obviously components would come into it somewhere.
This Should Be A Simple On (more On Forms...)
Flash MX 2004 Professional (latest update applied)
I'm sure all you gurus out there are absolutely sick of reading flash form questions ... probably just as sick as I am of reading tutorials that I just can't get to work.
I am redesigning my new site completely in Flash (with an html-based sidekick site for dialup users). On the html site, I can easily get the small form to work - not so much luck in flash. I need to be able to pass form data (just a text input and combo box along with 2 static 'variables') to a php script and I simply cannot get it to work. This is a simple domain registration form. Nothing fancy, no validation ... The required elements (per html) are:
<form method="post" action="https://domain.com/billing/order/orderwiz.php">
// -------my two static entries that need to be passed------- \
<input type="hidden" name="v" value="1">
<input type="hidden" name="submit_domain" value="register">
// -------domain name from user input (text input)------- \
<input type="text" name="domain" value="">
// -------my combo box options------- \
<select name="tld_extension">
<option value="com">.com</option>
<option value="net">.net</option>
<option value="org">.org</option>
<option value="info">.info</option>
<option value="biz">.biz</option>
<option value="us">.us</option>
</select>
<input type="submit" name="submit" value="Go!">
</form>
I would like this to send the user and his variables to the php page. I would post what I have tried, but I would like to see a fresh start on this instead of trying to fix my poorly written code. Find the format that I have been working with below (all previous AS stripped out) (please keep reponses simple and stupid - kinda the way I feel right now ) Your help is greatly appreciated
Download layout fla here.
Converting Html Forms To Flash Forms?
i'm in the middle of creating a website for a record company. i've been doing it all in flash, so when they asked me to set up a newsletter facility, i decided it would be in flash. here's my problem:
the host i'm using has a newsletter add/remove facility in html. i've tried converting this into flash but it just wont work! the html form code provided by the hoist (which does work) is below:
<form action='http://cp.cyberstation.co.uk/list.cgi' method='post'>
<input type='hidden' name='list' value='Newsletter'/>
<input type='hidden' name='redirect-success' value='http://www.mickhayglaziers.co.uk/complete.html'/>
<b>Our Mailing List</b><br/>
<input type='text' name='email'/><br/>
<input class='radio' type='radio' name='action' value='add' checked='checked'/>Subscribe
<input class='radio' type='radio' name='action' value='delete'/>Unsubscribe<br/>
<input type='submit' value='Do it Now!'/>
</form>
The actionscript i used on the submit button when converted is:
on (release) {
list="Newsletter";
action="add";
loadVariablesNum ("http://cp.cyberstation.co.uk/list.cgi", "0", "Post");
}
The button is also, along with the list and action variables, on the main timeline!
can anyone offer any insight to where i'm going wrong?
Working With Forms And Cold Fusion
i have this code in flash
function onSubmit() {
// Create a new LoadVars instance for the form data
formData = new LoadVars();
// Initialize formData variables:
formData.quantity = "";
formData.toppings = ["Cheese"];
formData.size = "";
// Gather the order information into a LoadVars instance.
formData.quantity = quantity_cb.getValue();
formData.size = sizeGroup.getValue();
toppingsObjectArray = toppings_lb.getSelectedItems();
for (var i = 0; i < toppingsObjectArray.length; i++) {
currentTopping = toppingsObjectArray[i];
formData.toppings[i] = currentTopping.label;
}
i want to output these variables using cold fusion onto a html page, however the normal output tags dont seem to work, can anyone help pls.
D
Forms Stopped Working When Upgraded To Fv8
Hello,
I have been searching for days on a fix for this simple problem. When I switched to Flash 8 I redesigned my site and have lost the functionality of my contact form. I know you guys get this question all the time - I've read all the post and applied the answers but to no avail. I keep getting blank emails from my form.
I was using simple php:
<?php
$to = "jd@jdmabry.com";
$msg .= "$name
";
$msg .= "$phone
";
$msg .= "$attendants
";
$msg .= "$date
";
$msg .= "$location
";
$msg .= "$time
";
$msg .= "$message
";
mail ($to, $subject, $msg, "From: My Booking Request Form
Reply-To: $email
");
?>
And my AS was just as simple:
on (release) {
if (name eq "" or phone eq "" or email eq "" or attendants eq "" or date eq "" or location eq "" or time eq "" or message eq ""){
stop ();
}else{
loadVariablesNum ("bookingform.php", 0, "POST");
loadMovieNum("ty.swf", 1, "GET");
}
}
This has worked for years until the upgrade. My host is the same.
If you could take the time to look for a problem please let me know.
You can see the site in action at http://www.jdmabry.com it's under "booking".
Thanks in advance for anyone willing to help. I'm at my wits end with what I know was simple. I'm just not a coder.
Simple Forms To Email
I am trying to create a simple web page with 2 input text fields at the bottom for users to input a company name and donation amount. I have these created in flash mx2004 version 7 but I don't know what actions to attach to them to have the information users input transferred to an email address. Any help would be appreciated.
Shannon
Looking For A Tutorial On Simple Forms
I am looking for a tutorial that will introduce me to setting up a simple feedback form in Flash MX and that hopefully covers sending the gathered user input to FormMail.
The tutorials I have seen so far, seem to concentrate on radio buttons, combo boxes, check boxes, styling, etc., as opposed to text boxes and textareas and how to send results somewhere.
Any suggestions?
A Few Questions In Regards To Forms: Simple
Stop animation repeating:
-if i want to fade my form using an alpha of 0% starting out then 10 frames later fade to 100% alpha, then how do i make it so it doesnt repeat itself? instead do it once as the form is loaded.
text component trouble:
i have text fields im using as input text fields. a tutorial that i learned from told me to start out by making a button and place the text in the up frame. this way when i drag the text button onto the frame i can fade it and do other things as its a symbol..
Problem
doing this i end up with TWO instance names, one on the button symbol and one when i drag it onto the scene. which one am i using? also in the code am i making my own variable or am i using the one i specified in the button scene
i put my questions down below
PHP Code:
function onSubmit()
{
// Initialize form variables:
formData = new LoadVars();
//ok so is this a variable i make up now or am i using the one i gave to the text box button?
formData.name = "";
// Get textbox info:
//is txtname the instance name of the textbox? if so which instance name? the one on the scene or the button
formData.name = txtname.getValue();
last question:
do i put the code in the frame/scene rather than the actualy submit button?
Simple Question About Referencing Forms
I have what I hope is a simple question. Could someone please provide a primer on how to reference forms (and things contained in forms) in AS2? Specifically, I am having trouble referencing a form loaded into another form. Here is my form structure:
Application
Form1
Form2
Loaded into Form1 is an swf containing another set of forms, with this structure:
NewApplication
NewForm1
NewForm2
So, how do I reference NewForm1 from Application and vice versa?
Thanks.
-Brian
Flash 8 Simple Collision Not Working
Hi,
I am creating a simple game in flash 8.
I dont have much skills in programming hence help required.
I have a game where users can drag and drop elements to build something.
when the user drags a part, on hitTest, that part becomes invisible while the other one becomes visible.
I tried removing the movie clip but that wont work.
here is my code
Code:
stop();
this.onEnterFrame = function():Void{
makeFinalPipeInvisible();
checkPipePlacement();
}
//start dragging pipe peice 01
this.pipe01_mc.onPress = function():Void {
trace("it");
startDrag(this);
}
this.pipe01_mc.onRelease = function():Void {
this.stopDrag();
}
//start dragging pipe piece 01
this.pipe01_mc.onPress = function():Void {
trace("it");
startDrag(this);
}
this.pipe01_mc.onRelease = function():Void {
this.stopDrag();
}
//start dragging pipe peice 01
this.pipe02_mc.onPress = function():Void {
trace("2");
startDrag(this);
}
this.pipe02_mc.onRelease = function():Void {
this.stopDrag();
}
//Functions start here ***
//This one sets the initial final pipe to invisible
function makeFinalPipeInvisible():Void{
this.finpipe01_mc._visible = false;
this.finpipe02_mc._visible = false;
this.finpipe03_mc._visible = false;
this.finpipe04_mc._visible = false;
this.finpipe05_mc._visible = false;
this.finpipe06_mc._visible = false;
this.finpipe07_mc._visible = false;
this.finpipe08_mc._visible = false;
this.finpipe09_mc._visible = false;
}
//Checks for hit test and makes final piece visible
function checkPipePlacement():Void {
if (this.pipe01_mc.hitTest(this.finpipe01_mc)){
this.finpipe01_mc._visible = true;
this.pipe01_mc._visible = false;
}else if (this.pipe02_mc.hitTest(this.finpipe02_mc)){
this.finpipe02_mc._visible = true;
this.pipe02_mc._visible = false;
}else if (this.pipe09_mc.hitTest(this.finpipe09_mc)){
this.finpipe09_mc._visible = true;
this.pipe09_mc._visible = false;
trace("game over");
}
}
A shove in the right direction would do a lot good.
thank you.
here is the fla
HELP - Simple Flash Buttons Not Working?
I'm working on a complete flash site and I was just putting together the last few pages. All of my buttons every where have worked fine until these last three I created.
I have a page with four different buttons on them all are supposed to take you to a different page.
The way I set it up is every page is on its own key frame and I have a "lables" layer so the buttons are supposed to go to the lable key frame which corresponds with the page key frame. All of the nav has worked fine until these four.
I double checked to make sure I named all the button instances correctly and double checked my action script (I just copied and pasted action script from the other buttons I used).
For some reason these four buttons will not work!!
Help?
Simple Flash .php Contact Page Not Working
I am building a contact info page in flash and using a php file to e-mail contact into back to me. it is also supposed to move to a success or failed frame depending on status. I am using Flash 8 AS 2, and her is what I have so far;
actionscript;
stop();
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
sender.onRelease = function() {
senderLoad.theName = theName.text;
senderLoad.theEmail = theEmail.text;
senderLoad.theMessage = theMessage.text;
senderLoad.sendAndLoad("http://stubelshe.com/turnaround-solutions/send.php",receiveLoad);
}
receiveLoad.onLoad = function() {
if(this.sentOk) {
_root.gotoAndStop("success");
}
else {
_root.gotoAndStop("failed");
}
}
sender=the name of my send button
here is my php script;
<?PHP
$to = "platinum2151@yahoo.com";
$subject = "Flash Contact Form Submission";
$message = "Name: " . $theName;
$message .= "
E-mail: " . $theEmail;
$message .= "
Message: " . $theMessage;
$headers = "From: $theEmail";
$headers .= "
Reply-To: $theEmail";
$sentOK = mail($to,$subject,$message,$headers);
echo "sentOk=" . $sentOk;
?>
not only is the mail not being sent, but it wont send me to the success or fail frames i have named.'
I have all of my actions set up on one layer of the timeline and all of the fields and send button on another. If I can get this working I am going to add more info, but this is a pain. Not a hard scritp and I cant fiure out what's wrong. I get no output errors or nothing. Any ideas?
Thanks alot
Simple Scroller Not Working When Loaded From Another Flash File
I saw the simple flash scroller tutorial online at http://www.flashkit.com/tutorials/In...-922/index.php and was wondering if anyone had a solution for a problem that I am having.
I have installed the simple scroll bar and it works fine, but I am using it inside of another flash movie. I have a flash console (console.swf) with buttons and am loading the backpages (images/profile.swf) to the site in from separate flash files. When I use the main console I have problems:
example: http://design.sevenpoint.net/bobby
-- > go to the Firm Profiles Area and click on Bobby D. Mims
now just pull the flash file up by it self: http://design.sevenpoint.net/bobby/images/profile.swf
-- > and go to Bobby D. Mims
Do you have any fix for this? Any help would be greatly appreciated!
Email Forms, Feedback Forms
I have posted the same topic on the other section but i thought perhaps this one would be more appropiate?
I need help with creating a feedback forms (name, phone nubmer, email, comments etc) in a flash site.
I have d/n a CGI script that comes with the tutorial in Flash Kit. and I also found a PHP scripts that i was told it should do the same thing.
I am new to BOTH, CGI or PHP whatever,
After i read the CGI mail form tutorial , it seems like i need to link the button to cgi-bin/whatever.cgi right? How about PHP? Questions is DO i just paste the PHP code in the action windows of flash MX or place the code in a html page that creates a seperate window?
What is easier for newbees like me and is there any easier approprach?
__________________
*!* I really need some help *!*
Forms, Nested Forms, And Masks?
Is there a way to provide a mask that applies to nested slides and forms? I have a structure that looks like this:
Form1
Slide1
SubSlide1
SubSlide2
SubSlide3
SubSlide4
SubSlide5
SubForm1
SubForm2
The app starts and shows Slide1 containing a background provided by Form1 then based on button rollovers the sub slides show with a nice fade transition. This all works GREAT.
When the button is clicked the selected SubForm1 or SubForm2 screens (which contain separate swf files) is displayed with a left to right “fly in” transition while the Slide1 is hidden with a right to left “fly out” transition. Now again this works great except for the fact that I need a mask so that the user does not see the SubForms flying from outside the bounds of Form1.
I have tried applying masks to ALL forms and subforms with no success (including the masks to forms in the external swf files on the SubForms.) Is there a way to make this work or do I have to use a loader component to make the mask work the way I want?
Thanks,
R. Sparrow
Simple, But Not Working For Me
here is the scoop.
I have 2 scenes. sceneA has movie clip on it. In the movie clip there is a button. I want that button to take the user to the sceneB in the movie.
This is my script:
on (release) {
_root.gotoAndStop("b",1);
}
I was thinking all I had to do is just go to the root and say goto and stop at sceneB (B). But that is not working.
Can some one please tell me what i'm missing.
So Simple, Yet Not Working At All
This has got to be one of the easiest questions to answer. Here's my code:
for (i=1; i<11; i++) {
loadMovie ("http://mysite.com/image" + i + ".jpg", i);
}
Shouldn't that load image1.jpg, image2.jpg, etc into levels 1, 2, etc? It certainly should, but isn't. Can anyone spot what I've done wrong?
Thanks.
Simple Url, Not Working In Cs3
i'm trying to attach a simple url link to a button, that worked fine in older versions of flash, but won't work in cs3
on (release) {
getURL("http://link", "_parent");
}
can someone tell me what syntax i have to use now, thanks
Simple But Not Working - Please Help
Hi,
I have created checkboxes dynamically in a loop. But now I can't able to place it in different locations....
Its simple but not working please help...
for(i = 0; i<5; i++){ //writing a for loop
import mx.controls.CheckBox;
createClassObject(CheckBox, "cb" + i, 1 + i, {label:"checkbox"});//creating checkboxes
cb1._x = 100;// this code works,but I want to assign the position in the loop.
cb + i._x = 10 * i; // i want something like this...
}
/*
If I assign position value for each it works
like
cb1_x = 10
cb2_x = 30
cb3_x = 50
cb4_x = 60
But I need it in the loop.
I tried like this:
cb + i._x = 10 * i;
*/
But not working .. please you have any idea why the position values are not assigning in the loop.
Please help
Simple But Not Working
I know its probably something simple, but I have been trying to get this to work, and its not. Can someone check it and see if they see what i am missing.
The problem is I have a movie clip acting as a drop menu, inside the drop menu there are two pages that need to load in an external window. I have all the code in place, but I can't get them to load. Can someone check this, i will put all the files needed on here.
When uploading I could not include the pdf's if you could just mimic a pdf, and see if you can figure it out.
Thanks,
Hammer
Very Simple But NOT Working
There's a very simple code which is NOT working:
if (Key.isDown(Key.DELETEKEY)) {
_root.gep._visible = 1;
_root.gep._y = _y;
_root.gep._x = _x;
}
The following happens: If I delete the line _root.gep._y, it's perfectly runing, If I delete the line _root.gep._x it's also working, but if both of two lines are in NOTHIG HAPPENS, it's runing without errormassage, but not changeing the visible, xpos, ypos. I can not understand, please help me.
Seems Simple...why Isn't It Working?
hey all,
on the first frame of my main timeline, i have nothing but a movieclip called "home_btn_mc" and then in an actionscript frame i have:
Code:
home_btn_mc.gotoAndPlay("onpress");
stop();
for some reason, the movie doesn't play at "onpress", it just stops there?
any ideas? probably something really basic that i'm overlooking. thanks for taking a look at it.
you can download my file at:
[url]
http://download.yousendit.com/68A74AC533FE0D88
[/url]
A Very Simple Preloader...not Working
I have got this from FLASH4 Help
And doesn’t work!
1Create a short animation loop at the beginning of the movie.
For example, you can create a loop that displays the message "Movie loading...".
2Create a frame action with If Frame Is Loaded that jumps out of the animation loop after all the frames are loaded and continues playing the movie.
For example, a movie that has a two-frame animation loop at the beginning would require the following action attached to Frame 2:
If (_framesloaded)
Go to and Play (3)
Else
Go to and Play (1)
End If
My movie has158 frames
The first 5 frames are: Loading/Loading ./Loading ../Loading …/Loading …./
Consequently I did:
If (_framesloaded)
Go to and Play (6)
Else
Go to and Play (1)
End If
The movie start with /Loading ..../till the end.
Anyone can help me?
[Edited by luciomaria on 12-30-2001 at 01:59 PM]
Simple Problem...not Working
I have a movieclip 'runner' that I want to bounce back and forth between x: 10 and x:200 slowing down at each end.
On frame 1, I have:
var xspeed = 5;
On frame 2:
if (runner._x > 200){
xspeed -= 1;
}
if (runner._x < 10){
xspeed += 1;
}
runner._x += xspeed;
On frame 3:
gotoAndPlay(2);
But when I run the movie, I get the runner clip and it just goes off to the right at blazing speed, never to return...
Thanks...
Simple Code Not Working? Plz Help
These are the actions of a movieclip, why doesnt it "refresh" after each movieframe? I want it that after each frame on the main timeline, it changes the variables of answer A B C and D (on a differnt movieclip). Anyone help? Thanks
Code:
<script>
on (press) {
_root.nextFrame();
if (_currentframe == 1) {
_root.answerA = _root.Q1A1;
_root.answerB = _root.Q1A2;
_root.answerC = _root.Q1A3;
_root.answerD = _root.Q1A4;
}
else if (_currentframe == 2) {
_root.answerA = _root.Q2A1;
_root.answerB = _root.Q2A2;
_root.answerC = _root.Q2A3;
_root.answerD = _root.Q2A4;
}
if (_currentframe == 3) {
_root.answerA = _root.Q3A1;
_root.answerB = _root.Q3A2;
_root.answerC = _root.Q3A3;
_root.answerD = _root.Q3A4;
}
if (_currentframe == 4) {
_root.answerA = _root.Q4A1;
_root.answerB = _root.Q4A2;
_root.answerC = _root.Q4A3;
_root.answerD = _root.Q4A4;
}
}
</script>
Simple Tween Not Working
I am trying to create a frog that walks. The frog has a body and four legs. The body is a movie clip symbol, the back legs are two mirrored copies of a movie clip symbol and the front legs are two mirrored copies of a movie clip symbol. I would like to make the frog look like it is walking. The legs are on the bottom layer and the body is on the top layer.
I tried to create two keyframes, then create a motion tween between the two. I then changed the later keyframe with two of the legs moved up a quarter inch.
When I do this, all four legs get grouped as a tween symbol and do a weird 180 degree flip perpendicular to the screen.
What's going on? How can I make the legs move up smoothly?
Thanks so much for your patience.
curlypinhead
Simple _global Not Working
This is so simple... Why is it not working?
BUTTON
code: _global.title = "gettingStartedTitle";
_ROOT FRAME
code: _root.titleBox.attachMovie(title,"newtitle",1);
What am I doing wrong? Shouldn't that work just fine?
Any suggestions? Thanks!
Simple Actionscript Not Working...
I've been programming for 12 years and for some reason Actionscript is turning out to be such a pain in the butt. So I would appreciate any pointers you may have.
What I want is very simple. I have multiple webpages all with the same flash header that plays from frame 1 --> 362 and at the end loops back at frame 70 --> 362 and so on. (Frames 1-69 should only play once)
onFrame (362) {
gotoSceneAndPlay("<current scene>",70);
}
That works great, however I don't want the first 70 frames to played everytime a new page opens. No matter what I try it doesn't work.
So what I do is pass a variable through the <PARAM NAME=FlashVars VALUE="startpos1=70"> in the HTML when I want to start mid-way through the animation. I can verify that it is actually passed and is seen as a string.
So what I tried to do is put the following code on the scene timeline. I can verify that the IF statement works, but for some reason the GOTOSCENEANDPLAY function is utterly ignored. What am I doing wrong?
onFrame (1) {
if (startpos1 eq "70") {
gotoSceneAndPlay("<current scene>",70);
}
THANKS!!
shawn@smallbizwebsites.net
Ugh Why Is This Not Working? Simple Onclipevent
OK here is what I'm trying to do.
I have rotating floppy disk that is triggered by a button.
When you roll over the button the floppy begins to rotate.
When you roll out the floppy will continue to rotate until you reach frame 15 where it will go to frame 1 and stop. The movie clip is assigned a name of floppy. I think the problem is with the if statement for the rollout for the onclipevent. Currently it all works but the rollout.
Any help would be appreciated.
Here is a link to the page:
www.zoosplace.com/preview/test.html
Here is the action script.
First frame in flash:
stop();
_root.floppy.stopfloppy=true
Floppy disk action script:
onClipEvent (enterFrame) {
if (stopfloppy) {
gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
if (rolloverfloppy) {
play();
}
}
onClipEvent (enterFrame) {
if (rolloutfloppy) {
if (_currentframe<14) {
_root.floppy.nextFrame();
}
if (_currentframe=15) {
_root.floppy.gotoAndStop(1);
}
}
}
Button action script:
on (rollOver) {
_root.floppy.stopfloppy=false
_root.floppy.rolloverfloppy=true
_root.floppy.rolloutfloppy=false
}
on (rollOut) {
_root.floppy.stopfloppy=false
_root.floppy.rolloverfloppy=false
_root.floppy.rolloutfloppy=true
}
Simple Motion Not Working?
on this attatched movie clip i can't figure out why the motion isn't working.. i attatched trace to key parts of the animation.. they all go off at the right times,, but theres no animation? What should happen is when you hit the audio button it expands and the off and on appear...
Someone Please Look At My FLA And Tell Me Why My Simple Preloader Isn't Working
http://s91931107.onlinehome.us/photography.fla
Button #1 loads the jpg when you click it, and the dynamic textbox displays percent loaded just fine. But how come the dynamic textbox says 100% before i click button #1, and why does it remain at 100% after the jpg is done loading.
Please take a look at my .fla, its probably pretty obvious to someone who knows what their doing. I'm new to this. Thanks!
Simple If Statement Not Working
I have my main swf that calls video.swf onto the stage. Video.swf had 12 emptyclips that load dynamic thumbs. Over the thumbs I have 12 buttons. b1, b2, b3 so on so on.
Im trying to disable the buttons if there is no thumb loaded into the emptyclip.
Here is what Im trying.
if(_root.mtclip.video.h6._url== "http://www.solidtorch.com/tnike/videos/thumb6.jpg"){
_root.mtclip.video.b6.enabled=false();
} else {
_root.mtclip.video.b6.enabled=true();
}
Ive tried _parent. _root, even using and onClipevent on the MC themselves. Cant get it to work.
Any ideas why?
Josh
Simple Fix : Why Is This Code Not Working.
on (release) {
_level0.solutions.play();
}
on (release) {
_level0.solutions2.play();
}
on (release) {
rnd = Random (3);
"_level0.shade" + rnd + ".play()";
}
I am returning to flash after a couple years and don't remember the syntax too well. I'm using flash5 and need to figure out why the last line is not playing my random MC? any help? Thanks
Simple Randomiser Not Working :(
Hi - Im using this random script - but its not working properly. on each frame of the randomiser MC is a different image. It seems to NEARLY work - but it never seems to show the 10th frame! ive tried everything but it dont work
this.randomiser.gotoAndStop(random(10));
any ideas would be MUCH appreicated - thanks
Simple Preload Not Working
hey guys i have fixed my problem but now the preload bar wont show up. so its time to rattle ur brains :P nah can yas try and show me wat you guys get.
Simple Function Not Working
I feel kind of silly asking this, but can anyone tell me whats wrong?
code:
function overButton (ClipName) {
trace("workingOver " +ClipName);
ClipName.submenu.surroundings.heading.colorTo("0x0 099FF",.2,"easeInOutSine");
ClipName.submenu.surroundings.heading.tween("_x",5 ,.2,"easeInOutSine");
ClipName.submenu.surroundings.back.alphaTo(100,.2, "easeInOutSine");
trace("workingover complete");
}
Say ClipName is "commercial" the trace comes out fine with commercial inserted. Even when i replace ClipName with "commercial" and hard code it in, the function works! but not with the parameter.
Can anyone tell me where im going wrong?
Cheers!
EDIT: Added [ as ] tags - jbum
Simple Code Not Working... Why?
Alright, I've just written up a simple script to put on the first frame of an MC. It isn't working, and I'm not sure why:
PHP Code:
stop();
for (var i=1; i<=6; i++) {
this["button"+i].index = i;
this["button"+i].onRollOver = playHighlight();
}
function playHighlight() {
trace("Hi, I'm button:"+this.index);
this.gotoAndStop(2);
}
To answer some simple questions:
-yes, the MC's im referring to are named button1-button6
-yes, this is on the first frame of an MC that comprises these buttons
-yes, i've tried tracing
-yes, I've tried adding the whole path (_root.blah.navbar.["button"+i])
I don't know what else to try. The trace outputs 'undefined' for this.index, where it should show up 1-6. I've written this code before in another file, and it worked.
Insight would be appreciated,
DaVuLf
Simple ActionScript Not Working
It just must not be my night to do flash, so can someone help me with my frustration?
I have a flash file that does its thing and calls up another .swf into a "screen". Works fine. My .swf file loads in. My problem is on that new swf file I have a animation on frame 1 that is its own MC. On frame 2, another mc loads in. Well when I test this file, it works, but when I run my main movie, it doesn't jump to the 2nd frame.
the action script i have is this:
stop();
_root.gotoAndStop("content");
This should work, but for some reason, the path is wrong. Again, when I run that swf file, it works fine, but when I run my main flash file, it does frame one and never goes to frame 2.
Thanks!
Simple Button Not Working
I have a presentation that has a movie clip that when you roll over, a menu appears. I then have a layer within that movie clip that contains some code to make the buttons actually work.
on (release) {stopAllSounds();
gotoAndPlay("pg1", 1);
}
It will work when Im in flash using "enable buttons" "enable scripts" But when I compile it to a swf. it it will only stop the sound and keep playing. It will not go to scene pg1 - frame 1
help....
Little Help? Simple 3d Code Not Working
I must admit that I just threw this together overnight, so alot could be wrong with it from a conceptual standpoint. All the same, it should work, hypothetically.
The code is barely commented, but it basically contains matrice concatenation functions that are used to define the coordinate locations of vertices within World, View,and Projection space. All of the math is based on the documentation for the Microsoft DirectX 8.1b SDK, and has worked well for me when programming in VB.
So...what's the hitch? Where's my cube?
Simple Code Not Working...
Anyone know what is wrong with:
Code:
if (Number(flowon) == 1) {
duplicateMovieClip("/dtemplate", "dust" add n, n);
n = Number(n)+1;
}
I get:
**Error** Symbol=particles, layer=logic, frame=41:Line 2: ')' or ',' expected
duplicateMovieClip("/dtemplate", "dust" add n, n);
**Error** Symbol=particles, layer=logic, frame=41:Line 4: Unexpected '}' encountered
}
|