| | |
why wont my flash game work?
Please support our Graphics and Multimedia advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2005
Posts: 4
Reputation:
Solved Threads: 0
ive made a game using flash mx 2004 professional and ive inserted it into a page in my website. the site is only running from a disk at the minute as its for a college project. when i view the site from my home pc it works fine and the game can be played ok bu t when i get to college and try the same thing i get an error message saying that the javascript is making the machine run slow and i should abort. the flash file is 989kb and below is the script ive inserted into the file ( the game is basically a memory game where you match up pairs of cards to reveal a picture underneath)
fadeout = function()
{
this._alpha-=5;
if (this._alpha <= 0)
{
delete this.onEnterFrame;
}
}
fadein = function()
{
this._alpha+=5;
if (this._alpha >= 100)
{
delete this.onEnterFrame;
}
}
moves = 0;
for (var i = 0; i < 20; i++)
{
this["card" + i].gotoAndStop((i % 10) + 1);
this["card" + i].onRelease = function()
{
if (secondCard != undefined)
{
secondCard.covering.onEnterFrame = fadein;
firstCard.covering.onEnterFrame = fadein;
delete secondCard;
delete firstCard;
}
if (firstCard == undefined)
{
firstCard = this;
this.covering.onEnterFrame = fadeout;
}
else if (firstCard != this)
{
moves++;
score_txt.text = moves;
if (this._currentframe == firstCard._currentframe)
{
firstCard.onEnterFrame = fadeout;
this.onEnterFrame = fadeout;
delete firstCard.onRelease;
delete this.onRelease;
delete firstCard;
}
else
{
this.covering.onEnterFrame = fadeout;
secondCard = this;
}
}
}
}
shuffle = function()
{
for (var i = 0; i < 100; i++)
{
var c1 = random(20);
var c2 = (c1 + random(19)) % 20;
var tx = this["card" + c1]._x;
var ty = this["card" + c1]._y;
this["card" + c1]._x = this["card" + c2]._x;
this["card" + c1]._y = this["card" + c2]._y;
this["card" + c2]._x = tx;
this["card" + c2]._y = ty;
}
}
shuffle();
also when i try to view the flash file at college , it says that my flash file is an unexpected format? college uses flash mx 2004 (but its an educational version i think)
please help
fadeout = function()
{
this._alpha-=5;
if (this._alpha <= 0)
{
delete this.onEnterFrame;
}
}
fadein = function()
{
this._alpha+=5;
if (this._alpha >= 100)
{
delete this.onEnterFrame;
}
}
moves = 0;
for (var i = 0; i < 20; i++)
{
this["card" + i].gotoAndStop((i % 10) + 1);
this["card" + i].onRelease = function()
{
if (secondCard != undefined)
{
secondCard.covering.onEnterFrame = fadein;
firstCard.covering.onEnterFrame = fadein;
delete secondCard;
delete firstCard;
}
if (firstCard == undefined)
{
firstCard = this;
this.covering.onEnterFrame = fadeout;
}
else if (firstCard != this)
{
moves++;
score_txt.text = moves;
if (this._currentframe == firstCard._currentframe)
{
firstCard.onEnterFrame = fadeout;
this.onEnterFrame = fadeout;
delete firstCard.onRelease;
delete this.onRelease;
delete firstCard;
}
else
{
this.covering.onEnterFrame = fadeout;
secondCard = this;
}
}
}
}
shuffle = function()
{
for (var i = 0; i < 100; i++)
{
var c1 = random(20);
var c2 = (c1 + random(19)) % 20;
var tx = this["card" + c1]._x;
var ty = this["card" + c1]._y;
this["card" + c1]._x = this["card" + c2]._x;
this["card" + c1]._y = this["card" + c2]._y;
this["card" + c2]._x = tx;
this["card" + c2]._y = ty;
}
}
shuffle();
also when i try to view the flash file at college , it says that my flash file is an unexpected format? college uses flash mx 2004 (but its an educational version i think)
please help
Im assumming the computers are all conected server like and if your program takes up to much memory it messes things up.
PETA People for the Eating of Tasty Animals.
FireFox
Hijack This
Ad-Aware
Hijack this tutorial
Microsoft AntiSpyware
CompUchat
FireFox
Hijack This
Ad-Aware
Hijack this tutorial
Microsoft AntiSpyware
CompUchat
![]() |
Similar Threads
- Please review my flash game site - unique design (Website Reviews)
- Software to make a flash game (Game Development)
- Flash Game Developer needed (Web Development Job Offers)
- Red Flash Game (Geeks' Lounge)
- Flash Game Tutorial??? (Graphics and Multimedia)
- Flash game creator (Web Development Job Offers)
Other Threads in the Graphics and Multimedia Forum
- Previous Thread: ISO Photo Editing Software
- Next Thread: image editing/ independent foreground
| Thread Tools | Search this Thread |
3d 10 actionscript3 adobe adobeacrobat adobereader air ajax amazon amf apple button cart childprotection cloud dashboard dell design dojofoundation dreamweaver ebay eclipse ecommerce elasticcomputecloud embed endorsement extra family flash flash-develop flashlite flex free harddrive iamthwee ibm illustrator imflash intel interactivemap javafx javascript laptop legal map micron microsoft mobile monitoringsoftware moonlight multimedia myspace nand news novell panorama pdf pedophiles photoshop photosynth php safety sandisk security shopping silverlight solidstatedrive sproutcore ssd streaming swf table ukmap unload unwanted video vulnerability web white.space xml zend zephyr zeroday





