Jump to content


Actionscript error with text


  • You cannot reply to this topic
2 replies to this topic

#1 LkuHomer

    Young Padawan

  • Members
  • Pip
  • 173 posts
  • Gender:Male
  • Location:Dela'where?

Posted 20 February 2007 - 08:44 PM

I am having an issue with the actionscript, yet I can't seem to figure out what I'm doing wrong.

The error report is:

Quote

**Error** Scene=Scene 1, layer=Home_action, frame=2:Line 2: ')' or ',' expected
duplicateMovieClip("title", "title" add i, i);

**Error** Scene=Scene 1, layer=Home_action, frame=2:Line 3: ')' or ',' expected
setProperty("title" add i, _alpha, 50-(i*(50/amount)));

Total ActionScript Errors: 2 Reported Errors: 2

Frame 2 AS:
if (Number(i)<Number(Number(amount)+1)) {
	duplicateMovieClip("title", "title" add i, i);
	setProperty("title" add i, _alpha, 50-(i*(50/amount)));
	i = Number(i)+1;
}

The layer that the AS is going to, all of the frames are labeled as 'title'

#2 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 20 February 2007 - 09:55 PM

The error is exactly as it is telling you; it needs a comma to separate arguments.

if(Number(i) < Number(Number(amount) + 1)) {
	duplicateMovieClip('title', 'title', i);
	setProperty("title",  _alpha, 50 - (i * (50 / amount)));
	i = Number(i) + 1;
}

I don't quite understand what the 'add i' means, so I just took it out since it doesn't make any sense in relation to the syntax of the functions.

#3 LkuHomer

    Young Padawan

  • Members
  • Pip
  • 173 posts
  • Gender:Male
  • Location:Dela'where?

Posted 20 February 2007 - 10:00 PM

Thank you very much Demonslay.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users