|
-
arrrgh! help!!! actionscript 1->2 problem
i'm going absolutely *MAD*! please help me someone:
i'm a flash newbie. i found this mouse trailer, that i edited so that it's perfect for me. works swell in it's own preview. it's in actionscript 1,0. i guess that's where the problem lies: when i try to import it into my main movie as a movie clip, the trailer (consists of 3 object's) won't budge. it actually shows in my library as graphic, not movie clip. so i tried to export the trailer movie into flash 7/actionscript 2 format, but it gives me this error message:
**Error** Symbol=FB - Flying Text, layer=Actions, frame=3:Line 13: Syntax error.
char0:Xpos = getProperty("char0", _x);
Total ActionScript Errors: 1 Reported Errors: 1
in the trailer movie there arfe 3 frames containing action sript, but this is the only mistake that my flash mx 2004 reports when trying to play the thing. i include the entire code in that particular frame here:
i = 1;
while (Number(i)<=Number(n)) {
if (Number(Circle) == 1) {
set("char" add i add ":Xspeed", ((eval("Xspacing" add i) - eval("char" add i add ":Xpos") + eval("char" add (i-1) add ":Xpos"))/a) + (eval("char" add i add ":Xspeed"))/d);
} else {
set("char" add i add ":Xspeed", ((eval("Xspacing" add i) - eval("char" add i add ":Xpos") + eval("char" add (i-1) add ":Xpos"))/a + eval("char" add i add ":Xspeed"))/d);
}
set("char" add i add ":Yspeed", ((eval("Yspacing" add i) + eval("char" add (i-1) add ":Ypos") - eval("char" add i add ":Ypos"))/a) + (eval("char" add i add ":Yspeed"))/d);
set("char" add i add ":Xpos", eval("char" add i add ":Xpos")+eval("char" add i add ":Xspeed"));
set("char" add i add ":Ypos", eval("char" add i add ":Ypos")+eval("char" add i add ":Yspeed"));
i = Number(i)+1;
}
char0:Xpos = getProperty("char0", _x);
char0:Ypos = getProperty("char0", _y);
i = 1;
while (Number(i)<=Number(n)) {
setProperty("char" add i, _x, eval("char" add i add ":Xpos"));
setProperty("char" add i, _y, eval("char" add i add ":Ypos"));
i = Number(i)+1;
}
...and that's it! the trailer won't move anywhere in my movie. i'm doing these pages as a favor to a friend, and it took me already 3 days just to find a nice trailer that i was able to modify... and now the bastard will not move in the movie where it's supposed to. i've tried and tried and TRIED, torn most of my hair out already, so PLEASE someone relief me from this agony! is there a solution?
grateful forever,
mar
-
Registered User
hi,
It's not just that that's in AS 1.0, it's that is for Flash 4. Which is a 3 version gap... A lot has changed. Including the syntax.
I'm not even familiar with this:
code:
char0:Xpos = something
// I guess it's the same as
char0.Xpos = something // using dot notation
getProperty() and setProperty() are deprecated.
You should use dot notation instead.
Number() may not me required.
set() can be replaced by =.
add() is deprecated, + should be used.
As you can see there is a lot of basics you should learn. Just looking at old code may not be a good idea, on the contrary, it may be a very bad idea!
A recent book is always a good idea to start with.
I suggest Colin Moock's asdg2.
-
thanks, nunomira...
yeah, i'm a newbie, and i've got a lot of basics to learn. i think that i can forget about using this trailer... i doubt that i can get it to work.
for now, i don't have a lot of time, so i was just hoping to look for a ready made script that i could paste into my movie clip: an elastic mouse trailer containing multiple objects, where i could adjust the speed and bounce etc. in flash 7 and actionscript 2... i haven't found any so far, despite hours of surfing. any tips?
and thanks for your advice! i'll look that book up when i have better time.
mar
-
"i haven't found any so far, despite hours of surfing"
have you 'surfed' the movies section under "mouse trailers" ?
gparis
-
gparis: yes, i did
hi. it's me, nick mrk13. i couldn't log in as mrk 13 for some reason, although i tried resetting the password also. don't know why, i registered that account only today and have been playing according to the rules..? so i created a new account. (i'd like to use the first account still, if possible..?)
anyway: yes, i did go through all the mouse treilers in the movies /effects section. found only one (page sixteen, crosstrailer by don b... forgot the name) that had multiple images following the cursor in an elastic manner. that's what i'm looking for... do you have more tips as to where i could find a trailer like that?
big thanks for the help!
mar
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|