why wont my flash game work?

Reply

Join Date: Feb 2005
Posts: 4
Reputation: oohmygod831 is an unknown quantity at this point 
Solved Threads: 0
oohmygod831 oohmygod831 is offline Offline
Newbie Poster

why wont my flash game work?

 
0
  #1
Mar 9th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 780
Reputation: OurNation is an unknown quantity at this point 
Solved Threads: 9
OurNation's Avatar
OurNation OurNation is offline Offline
Master Poster

Re: why wont my flash game work?

 
0
  #2
Mar 9th, 2005
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Graphics and Multimedia Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC