943,473 Members | Top Members by Rank

Ad:
Mar 9th, 2005
0

why wont my flash game work?

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
oohmygod831 is offline Offline
4 posts
since Feb 2005
Mar 9th, 2005
0

Re: why wont my flash game work?

Im assumming the computers are all conected server like and if your program takes up to much memory it messes things up.
Reputation Points: 16
Solved Threads: 9
Master Poster
OurNation is offline Offline
780 posts
since Aug 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Graphics and Multimedia Forum Timeline: ISO Photo Editing Software
Next Thread in Graphics and Multimedia Forum Timeline: image editing/ independent foreground





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC