What Is Wrong With This Actionscript?
I am not receiving any email.Code: stop();name = "";email = "";subject = "";comments = "";submit.onRelease = function() { feedbackpath = "mailto.php";str1 = email.indexOf("@");str2 = email.indexOf("@")+1;str3 = email.charAt(str1+1);str4 = email.lastIndexOf(".");str5 = email.charAt(str4+1);len = length(email);counter = 1;flag = 0;while (Number(counter)<=Number(len)) {Char = substring(email, counter, 1);if(Char ne "@") {flag = Number(flag)+1;}counter = Number(counter)+1;}if (name =="") {condition1 ="";namemark._visible = true;} else {condition1 = "ok";namemark._visible = false;}if (str4<=str2 || str3=="." || str5 =="" || Number(flag) != Number(len-1)) {condition2 = "";emailmark._visible = true;} else {condition2 = "ok";emailmark._visible = false;}if (subject =="") {condition3 ="";subjectmark._visible = true;} else {condition3 = "ok";subjectmark._visible = false;}if (comments == "") {condition4 = "";commentsmark._visible = true;} else {condition4 = "ok";commentsmark._visible = false;}if (condition1 == "ok" && condition2 == "ok" && condition3 == "ok" && condition4 == "ok") {loadVariablesNum(feedbackpath+"?name="+name+"email="+email+"subject="+subject+"&feedback="+comments, 0);gotoAndStop(2);}};reset.onRelease = function() { name = ""; email = ""; subject = ""; comments = ""; namemark._visible = false; emailmark._visible = false; subjectmark._visible = false; comments._visible = false;};
Actionscript 2.0
Posted on: Fri Nov 17, 2006 5:35 am
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Does This Actionscript Look Wrong To You?
i'm using this action script in a preloader, second frame. But when i test the movie in the flash player, or on a site, it loads and doesnt evenshow my preloader, then skips to the last frame of the next scene... What could be wrong here, I've tried everything.
heres the action script...
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes/1000);
totalkbytes = Math.ceil(totalbytes/1000);
if (loadedbytes == totalbytes) {
nextScene();
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop(_root.frame);
}
What's Wrong With This Actionscript?
Code:
for (i=0; i<_root.gridsize; i++) {
if (i<>_root.activering._name.substr(6)) {
trace(_root["object" add i]._name);
trace(_root["object" add i]._y-16.3);
trace(_root.activering._y);
trace(_root["object" add i]._x);
trace(_root.activering._x);
if (_root["object" add i]._y-16.3 == _root.activering._y){ && ((_root["object" add i]._x) == _root.activering._x)) {
_root["object" add i]._visible = true;
trace("Turn this object button on.");
}
trace ("Nothing happens");
}
}
The trace is showing instances which prove my if statement to be both truw and false, and yet I'm always getting a "Nothing happens" result, and never a "Turn this object button on."
I must be missing some small piece of information which is always causing a false result, but what is it?
Thanks.
Can Anyone Tell Me What's Wrong With This Actionscript....
take a look at this actionscript i made and let me know if you think it is wrong, because it only half works. The second password takes you to the right place, but the first password even if i type it right takes you to the password incorrect page......
[ACTIONSCRIPT]
on (release) {
// This is Level 2
if(password == "SD5P72K") {
gotoAndStop("Scene 1", 4);
}
// This is Level 3
if(password == "FP9U45D") {
gotoAndStop("Scene 1", 7);
}
else {
gotoAndPlay("passwordIncorrect");
}
}
[/ACTIONSCRIPT]
What Is Wrong With My Actionscript?
Hello all. I was wondering:
Keyframe 1
totalBytes = Math.round(getBytesTotal() / 1024);
loadedBytes = Math.round(getBytesLoaded() / 1024);
percentDone = Math.round((loadedBytes / totalBytes) * 100);
if (_root._framesloaded >= _root._totalframes) {
gotoAndPlay("1,3");
}
Keyframe 2
gotoandplay("1,1")
What is wrong with this?
Help With Actionscript.. Do Not Know What Is Wrong...
on (press) {
if (_root.chickenfly.chicken._x==-36.4&&_root.cheesefly.cheese._x==-49.1)
{saladfly.swapDepths(10)}}
'chickenfly' and 'cheesefly' are two movieclips on the main timeline. inside these two movie clips are two other movie clips named 'chicken' and 'cheese'.
i'm putting this script on a button.
the movieclips chickenfly and cheesefly are stopped when the movie is first played. but when i press on another button, the will play. after playing, 'chicken' and 'cheese''s x coordinate would be -36.4 and -49.1 respectively.
i want to make the movie clip 'saladfly' become the clip on top of all the others WHEN both movieclips 'chickenfly' and 'cheesefly' has played and this button i'm writing the script on pressed.
this flash i'm making is actually about putting together a sandwich. so the cheese, salad and chicken are on a 'shelf'. if i click on the cheese, i want to cheese to fly down onto the table, same for the chicken and salad. I have managed to make them do this already.
The problem i have is that, let's say i click on the food in this order: cheese, chicken salad. I want the cheese to 'look' as tho it's on the bottom, the chicken in the middle and the salad on top. the way i came up with to do this is to write teh code i posted above. when cheese has been clicked on and moved to the table, i found its x coordinate and instructs salad to swap Depths with cheese if cheese is at that x coordinate. after swaping depths, salad will look as tho it's on top of cheese.
any suggestions to what i can do?? Thanks!
I Don't Know Where I'm Going Wrong In Actionscript
Hi ive been following instructions for buttons and preloaderbars and, I always check syntax and it says theres no errors then when i export lots of errors comeup. This what i type into actionscript in one big clump, but I no there in the right places
stop();
onClipEvent (load) {
total = _root.getBytesTotal ();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded ();
percent = int (loaded / total * 100);
text = percent + "%";
gotoAndStop (percent);
if (loaded == total)
{
_root.gotoAndPlay (2);
}
}
I don't know wether i need a setting on, at 1st i though expert mode but found out mx dosen't have that.By the way this was for a loading bar if anyone has one they don't mind me using. I would only use it for abit then i would look into the actionscript and make my own
Plz feel free to email me at sam@tickle.co.uk
What Is Wrong W/my Actionscript
This actionscript is for a bouncing ball. But when I put it on the ball it does not bounce from each side of the 550x400 flash animation. It goes down five pixels, left five pixels and then right back up
Code:
onClipEvent(load) {
speedX = 5;
speedY = 5;
}
onClipEvent(enterFrame) {
this._x += speedX;
this._y += speedY;
if (this._x >= 550) {speedX = -speedX;}
else if (this.x <= 0) {speedX = -speedX;}
if (this._y >= 400) {speedY = -speedY;}
else if (this.x <= 0) {speedY = -speedY;}
}
HELP Actionscript Going Wrong?
Firstly I would like to say that I am new to Flash and am still learning as I go along, so I am still trying to get my head around the "complications" of actionscript and how it works. I am using FLASH MX v6.0.
Secondly,
Please help me, I don't know what I am doing wrong... aaaahhhhh
I have been working on a website for the advertising agency which I work for, and currently it is near the stage of completion. Well I thought it was... In brief the website is very simple and is about 8 pages all up and I have created it so there is one main .fla file and the other sections (.swf files) load into the main file.
My only problem which I have come across is that there is something I have written wrong in the actionscript of the swf files loading into the main file. I say this because my pre-loader is exactly the same for the main file, but when it pre-loads for the subsequent files (swf files in other sections) the pre-loader blinks on/off then goes back to the main file. It doesn't sit and load like it should. The pre-loader is a component which I downloaded from a website: http://www.kirupa.com/developer/mx/p..._component.htm
I guess the best way to see my problem for yourself is to see an uploaded version of it.
http://www.mercuryadvertising.com.au/2007mercury.html
Hopefully this will help you pro's out there to see whats going on and you could maybe help me and tell me what to do correctly. If you want a copy of the FLA files to see how I have made the site, please feel free to PM me with your email and I will send you a copy.
Hope to hear from you guys with your comments!
What Is Wrong With My ActionScript Here?
I have attached this .fla in hopes somebody could tell me why I can't the fade effect to work properly.
I've been working on this project for awhile and I can't seem to get this one thing to work.
I put a black background and set it to Alpha of 0. And placed an actionscript for it.
Then I placed an actionscript for the word Ascent that's a button.
Now what it's supposed to do is I press Ascend, it loads the .jpg, the black background is loaded at the same time, then I press on the black background and it disappears. Why is it not working the way I stated?
Anybody have any ideas.
I used this actionscript for another project and it worked fine.
Actionscript Is Wrong?
Below is a piece of working script I found on the internet:
on (release) {
}
This code means that 'When the corresponding button is released, the following happens:'. This code works fine.
However, if one selects 'onRelease (Button)' from the actionscript menu, they are presented with this:
not_set_yet.onRelease = function() {
}
It's not even vaguely reminiscient of the previous script. This script is also found in the help file under 'onRelease'. This script does not work; no matter what you do to it (Short of editing it so much that it is identical to the other script) the script just gives you an error alert. Now, what's going on here? Firstly, why did Macromedia add this phony code to their actionscript library? Where did it come from? Surely it must have originated from somewhere. Secondly, why has Adobe not fixed this problem in Flash 9, where the same problem still exists!? Were there no reports of this? I find that hard to believe.
If this code truly is correct, and I'm somehow using it wrongly despite following the exact tutorial of the help file, then why does the code at the top of this post work as well? If the one in the actionscript library works, why is there a much simpler line of code that performs the same function perfectly?
I will say, hats off to whomever first managed to create the working script.
I'm not sure what responce I'm hoping to get on this, it just confuses me. Can anyone shed any light on this?
What's Wrong With My Actionscript?
I've been tryign to create a centered pop up window (as per the kirupa tutorial), but every time you click on the button to launch the pop up it also replaces the original page (the one with the button) with a blank page.
Here's my code for the button that launches the pop up...
on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = "www.recoverychild.com/recoverymailing.html";
target_winName = "mailinglist";
width = 300;
height = 200;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 0;
resizable = 0;
//sends data back to the function
openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}
Here's my code for the global actionscript...
_root.openWinCentre = function (url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {
getURL ("javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open('" + url + "','" + winName + "','" + "width=" + w + ",height=" + h + ",toolbar=" + toolbar + ",location=" + location + ",directories=" + directories + ",status=" + status + ",menubar=" + menubar + ",scrollbars=" + scrollbars + ",resizable=" + resizable + ",top='+((screen.height/2)-(" + h/2 + "))+',left='+((screen.width/2)-(" + w/2 + "))+'" + "')}else{myWin.focus();};void(0);");
}
Please help! What wrong in my actionscript????
Thanks in advance!!!
What Is Wrong With My Actionscript?
onClipEvent(load){
if(Key.onKeyDown("<Right>")){
play();
}
if(Key.onKeyUp("<Right>")){
stop();
}
}
what is wrong ? my figure just plays, and i can't neither play it or stop it :'(
What The HELL Is Wrong With This Actionscript? Please Help
OK, my clock actionscript is completely BONKERS! Just check out the attached .swf file.
I have an mc with two frames and two layers. Layer 1 has the dynamic text, pointing to variable 'dynaclock'. Layer 2 has actionscript in frame one and frame two. Something like this:
Frame1:
mydate = new Date();
dynadate = mydate.getDay() + "." + mydate.getMonth() + "." + mydate.getYear() + "
";
dynatime = mydate.getHours() + ":" + mydate.getMinutes() + ":" + mydate.getSeconds();
dynaclock = dynadate add dynatime;
Frame2:
gotoAndPlay (1);
Now this should work, but take a lookie at the swf (http://www.kikencorp.com/clock.swf). It's completely buggered! The time always adds an ahour, and teh date is completely screwed up.
What am I doing wrong?
Any help apreciated
Whats Wrong With This Actionscript?
Code:
onClipEvent (load) {
this._x=30;
this._y=30;
xspeed=5;
yspeed=5;
}
onClipEvent(enterFrame)
{
this._x=this._x+xspeed;
this._y=this._y+yspeed;
}
Anyway, the ball won't move, I just don't get it, help!
Help What's Wrong With My Actionscript On My Platformer?
please help me with this code...I am having all sorts of problems ever since I put in the bit to make the dude jump.
code:
//every frame it enters
onClipEvent(enterFrame){
//if it's touching the platform, stop it
if(this.hitTest(_root.bg.platform)==false){
this._y+=_root.gravity;
}
//if you want to move rihgt, move right
if(key.isDown(Key.RIGHT)){
_root.bg._x-=_root.speed;
this.gotoAndStop("walking");
this.player.play();
}
//if you want to move left, move left
else if(key.isDown(Key.LEFT)){_root.bg._x+=_root.speed;
this.gotoAndStop("walkingback");
this.player.play();
//if you aren't already jumping...
else if(_root.jumping==false){
//and you want to jump, then jump
on(keyPress "<Up>"){
_root.jumping=true;_root.character.gotoAndPlay("jumping");
}
}
//otherwise, stop where you're at
}else{
this.player.stop();
}
//if you hit a wall, you can't go farther
if(this.hitTest(_root.bg.wall)){
_root.bg._x+=_root.speed;
}
if(this.hitTest(_root.bg.wall2)){
_root.bg._x-=_root.speed;
}
}
EDIT: Changed [ quote ] tags to [ as ] tags - jbum
Whats Wrong With The Actionscript In My Preloader
Hi there,
I'm fairly new to actionscript and have been having a few problems with my preloaders. I want a preloading that loads a different.swf and then runs it.
So far I have 3 frames.
In frame 1:
loaded=level1.getBytesLoaded();
total=level1.getBytesTotal();
In frame 2:
level1.loadMovie( "artistpreloader.swf" );
In frame 3:
if (loaded < total) {
percentageOutput = int ((loaded/total) *100);_root.bar._xscale=percentageOutput;
} else {
level1.gotoAndPlay(1);
}
And thats it. On another layer I have a some text saying "loading" and on another I have a movie instance called bar (the movie has a slim filled rectangle that has been grouped)
Can anyone help me out?
Thanks
Graeme
This Actionscript From Flash 5 Plays Wrong In MX
This code on an mc used to produce a beautiful bounce! in flash 5 anyway, now it does not work in flash 6, help?
---------------------------------
onClipEvent (load)
{
//initiialize variables
this._x = 100;
this._y = 100;
// create a new method to bounce movieclips
MovieClip.prototype.bounceMove = function(spring, damping, xtarget, ytarget)
{
// calculate acceleration
accx = spring*(xtarget - this._x)-damping*velx;
accy = spring*(ytarget - this._y)-damping*vely;
// change velocity due to acceleration
velx += accx;
vely += accy;
// change position due to velocity
this._x += velx;
this._y += vely;
}
MovieClip.prototype.bounceScale = function(spring, damping, scale)
{
// calculate acceleration
acc = spring*(scale - this._xscale)-damping*vel;
// change velocity due to acceleration
vel += acc;
// change position due to velocity
this._xscale += vel;
this._yscale = this._xscale;
}
}
onClipEvent (enterFrame)
{
// bounce up if mouse is over, down if not
if(bounceUp)
{
this.bounceMove(.9,.2,100,200);
this.bounceScale(.5,.25,132);
}
else
{
this.bounceMove(.2,.2,100,200);
this.bounceScale(.5,.75,100);
}
}
----------------------------------------------
Actionscript Button Codes Gone Wrong?
Hello there! Im pretty new to "FlashKit" Ive used "FlashKit" Itself for help on flash but then i look around and im just like.. Wait a minute.. Theres a fourm?!?! So here i am.. Anyway. I have a short question. The other day i was working on a little RPG kind of game. The one with the buttons where you click to go in a door, Click to go in the next room, Click to read something and so on.. Anyway. I have used the code below..
on (release) {
gotoAndPlay(Whatever Frame ...);
}
to make the buttons. Where it says whatever frame in the code that would be where i put my frame number. This worked for a while untill i got to like my 6th or 5th frame. Once i got there the buttons wouldent do anything when i made them.. And i also made sure that i had a stop(); code on each frame. Could someone help me and or tell me what ive been doing wrong? Or is this just a glitch in flash? O yeah. I dont know if this matters but im using flash pro 8.
EDIT: Is this in the wrong section? Because i just noticed theres a actionscript section hahah.
Thanks
flashnewbie99
[CS3] AS2 Actionscript Tween Whats Wrong?
Hey guys, why isn't this working?!?!?
PHP Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var moving:Boolean = false;
up.onRelease = function() {
pickup(itemmc);
}
function pickup(who){
var ypos = who._y;
if (ypos <148.6){
if(!moving){
var tw:Tween = new Tween(who,"_y",Bounce.easeOut,ypos,ypos+111,1,true);
moving = true;
}
}
}
tw.onMotionFinished = function(){
moving = false;
}
down.onRelease = function() {
if (!moving){
drop(itemmc);
}
}
function drop(who){
var ypos = who._y;
if (ypos >-184.4){
if(!moving){
var tw2:Tween = new Tween(who,"_y",Bounce.easeOut,ypos,ypos-111,1,true);
var moving = true;
}
}
}
tw2.onMotionFinished = function(){
var moving:Boolean = false;
}
the idea is, i only want you to be able to move the "itemmc" movie clip when it has finished its tween (if moving = false.... tween), but at the moment it seems to be ignoring this and it lets me move it at any stage of its movement.
feel free to dl my fla, i had to take off the frame around it to keep file size down, but it is really important that each movement stops at at the right point before you can tween it again.
thanks in advance
Actionscript Created Dynamic Textfeild Uses Wrong Font. I Need A PC Instead Of Mac?
(deleted former similar post for very unclear title)
I have a font problem, and I suspect it's Mac-related. I use a PC at work, but I now don't have access to Flash 8 at work, and (of course) the font I need is not available for my Mac. Without a PC, I can't seem to fix my embedded font problem.
I have a dynamic text box created with actionscript and the font is linked in the library, but for some reason it won't work. It uses device fonts, no matter what. Can anybody out there with a PC help? Is that what's wrong, or have I embedded the font wrong? .FLA attached
Thanks in advance for any help ...
Eileen
Using XML/Actionscript To Show An Image In Flash MX 2004 (What Am I Doing Wrong?)
Heya,
I was wondering if someone could look at this coding that I am using to display XML data. Currently everything loads perfectly except for the thumbnails and I really cannot figure out why or how to make it work. All thumbnails are .jpg's so that's not the issue, I know it has to do something with the coding.
Quote:
if (items[i].attributes.type == "article") {
// create variables for our elements
var article_title = items[i].firstChild; //
var thumb = items[i].childNodes[1]; // second child node
var item_mc = menu_mc.attachMovie("menu_item","item"+item_count, item_count);
item_mc._y = item_count * item_spacing;
item_count++;
//
item_mc.title_txt.text = article_title.firstChild.nodeValue;
item_mc.picture.MovieClip = thumb.firstChild.nodeValue;
Any help would be greatly appreciated as is this problem is the only one left I need to solve. If there's anything else you need to help further, please let me know and I'll reply ASAP.
-Ind
Is My Whole Layout Just Wrong, Wrong, Wrong
I have uploaded my layout, I am starting to think that this is not how its done, I will explain.
I have one main swf where I have 5 diffrent section where I want to load 5 different swf into, but I also need one of the swf's which would be a button based one to be able to comunicate with the other 4. I totally think now tehre is an easier way of doing this than the way I'm doing it, can someone help me out here cos as you guy's know, the roots of a good page is in the layout at the begining.
I have uploaded my swfs so you know what I'm talking about.
Please, please comment...
Function Went Wrong....very Wrong.
Okey so i made a function that should, make two movieclips (balls) move around bouncing the edges of the screen....
but something is wrong... plz help...
when i start the movie, the whole picture is moved down to the right, and the balls aint moving, thou i can drag them around...
PHP Code:
left = 0;
right = 550;
top = 0;
bottom = 400;
xspeed = 5;
yspeed = 5;
ball01.onPress = doDrag;
ball01.onRelease = noDrag;
ball01.onReleaseOutside = noDrag;
ball02.onPress = doDrag;
ball02.onRelease = noDrag;
ball02.onReleaseOutside = noDrag;
ball01.onEnterFrame = ball;
ball02.onEnterFrame = ball;
function doDrag() {
this.startDrag();
this.dragging = true;
}
function noDrag() {
stopDrag();
this.dragging = false;
}
function ball() {
if (!dragging) {
_x = _x-xspeed;
if (_x-_width/2<left) {
_x = left+_width/2;
xspeed = -xspeed;
} else if (_x+_width/2>right) {
_x = right-_width/2;
xspeed = -xspeed;
}
_y = _y-yspeed;
if (_y-_height/2<top) {
_y = top+_height/2;
yspeed = -yspeed;
} else if (_y+_height/2>bottom) {
_y = bottom-_height/2;
yspeed = -yspeed;
}
}
}
Actins:wrong Syntax=correct, Right Syntax=wrong
Has any body made a similar observation:
when I want to load a pic into mc and write
_root.loadMovie("pic.jpg","mc");
I get a little window just the size of my pic but not my stage. But when I write:
_root.mc.loadMovie("pic.jpg");
everything is fine. I have a Mac, OS9.1. Is this related to the flashplayer in mac or what?
What's Wrong With This?
When I click the button, this AS should run;
on (release) {
ggg = getTimer();
}
In the fram I also have an MC with an animation in it. I do not want the animation to run at load, but to hold a few seconds, and then start running.
onClipEvent (Load) {
stop();
}
if (ggg = ggg ++ 3000) {
MC.play();
}
But, apparently there's something wrong, 'cause when I execute my movie Flash says that there's a ')' missing, but I cannot understand/locate where! I think that it has something to do with my equation in the if-action.
Btw, the script doesn't work in action, the animation starts immediately
What's Wrong?
hello!
i want to publish in flash 4 format.
i have got a button in a movie clip called 'nav' which is nested in a movieclip called 'navigation' which lives on the main timeline. on releasing the button i want the 'navigation'-movie to play. this is what i have got but it does not work. it forces the movie to start at frame one of the main timeline:
on (release) {
tellTarget ("_level0.navigation") {
play();
}
}
_root.navigation did not work at all.
what's wrong with it? or talking basic: how to target another clip in flash 4?
thanks for any help,
elo.
What Am I Doing Wrong?
Can anyine help what am I doing wrong?
Have a menu that I am trying to load variables into from a perl script. Within the script i placed the variables so that it would load into flash:
<PARAM NAME=movie value="/dragg2.swf?category={$ARGV[1]}&item={$ARGV[2]}">
Than in flash i have a button with the following:
on (press) {
loadVariables ("auction.cgi", "$ARGV[1]&$ARGV[2]&$firstbid[0]");
}
on (release) {
getURL ("http://www.sitename.com/cgi-bin/auction/all_categories.cgi?ask&category=$ARGV[1]&item=$ARGV[2]");
}
What's Wrong?
i'm creating a dynamic pie chart based on the tute i found here in flashkit. i have this part in my the AS:
aCount = new Array(47, 4, 23, 2, 4, 1, 13, 2);
aCategory = new Array("HEAD", "CDROM", "CONN", "MM", "COB", "DAT", "FDD", "PM",);
nElements = aCount.length;
aColor = new Array(0x339900, 0x0000FF, 0xcc66cc, 0x00cccc, 0x9933cc, 0xcc66cc, 0xcc33cc, 0x3366cc);
aPercent = new Array(nElements);
nDepth = 1;
but when i preview my movie i keep getting these errors:
Scene=Scene 1, Layer=Layer 1, Frame=1: Line 2: Operator '=' must be followed by an operand
aCategory = new Array("HEAD", "CDROM", "CONN", "MM", "COB", "DAT", "FDD", "PM",);
Scene=Scene 1, Layer=Layer 1, Frame=1: Line 3: ')' or ',' expected
nElements = aCount.length;
i can't seem to understand the error since im not that good in scripting stuff. hope someone could point me out what's the error all about and how could i remedy it. thanks in advance
Something Wrong Wif My Key Pls HELP
I put a "Pause_Play" MC on the layer "Actions", and write the following in the Object Actions,
onClipEvent (enterFrame) {
if (Key.isDown(80)) {
stop ();
}
}
but when i do a Test Movie, the movie doesn't stop uppon pressing "P" on my keyboard. Why?
What's Wrong ? Help Me Please :(
What do you think about this flash ? What's wrong with it ? when it loads for the first time, it ask a quastion to cancel some scripts, then when you refresh the page all is correct ! Help me please.
http://www.navid.8k.com/baha/
Don't Know What Went Wrong...
Here's my current situation:
I have 2 scenes,"mainsite"(contains my main website) and "preloader" (which is my ...erm...preloader).
In my mainsite timeline, i have 3 frames. In frame 1 i have this:
virgin = 1;
in frame 2 i have a stop(), and frame 3 onwards is an animation.
Now, in frame 2 i have an MC which contains a 30-frame animation. at frame 30, i have this:
stop ();
if (_root.virgin != 0) {
_parent.gotoAndPlay("mainsite", 3);
}
What im trying to do is to get the MC animation to finish playing before playing the animation in my main timeline.
Everything worked perfectly, UNTIL i inserted my preloader.
In frame 1 of my preloader i have this:
ifFrameLoaded ("mainsite", 18) {
gotoAndPlay ("mainsite", 1);
}
After i did my preloader, my "mainsite" gets stuck at frame 2, where my stop() is.
Anyone knows where the problem lies? Thanx...
What Went Wrong?
when I tried to reply on a question in a previous thread my computer hung and then the thread broke. so here the question again. sorry albywalbywoo for not answering on your reply.
you asked for more details on the problem though....well I hope this will do
I have a scrollbarr wich scrolls dynamic txt (pretty nice design by ilanJ). It loads .txt files with loadvariables from the root of the same folder where the .fla is in.
I format these files using HTML tags.
For lots of things this works just fine, but I want to use a button in this .txt file that can play a MC in flash....
hope that's enough informtion about it
thanks
Can Someone Tell Me What's Wrong With This?
I am trying to set a conditional statement to test to see which button is pressed. If button01 is pressed then load "movie01.swf" into level 1, if button02 is pressed then load "movie02.swf" into level 1, and so forth.
I attached the following to a mc on the root timeline of level0
the buttons are also on this level as well.
-------------------------------------------------------
onClipEvent (load) {
var button01 = "1";
var button02 = "2";
var button03 = "3";
}
onClipEvent (enterFrame) {
if (button01 == "1") {
loadMovieNum ("movie01.swf", 2);
} else if (button02 == "2") {
loadMovieNum ("movie02.swf", 2);
} else if (button03 == "3") {
loadMovieNum ("movie03.swf", 2);
}
}
-------------------------------------------------------
and then this to the buttons accordingly
on (release) {
button02 = "2";
}
I am unable to get it to work.
can you tell me what it is I am doing incorrectly?
Thanks
Do Not Know What Is Wrong
Hi everybody! I am kind of new to Flash and just completed my few first sites that posed two problems that I can't figure out myself.
1)My last site i did would behave differently on diffrent screen sizes running on identical systems. It's realy strange. On my computer it works perfectly as well as on many others. But since i had lots of people going to the site i've got number of complaints that site is not working. People would say that nothing is moving and they can not get to diffrent sections. It's seems to be only a problem on smaller monitors (however I am not completely sure). So if you people could go and see it (it's http://www.zeitny.com) and if you incounter the same problem and know how to fix it please let me know 'couse i am going bananas.
2)Also if somebody could give me a hint how to do those java pop-up windows i also would be very gratefull.
Thanks for your time
Pete
What Wrong With This
just won't work...is this right?
_level50.Area.gotoAndPlay("areaDropOut");
basically I am trying to target a movieclip thats on the _root of level 50 called area and get that clip to go to a frame called "areaDropOut" within it...
what's wrong with it..am I going mad..
stu
Why Is This Wrong?
stop ();
function createButtons(){
// create the invisible buttons!
for(i=0;i<6;i++) {
for(k=0;k<6;k++) {
attachMovie("masterpiece","button"+i+k,4);
_root["button"+i+k]._x = 183.3 + (i*56) ;
_root["button"+i+k]._y = 24.4 + (k*50);
}
}
}
i want it to make 36 movie clips like this (all on one layer, they arent going to move)
should be:
x x x x x x
x x x x x x
x x x x x x
x x x x x x
x x x x x x
x x x x x x
what really happens
x
tell me why
Help..what Could Be Wrong In Here?
Here is the problem:
I Have two Swf right?
and in the second swf file I want to link to the second scene of the first swf file (scene1,since the first one is named as preloader, and only for this time I would like to skip it )
I am doing something like this
In the first frame of the first swf file:
var x;
x = "1";
y = _level0.x;
if (y==1) {
gotoAndPlay (1);
} else if (y==2) {
gotoAndPlay ("Scene 1", 1);
}
then
in the second swf file in the first frame:
var y;
y = _level0.x;
and in the button of the second swf file:
on (release) {
loadMovie ("ano1.swf", "gotoAndPlay (_level0.x)");
}
The problem is that this do not work.
Any Help? Please?
thanks
Am I Doing Something Wrong?
The musicloops I download from flashkit won't loop as I want 'em to loop. What I mean is there's allways a little "hack" in the end of the loop. Am I doing something wrong or do I have to live with this? Maybe I should mention that I download the loops as Mp3.
//raw
What Am I Doing Wrong?
im trying to get a scrolling text box with a text source from flash 4 to work when i import it to flash 5 .......all i get is when i try to manipulate the script is " the script wasnt copied due to errors" what can i do???
WHAT'S WRONG WITH ME?/
Why the heck won't this syntax work???? It's pissing me off to no end (pardon my french).
on (rollOut) {
nav = "nav services";
}
on (rollOver) {
tellTarget ("services") {
play ();
if (nav = "blank") {
} else if (nav = "nav services") {
tellTarget ("services") {
stop ();
}
}
}
}
Initially, the variable "nav" is set to "blank" in a timeline frame. What I want to happen is to when I rollOut the hotspot, I want the variable "nav" to be set to "nav services" so that if you roll over the hotspot again and nav = "nav services" the movie it's calling won't play again (and return to it's initial invisible state) ... here's the link. PLEASE HELP ME!!!!! I'M AN IDIOT!!!
http://www.20202020.net/allnetnav.htm
thanks a million,
greg
420
What Am I Doing Wrong.....?
Hello pplz,
Here i am generating some sort of count down based upon a fixed date (lets say may 15th, as used in the code below)
If i can still do some calculating i should get a result somewhere (counted from this post's entry date March 22) around the 55, but when running this script the result displayed in my swf doesn't go further than 39
is there anyone in the house that can tell me what goes wrong down here......
//-------------CODE--------------------------------
now = new Date();
dateNow = now.getDate();
monthNow = now.getMonth();
daysInMarch = 31;
daysInApril = 30;
daysInMay = 15;
if (monthNow == 1) {
daysLeftInMarch = daysInMarch-dateNow;
daysLeft = daysLeftInMarch+daysInApril+31;
} else if (monthNow == 2) {
daysLeftInApril = daysInApril-dateNow;
daysLeft = daysLeftInApril+31;
} else if (monthNow == 3) {
daysLeftInMay = daysInMay-dateNow;
daysLeft = daysLeftInMay+31;
} else {
daysLeft = 31-dateNow;
}
DateCount = daysLeft;
//----------------CODE-------------------------
Thanx in advance
No No No You Got Me All Wrong Man
ok, what you see on that link, this is how I did it:
1. I make 5 MCs, and place them off the stage, and give them names.
2. I make 5 instances of my button - 1btn per MC.
3. when I roll over button 1, it moves MC1 from it's orig. location (off-stage) to a new location on the stage.
4. when I roll out of button 1, MC1 goes back to original position.
I do this for every button, referencing each MC.
**********************
now what I REALLY want to do, is to make MC1 fade away after I roll out of button1, so it doesn't go away instantly, but rather fades away.
**********************
sid
What´s Wrong Here?
Hello all. Have a look at this:
------------------------------
var1 = 1;
var2 = 1;
if (var1 == 1 && var2 == 1) {
trace ("Result OK");
} else {
trace ("Operation Failed");
}
------------------------------
Is this script ok?, If it is, why it returns
"Operation failed".
Thanks for having a look, I´m stuck in there.
aX--.
What Is Wrong HERE?
The MC is duplicated just fine but it won't go away afterwards!
onClipEvent(enterFrame){
if(this.hitTest(_root.view)){
pylon2.duplicateMovieClip("pylon2", "pylon2"+_root.i,1);
_root.++;
_root["pylon2"+i]._x=200;
_root["pylon2"+i]._y=200;
}
else
{
_root["pylon2"+i].removeMovieClip();
}
}
I've tried many MANY different combinations.
What's Wrong?
What is wrong here?:
stop ();
if (Key.isDown (Key.UP) && Key.isDown (Key.RIGHT)) {
nextFrame ();
}
It won't work
Thanks
What Am I Doing Wrong ?
can someone please tell me what i've done wrong, i have two movie clips. One of them is not suppost to move and the other is moved using actionscript which increases the x value of the movie using setproperty.
However when i do this although i have given each movie a different instance name and am only changing the x value of one movie they both move across the screen.
Why is this happening ???
|