Flash 8 Game Issue, Dont Know How To Fix..
i have a flash game i'm making for a class that's due on wednesday. it's a take on the space invaders type game and so far everything works except when i shoot the "aliens" they don't disappear. when the bombs drop on me they don't kill me either. is there anyone that can just take a look at the .fla and let me know if i missed something? thanks.
Adobe > Flash General Discussion
Posted on: 12/11/2006 09:44:28 PM
View Complete Forum Thread with Replies
Sponsored Links:
My Bullets Dont Work In My Game >.<
I have a ship mc on the stage called "hero" and a bullet mc off the stage called "bullet". When you press space, the function below called fireBullets() is triggered, but its not working how I want it to, of course. When you shoot a new bullet, there should be another one following behind the first, but instead the bullet already shot disappears and a new one appears in front of the ship. Maybe Im just not using the right strategy, but this is really aggravating me. Any help appreciated!
var i;
function fireBullets() {
if (i >= 2) {
//this should happen AFTER the else statement
_root[newname].duplicateMovieClip(newname);
i++;
} else {
var newname = "bullet"+i;
bullet.duplicateMovieClip(newname);
i++;
}
_root[newname]._x = hero._x;
_root[newname]._y = hero._y-38;
var newname = "bullet"+i;
}
View Replies !
View Related
Memory Usage And Bitmapdata Issue In Flash Game Design
We have a huge movieclip of 5000 by 5000 pixels with different (transparant) layers.
We can make an instance of the movieclip and work with it, we can move layers, scale them, ...
But as soon as we add the MovieClip to the stage the ram memory-usage jumps to 200 MB!
My guess is that flash retrieves all the bitmapdata from the MovieClip (all 25 million pixels) so it can display it. And all this data takes up around 200MB.
For cpu performance and obviously the memory-issue we use bitmapdata with clipRect to extract a single 'screenshot' of 600 by 400 and add that to the stage instead of the entire mc.
At first the memory-usage is reasonable, but as we start to explore the map it goes up again. It keeps rising to the point that, when you have explored the entire map, the memory-usage is back at around 200MB, same as when we added the mc to the stage.
We use BitmapData.dispose() but this doens't seem to help either as the garbage-collector doesn't free up the ram instantly.
We tried using tiles, we cut the entire mc up in tiles and added and removed the necessary tiles, but again, the memory starts low and rises as we explore the map.
It's hard to believe that all those papervision-applications run so smoothly using BitmapData while we only use a couple large jpg's and have such extreme memory-usage.
Is there any way to make the garbage-collector pass (we use flash player 9) or reduce the memory-usage?
Any help or tips would be greatly appreciated!
View Replies !
View Related
Game Issue
I was wondering If you guys could help me out. I got this game I am working on and I am trying to get a cannon to point towards the mouse an then fire a cannonball on command in that direction. I have gotten the cannon to fire but It will not rotate properly. Here is the fla.
http://members.chello.se/zack/firetest.fla
View Replies !
View Related
Little Game AS Issue
I'm doing a llitle game on flash. The user has to find out what a person is like by typing in a box, for example, the color of the hair.
The code it's pretty simple but i have no idea why it's not working.
This is how it should work. If the person types "rubio" (which is a hair color in spanish" and presses the button next to the text box, the movie clip that is above a pictue of a baby not letting see what's under it, should play so the graphic in it fades to alpha 0%.
This is the As of the button:
on (press) {
if (tpelo=="rubio") {
mcpelo.play;
}
else {
mcerror.play;
}
}[/as]
tpelo= the variable name of the input text field
mcpelo=movie clip that fades out to reveal the photo underneath
.fla MX04 here: http://www.libreriaplatero.com.ar/quien.zip
i checked and there's no syntax error
Can anyone help me? please???
View Replies !
View Related
Tile Game Issue
I'm using a script based on Mahesh Kokadwar's "puzzle" game. I'm trying to modify it's controls to keyboard activated rather than onPress. To simplify, I'm having trouble getting just the arrow keys to work rather than just any onKeyDown to work.
I've read up on "switch" and "case" and understand it but for some reason it isn't working with this script.
I could continue explaining but it's probably easier to just post the fla
Any help is greatly appreciated...
This is my first post btw - so hello everyone!
View Replies !
View Related
Game Character Issue
my main issue is that when the character gets down y still cant fix it so that it faces the right direction......my most succesful achievement was to let him facing the right direction but if you pressed DOWN button again it changes left to right right to left etc.....
I was using....
If(key.isDown(Key.DOWN)
if(_currentframe !=5)
gotoandplay(5)
)else if (key.isDown(Key.DOWN)
if(_currentframe !=6)
gotoandplay(6)
this is the best one with the one I achieved highger.....any idea?
View Replies !
View Related
Timed Game Issue
i have the variable "horas" (hours) and "minutos" (minutes)
i have a time based game and i want that, as soon as the time reaches lower than zero to load a game over swf
shouldnt't this do it?
if (horas<0 and minutos<0) {
loadMovie ("over.swf", 0);
}
the problem is that what makes the time to lower are buttons that substract. Some buttons substract hours and some minutes. The game over movie should be loaded when a button lowers minutes from <1 to anything 0> even if it goes from +10 to -15
I also need to make some kind of limit so even if the variable hours=2 if a button makes hours=hours-3 it stays in 0 and not in -1
I have the entire game source (what's maded so far) at www.juanlacueva.com.ar/carmen.zip
can anyone please help me?
View Replies !
View Related
Check Dont Works,I Dont Know Where Is The Mistake
What I´m trying to do is next. When you roll over a button , him has to check if a mc has the frame in number 27 and if its oky tell another mc to play o what ever
on (rollOver) {
if (_root.klip.de.klips.pantalla.klips.pntgrand._curr entframe == 27) {
_root.klip.de.klips.pantalla.pntgrand.gotoAndstop( 1);
} else {
_root.klip.de.klips.pantalla.pntgrand.gotoAndPlay( 2);
DONT WORK I DONT KNOW WHY
if (_root.klip.de.klips.pantalla.pntgrand.currentFram e<=27) {
tellTarget ("_root.klip de klips .pantalla.klip panta back") {
gotoAndPlay(2);
}
}
}
}
dont work ider
View Replies !
View Related
Pairs Game - Timer Issue
Hello,
Ive made a game of pairs where the user must turn over a card on the left of the screen and find the matching card on the right. This must all be done within a time limit.
There are 5 levels on 5 different frames. All are identical except the cards are in a different position on each level.
For the time im using this script:
_global.timed=210 (very first frame)
_global.timer = setInterval(this,"resume",_global.timed*1000);
function resume() {
clearInterval(_global.timer);
gotoAndPlay("gameover");
}
On level one this works perfectly. When the time is up it will say gameover. However, on levels 2-5, the timer wont finish and it will all of a sudden go to the level complete page. This means the timer still has 5 or 6 seconds left on it which it shouldnt have.
i clear the interval after every level and the problem reoccurs even when i start on level 2, 3,4 or 5 and skipping one. As i said, each frame is identical so why does it only occur on these? Also the time varies, sometimes it can jump 2 seconds early, 6 seconds early or 2 seconds late (doesnt go lower or higher than these figures)
Any ideas?
View Replies !
View Related
Activity/Game Path Issue
I have a Trivia game that uses a .txt file to load the question and answers from.
This .swf game is placed inside a GUI.swf which is inside a player.swf. The player lives in a directory called player while all the .swfs live in the media directory all in the same root. The game shows but won't load the .txt file.
When I play the game from the root of my machine it works fine, however when I play this game online it doesn't seem to load the .txt file. Can anyone help me with this issue?
Here is my current code:
stop();
if (this == _root) {
media_path = "";
} else {
media_path = _root.media;
}
questions_text = "flashtrivia.txt";
// get the questions
loadQuestions = new LoadVars();
loadQuestions.load(_root.media_path+questions_text );
//loadQuestions.load("flashtrivia.txt");//this was the local testing code. Now commented out the game still works locally//
loadQuestions.onLoad = initQuestions;
View Replies !
View Related
FPS Issue With Tile-based Game Engine
I have created a complex tile-based game engine. It places all tiles onto the screen, calculates which ones are on and off screen (which tiles are inside the 800x600 range and which tiles are outside of that range), and only displays the tiles on screen by making their _visibile = 1 and the off screen tiles 0. It manages which tiles are on and off screen even when the character moves around.
My problem: the fps goes way down when the southern part of my tile map is displayed. The character starts in the top left. FPS is about 35-49 usually. If he travels east, so that the right portion of my tile map is displayed, FPS stays the same. It only slows down when he travels south where the bottom portion of the map is displayed.
I know it's not a bug in my hide() function that keeps track of what tiles to display and which ones not to display. I do know that setting the visiblity to 0 or 1 DOES make a big difference, so managing which tiles to display and not display is good. I just can't figure out why it would slow down only when I travel southward.
Perhaps deleting the tiles when they go off screen would be a better idea rather than switching their visibility on and off? But that would require me to rewrite the majority of my engine...
View Replies !
View Related
Desperate Newbie: Hangman Game Issue
I'm trying to make a hangman game; I found 3 different tutorials and I've purchased 2 books and I'm lost and could use some help.
This is the action for my keys button, for guessing the letter. There are 10 guesses and everything works great up until you win; it still plays my last frame, the "you lost" frame, and not the "good" frame. Could someone point out the error of my ways?
---------------
Actions for Animated Button
on (release) {
MyTry = 1;
Count = 0;
Cur_Char = new String(_root.Country_Name);
Cur_Char = Cur_Char.toUpperCase();
for (n=1; n <= length(_root.Country_Name); n++) {
if (MYChar == substring(Cur_Char,n,1)) {
MyTry = 0;
Count = Count + 1;
set("_root." add "con" add n add ".Chars", MyChar);
tellTarget ("_root." add "con" add n) {
gotoAndStop(2);
}
}
}
if (MyTry == 0) {
for (o=1; o <= count; o++) {
_root.Cur_Count = _root.Cur_Count + 1;
}
if (_root.Cur_Count == _root.MyCount) {
tellTarget ("_root.Animate") {
gotoAndStop("good");
}
}
}
if (MyTry == 1) {
_root.No_Tries = _root.No_Tries + 1;
tellTarget ("_root.Animate") {
gotoAndPlay("string(_root.No_Tries)");
}
}
gotoAndStop(2);
}
View Replies !
View Related
Dont Understand Why This Dont Work
ok this file is from another post and workes fine as far as the movement and stopping. i tried to add a button to it but the function seems to overtake every other script in the movieclip. heres the fla. is there a workaround or am i doing this wrong?
thanks for your time!
View Replies !
View Related
Flash Game Help The Game Runs Too Slow In A Browser
lo there!
I'am so frustrated!
I have made a plattformgame in flash, and after I had published it I tested it (local) when it was embedded in a browser, and it hacks and laggs! But when I play it in the flash player it works just fine.
What should I do?
I removed all the heavy graphics, lowerd the fps to 30fps and removed all the code so now its just the bassis left (gravity, collision, key checking etc. and yes u should bounce on the walls giving a wall jump effect).
Anyone please! I am in big need of help!
Is it my code? Did I publish it wrong?
here are the links:
http://smh03.lbs.se/smh03niklas/prof...ofilbollen.swf
http://smh03.lbs.se/smh03niklas/prof...ofilbollen.fla
http://smh03.lbs.se/smh03niklas/prof...filbollen.html
//Qui
View Replies !
View Related
...I Dont Get Anything About Flash...
Ok I just got the new flash program from christmas and I just watched a video on Newgrounds showing me how to do the moving of the circle. Thats about as far as I can get.
I was trying to make a flash with FF6 sprites in it but I cant get the crap to work right. I can get a background up but then when I try to put a sprite over it 2 things happen.
1. The sprite pixils up and looks really nasty, and
2. I cant figure out how to get the background of the pic to be transparant.
If anyone can help me I would appreate it a lot.
Also if anyone could send me a finished flash so I can look at the format of it. It would help a lot.
EDIT: I'm using Flash MX 2004
EDIT AGAIN: I really need help, plz!!!
View Replies !
View Related
[F8] Game Studio Needs Flash Game Programmer
Hi -
I've been working on cartoon Flash interfaces for awhile. Now my clients want games, so I'm looking for one or two Flash game actionscripters who can help out and maybe start a studio. Since it's a startup, I'm looking for someone who's good, but not yet making millions - hoping we can do that ourselves eventually. Someone dependable, easy-going and easy to get along with. Would be great to find someone relatively local, but not absolutely necessary.
We'll be creating custom Flash games for an existing client.
Hoping to check out people's games first.
J.
View Replies !
View Related
New Fonts Dont Appear In Flash MX
I've recently installed (with copy - paste)
20 new fonts I want to use in my flash site.
But the new fonts dont show up in the font
menu in flash...
I installed the fonts (using windows XP)
to C:WINDOWSFONTS
I restarted several times but this didn't
help me out... any1 suggestions?
View Replies !
View Related
Is It JavaScript..Coz I Dont Think Its Flash
I know this more than a newbie question...but I have to make it...
I just saw a page tha have a changes tha cursor it shows a different cursor ...whent i browse on the page.....the page is (http://www.manastungare.com)
Is it Java...
Can someone tell me the script please ...???
Thanks Ya'll......
View Replies !
View Related
Flash Dont Work
hi
ive got a dell pc running windows xp with 4 login accounts,the pc is regestered to my wife,the problem i am getting is that flash works ok on my login account but will not work on the other 3 accounts,have tried uninstalling,re installing on both mine and my wifes accound but am still unable to get flash working on all 4 pc users any suggestions !
View Replies !
View Related
Dont Know How To Put Flash Components Together?
Hello,
I know how to make different flash components, e.g. sound slider, image slider etc, but when i try to put them together to make a website they dont work. I have my template for my website in the flash doccument, but when i try to imput the sound slider that i created, it doesnt work when i preview it, it just stays as a still image and no sounds plays.
Do you need some action script to make movies in a flah website work togeter, or does it just play when it is imported into the doccument.
Thanks very much,
Billy Joe
View Replies !
View Related
I Dont Want Flash To Refresh
hi, i have a site that loads 1 of 3 swfs for navigation. The problem is that when a button is clicked the flash file refreshes. I only want the file to refresh if the browser is refreshed, not if a button is clicked in the file...
here's the site:
www.pandoraultra.com
here's my container script:
filename = ["nav_red.swf", "nav_white.swf", "nav_gray.swf"];
path = "http://www.pandoraultra.com/navigation/";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], movieTarget);
the main navigation is 1 of 3 swfs that loads, click any of the buttons and u will see the swf reload and a new file in its place.
How do i fix this?? Thanks for any help
View Replies !
View Related
Why XML Dont' Work In Flash 8 ?
Last edited by Profano : 2006-04-04 at 01:22.
Hi all.
Time ago i do a code for a simple xml>array converter. This code don't work in flash 8 (in Flash 7 work perfectly), and i don't find what's wrong. Can someone help me please?
/* ------------------------------------------------------------------------
Creo i namespace.
*/
if (_global.com == undefined) {
_global.com = new Object ();
}
if (_global.com.commoedia == undefined) {
_global.com.commoedia = new Object ();
}
if (_global.com.commoedia.Struttura == undefined) {
_global.com.commoedia.Struttura = new Object ();
}
/* ------------------------------------------------------------------------
/*
================================================
Funzione per la creazione di array da file XML
================================================
Metodo:Struttura()
Descrizione:Controlla in un nodo XML la presenza di figli
convertendola in array.
Parametri:nodo_xmlil percorso del nodo da convertire.
*/
com.commoedia.Struttura = function (link):Void {
// creato un nuovo ogetto XML.
var cont_xml:XML = new XML ();
var controlloProgresso:Function = function (xmlObj:XML):Void {
var bytesCaricati:Number = xmlObj.getBytesLoaded ();
var bytesTotali:Number = xmlObj.getBytesTotal ();
var percentualeCaricata:Number = Math.floor ((bytesCaricati / bytesTotali) * 100);
trace ("millisecondi passati : " + getTimer ());
trace ("bytes caricati : " + bytesCaricati);
trace ("bytes totali : " + bytesTotali);
trace ("percentuale : " + percentualeCaricata);
trace ("---------------------------------");
};
cont_xml.onLoad = function (success:Boolean) {
cont_xml.ignoreWhite = true;
var nodo_xml:XMLNode = this.firstChild;
trace (cont_xml);
var menuSito:Array = com.commoedia.main = new Array ();
for (var i = 0; i < nodo_xml.childNodes.length; i++) {
// Riempio l'array con i parametri dei figli.
menuSito.push (new Object ());
menuSito[i].nome = nodo_xml.childNodes[i].nodeName;
menuSito[i].link = nodo_xml.childNodes[i].firstChild.nodeValue;
// Controllo se i figli hanno a loro volta figli,
if (nodo_xml.childNodes[i].firstChild.hasChildNodes ()) {
// In questo caso creo un nuovo array.
var subMenuSito = com.commoedia[nodo_xml.childNodes[i].nodeName] = new Array ();
var elabNodo = nodo_xml.childNodes[i].childNodes;
for (var l = 0; l < elabNodo.length; l++) {
subMenuSito.push (new Object ());
subMenuSito[l].nome = elabNodo[l].nodeName;
subMenuSito[l].link = elabNodo[l].firstChild.nodeValue;
}
}
}
clearInterval (intervalloID);
trace ("intervalloID: " + intervalloID);
};
cont_xml.load (link);
var intervalloID:Number = setInterval (controlloProgresso, 100, cont_xml);
delete com.commoedia.Struttura;
};
error found...sorry
View Replies !
View Related
Dont Buy Flash Paper
I dont know about you, but when i bought my car i had the dealer take off thier dealer logo from the back panel of the car, something about paying ford 14k so they can advertise everywhere i went didnt seem right to me. I told the dealer remove it or i walk, and well they removed it, the promise of making some good cash to them ment comprimising free advertising for me.
When flash paper 2 came out, i thought of this... why would macromedia release a software that tacks a sizable logo on the top left corner of the FP toolbar and even worse, links directly to thier Flash Paper store page for purchasing the software. Now i know you might say, well flash has macromedia info on it, and so on ... but its not so blatant and in your face as a direct linked 55 x 85 logo on a mandatory tool bar that is seemingly unremovable.
As a long time customer of macromedia, it, to say the least, bothers me that they would relase a software with such a flagrant attempt at marketing. Now they say its not directly aimed at marketing thier product or advertising, but then why would you put a logo on something you sell.... the logo is nice, but its not such a grand work of art that it is needed to make the product better, but rather its an attempt at advertising.
The product is a great product and if you dont mind your clients or your internal staff viewing and linking directly to MM store within 1 scroll length and 1 click, then the software is great but if you take issue with paying someone money so they can advertise, well then dont buy it.
just my 2 cents i guess take it with a grain of salt...
View Replies !
View Related
Flash Display : Dont Want Square Showing For Flash Area
Dear Sir
I have flash portion in an html page
You can refer
http://www.prajaktasoftware.com/seals/retailconcept.html
When i move cursor the top area a sqaure appears shoing flash area
With a click on this area , it disappears but can i avoid being displayed in first place ...
This is very irritating when there are button in flash (on ehas to click 2 times toget result)
Refer ...
http://www.prajaktasoftware.com/seals/index.html
I will be greatful to you for this ...
Thanks in advance
View Replies !
View Related
Flash MX-FSCommand Dont Work
Can somebody help with this.....
Im doing a project that needed standalone projector for macintosh.... FlashMX FS Command (Full Screen=True, Scale=False) works on a single swf file only......but when it links to another swf file, the links started to load in the upper left of the screen....can anybody help me solve this????
View Replies !
View Related
--> Fonts In Flash That Possible Users Dont Have
If I use a pixel font in flash and the user that visits my site does not have that font, will the font register or not.
I always thought that flash compressed everything and packaged it together so you would not run into these problems.
But my menu uses dynamic text boxes with pixel fonts, and some computers cannot register the font?
whats the deal.
thanks
View Replies !
View Related
Please Help..created Flash Movie, Dont Know How To?
I created a flash movie using flash 2004 I have a movie saved as movie.swf however I want to use it as a webpage and so I openned it in frontpage 2002 and it works there and then I save it as index.html
when I open it on my desktop it works just fine in the internet explorer browser, however when I upload the index.html to my website hosting server then try to open my home page to view it will not display...do I need to save the flash movie in some other format to be able to use as a webpage, as a home webpage requires a index.html to be a home page...I am lost and new to this, any help would be appreciated..thxs
View Replies !
View Related
Flash 6 Scripts Dont Always Work In 8?
hi,
im a novice with flash and have been trying to get this little script to work in flash 8, but for some reason it doesnt. ive had this problem with a few other scripts as well. they work in 6 but dont work in 8. If anyone knows the answers or good resources on this problem i would be most appreciative. the script im using is below.
this is a script on a movie clip which holds 4 images, butted up next to each other. they are masked so only one is displayed. when this movie is clicked on the 4 images shift horizontally into the masked space.
this is the first movieclip
Code:
onClipEvent (load) {
accel =0.1;
rate = 0.3;
trace(_x)
_root.xkoord12=126;
}
onClipEvent(enterFrame) {
x=x*accel+(_root.xkoord12-_x) * rate;
_x+=x;
if(Math.abs(_root.xkoord12-_x)<1) { _x=_root.xkoord12; }
}
this is within the first movie clip on invisible button that covers the 4 images.
Code:
on (rollOver) {
_root.caption("view project", 2);
}
on (rollOut, dragOut) {
_root.remove_caption();
}
on (release) {
if(_root.xkoord12>-538) {
_root.xkoord12-=221;
}
if(_root.xkoord12==-758) {
_root.xkoord12=126;
}
}
www.rizndesigns.com/site_flash.rar
here is a link to the fla and swf.
any help would be greatly appreciated
View Replies !
View Related
Flash Dont Recompile Correctly
I have a .FLA file with some graphics and some external .AS classes.
Sometimes, when I modify the external classes and recompile the Flash movie,
it doesn't change nothing, it keeps compiling with the older class file. I tried to delete
the .SWF and recompile, but doesn't works...
If I restart my computer it does work, so I guess Flash is calling some kind of cache..
Any solution to this problem?
Thanks,
Ian liu.
View Replies !
View Related
Adobe Photoshop And Flash DONT Mix...
I download the photo gallery .fla file and all of the images in there and it works fine. The image names in the downloadable tutorial are image0, image1, image2, etc...
Here was the problem. Lets say I have other pics I want to load, so I change the name of the pics I want to image0, image1, image2, etc. I did all image editing in photoshop and saved them as jpegs. Then I go and put these pics in the SAME folder that the donwloaded pics are in from the tutorial as to replace the pics I downloaded from the tutorial in the animation folder.
When I go to preview the movie, nothing is showing up...Nothing has changed, I just replaced the pics that the tutorial gives us with new pics BUT I keep the names the same...so everything should work right? What was happening?
well, when I did the exact same image editing in firworks and exported them out as jpegs, sure enough they show up in flash. Its like photoshop puts some stuff on there so flash cant use them or something or fireworks does so flash can use them.
I dont know, do you?
Thanks...
View Replies !
View Related
Flash Butts Dont Werk?
sup guys, my ? today is
when i go to certain flash sites, when i click on their butts to enter their sites nothing shows up. i go to other sites and the same thing, now it doesnt happen on all of em but its annoying to know that its happening.
n e sugg
View Replies !
View Related
Adobe Photoshop And Flash DONT Mix...
I download the photo gallery .fla file and all of the images in there and it works fine. The image names in the downloadable tutorial are image0, image1, image2, etc...
Here was the problem. Lets say I have other pics I want to load, so I change the name of the pics I want to image0, image1, image2, etc. I did all image editing in photoshop and saved them as jpegs. Then I go and put these pics in the SAME folder that the donwloaded pics are in from the tutorial as to replace the pics I downloaded from the tutorial in the animation folder.
When I go to preview the movie, nothing is showing up...Nothing has changed, I just replaced the pics that the tutorial gives us with new pics BUT I keep the names the same...so everything should work right? What was happening?
well, when I did the exact same image editing in firworks and exported them out as jpegs, sure enough they show up in flash. Its like photoshop puts some stuff on there so flash cant use them or something or fireworks does so flash can use them.
I dont know, do you?
Thanks...
View Replies !
View Related
Why Dont My Flash Buttons Work?
I've been having some difficulty with opening my URL in the correct frame. I had a look at the guide on this site about opening URL's in specific frames when a button is presses, and it looks as if im doing the correct thing.
After i have created the button, I add a get URL action to the button. I type in the file name in the name of the file i want to open in URL section. This is not the problem, as the file does open when I open it in a blank window. However, when i input the name of the frame on my site i want it to open in, nothing happens. The frame i aminputing should be the correct name, as i am copying it directly from the HTML code. Could please tell me what i am doing wrong, and how i can get my URL to open in the correct frame on my site.
Thank you
View Replies !
View Related
Php Variable Dont Load In Flash
Hi, i'm making a registration form for my flash site, i have the code in actionscript and in php
In the php i check or the username and email is already in use
i work with the variable $status, if the username is in use $status = 1
the problem is, even when i type a username that already is in use, he always go to frame 2, but he dont set the username in my database.
Do sombody see the problem here?
this is my php script
Code:
<?php
include('connectie.php'); //connectie met de database
$naam = $_POST['naam'];
$paswoord = $_POST['paswoord'];
$email = $_POST['email'];
//naam
$dbnaam = mysql_query("SELECT COUNT(*) FROM `leden` WHERE naam='".$naam."'") or die(mysql_error());
$result = mysql_result($dbnaam,0);
//email
$dbemail = mysql_query("SELECT COUNT(*) FROM `leden` WHERE email='".$email."'") or die(mysql_error());
$resultaat = mysql_result($dbemail,0);
if($result > 0) {//als de naam al in de database staat
$error = 1;
} elseif($resultaat > 0) {//als het email al in de database staat
$error = 2;
} else {
$error = '3';
mysql_query("INSERT INTO `leden` (naam, paswoord, email) VALUES ('".$naam."', '".$paswoord."', '".$email."')") or DIE(mysql_error());
}
echo "&flashError=".$error; //stuurt de variable $error naar flash
?>
this is my action script
Code:
//beveiligen van tekstvakken
naam.restrict = "a-z A-Z 0-9 _ -";
paswoord.restrict = "a-z A-Z 0-9";
paswoordr.restrict = "a-z A-Z 0-9";
email.restrict = "a-z A-Z 0-9 . @ _ -";
//button klik
myVars = new LoadVars();
registreer.onRelease = function() {
//geen naam ingetypt
if (naam.text eq "") {
fout.text = "No name enterd";
//geen paswoord ingetypt
} else if (paswoord.text eq "") {
fout.text = "No password enterd";
//geen paswoordr ingetypt
} else if (paswoordr.text eq "") {
fout.text = "No password? enterd";
} else if (paswoord.text != paswoordr.text) {
//paswoorden zijn niet gelijk
fout.text = "The passwords does not match";
//geen email getypt
} else if (email.text eq "") {
fout.text = "no e-mail enterd";
//naam moet 5 letters zijn
} else if (naam.text.length<5) {
fout.text = "nickname must be at least 5 letters";
//paswoord moet 5 letters zijn
} else if (paswoord.text.length<7) {
fout.text = "password must be at least 7 letters";
//naam bestaat al
} else if (myVars.flashError == 1) {
fout.text = "username already exist";
//email bestaat al
} else if (myVars.flashError == 2) {
fout.text = "email already exist";
} else {
//tekstvakken worden benoemt
myVars.naam = naam.text;
myVars.paswoord = paswoord.text;
myVars.email = email.text;
myVars.sendAndLoad("registreer.php", myVars, "POST");
gotoAndPlay(2);
}
};
View Replies !
View Related
Flash Title Header Dont Fit
Hi..
Im rubbish..
ive tried alteering all the obvious? settings but my flash header (900 x 100px) is slightly chopped off when i view it from certain computers even if they are set to the 1024 x 768 resolution.
Basically ive made a normal html website with a flash header.
I can view it fine but my sister cant see all the header when she tries on her computer so i guess loads of peeps cant too.
Can anyone pleaseee help me,...
im lost
love joy
View Replies !
View Related
Dont Give The Focus To Flash
I use javascript to detect keys on the keyboard so that some buttons in the html are hotkeys. My script makes it so that if the user presses on an html button, it sends a command to flash and plays an animation. The hotkey for that button would be "e" for example.
Problem is, if the focus is on the swf, the user cannot use hotkeys until it clicks elsewhere in the html file. Let me mention that their is alot of changes of focus between html and swf.
So I thought about using a OnClick="window.document.somebutton.focus()" on the swf so I'm always focused on the html after the user clicked in the swf, but it won't set the focus anywhere else
Is there anyway to keep the focus on an html element all the time even when an swf was clicked?
View Replies !
View Related
Flash&php Combined Page,how To Make Flash Dont...?
I have a FlashHeader,
the site is PHP.
The FlashHaeder navigates the site
now i don't wan't that everytime i push a buton/link on the FlashHeader, it refrashe, starts from the frst frame. (now the problem is i have 3 languages and i would need the FlashHeader to be not refreshed.
I tried normal php i tried iframe, i know a way whit frames and a biger frame at 100% to scroll all togheter but i don't like frames and some serch engines to
here a dirty paint of my layot
http://www.ski-simulator.com/staff/layout1.jpg
(the links/pages i call whit "index.php?id=usage" (usage is an example)
Thanks for any idea or problem solve.
View Replies !
View Related
Flash Scroll BAR ...I Dont Understand The Problem
Ok here is the thing:
I have a flash movie (index.swf, or .html in this case) that loads another movie (Attitude.swf) Attitude.swf has a scroll bar component to scroll text. Now when I run inex.html or .swf and click the attitude button to load the other movie it loads, but! when I click the scroll bar its like its programed to go back to frame 1 and play attitude.swf again. I want it to scroll normal. I open just attitude.swf and it scrolls fine. Its just because it loads another movie. ANY SOLUTIONS ANYONE?
View Replies !
View Related
Export Flash, Visitor Dont Have The Font
when i export the whole movie, and view it with a computer without the font i used, i cant read the text i used in the movie.
i thought that you can use any font in flash mx and export it, and everyone can view it. how can i make it possible?
for your information, i already convert the text into symbol.
View Replies !
View Related
|