Groups | Blog | Home
all groups > flash actionscript > april 2006 >

flash actionscript : ActionScript Not Working


forumnotifier
4/4/2006 10:42:07 PM
Hi,

I have this file which I created from
http://www.tutorialized.com/tutorial...entation/11499 where the actionscript
works in Flash Player 6 but when I publish into Flash player 7 or 8 it does not
seem to want to play.

It gets a pop up message stating:
"A script in this movie is causing Flash Player to run slowly. If it continues
to run, your computer may become unresponsive. Do you want to abort?"

My purpose to get this working in Flash 8 is because I need to incorporate CSS
Stylesheets externally.


Here is the following actionscript:

stop();
numberOfTabs = 3;
for (i=1; i<=numberOfTabs; i++) {
line = eval("tab"+i);
line.onRelease = function() {
for (i=1; i<=numberofTabs; i++) {
otherTabs =
eval("this._parent.tab"+i);
otherTabs.bottomLine._visible =
true;
}
this.bottomLine._visible = false;
contentFrame = Number (this._name.substr(3,
1));
this._parent.contents.gotoAndStop(contentFrame);
}
}
tab1.bottomLine._visible = false;

tab1.onPress = function() {
gotoAndStop("tab1");
};

tab2.onPress = function() {
gotoAndStop("tab2");
};

tab3.onPress = function() {
gotoAndStop("tab3");
};


How does it need to be changed?:confused;
NSurveyor
4/4/2006 11:11:55 PM
Case-sensitive...

Change: numberofTabs to numberOfTabs in the second for loop.

Even if Flash 6 was case sensitive, Flash Player 6 wouldn't give you the
infinite loop problem. Strangely, in Flash 8:

trace(1>undefined); // undefined
trace(1>=undefined); // TRUE
trace(1==undefined); // false
trace(1<=undefined); // TRUE
trace(1<undefined); //undefined

Whilst in Flash Player 6:

trace(1>undefined); // true
trace(1>=undefined); // true
trace(1==undefined); // false
trace(1<=undefined); // FALSE
trace(1<undefined); // false

Flash_Boi
4/5/2006 12:06:53 AM
Ok thanks so much I will try it out!

Flash_Boi
4/5/2006 12:13:29 AM
Yeah, I tried it out and the case-sensitive did work....But now I the
bottomLine mc does not hide itself when it needs to be hidden.

What I mean is that I've got the tabs and when one tab is selected it hides
that bottomLine to show that it is that tab selected.

How will I get back that effect now that it Runs in Flash Player 8?

Thanks

Flash_Boi
AddThis Social Bookmark Button