Hey guys,
I found this neat fla in an old folder of Flash files. I’d like to use it in an upcoming project, but the problem being that it won’t work in Flash 7 or 8. I don’t know enough AS to convert it over, so I was hoping one of you smarty pants could help me out.
Thanks,
GD
http://www.geraddavis.com/random/dynatint.zip
i just published it with flash 8 and it works fine. unless it’s supposed to do something more…
you got the photo to change colors in flash 8? hmmm… it wouldn’t work for me.
No he didn’t, he must’ve made a mistake in testing.
The main thing to point out is that AS2 is case-sensitive, so movieclip noparse[/noparse] isn’t the same as MovieClip noparse[/noparse]:
MovieClip.prototype.fademe = function() {
for (var i in this.myVals) {
this.myVals* += (this._parent.targvals* - this.myVals*) / this.speed;
}
this.col.setTransform(this.myVals);
};
You should also know that what you have there isn’t exactly ‘good practice’ - for lack of a better term.
Hope this helps :hoser:
You should also know that what you have there isn’t exactly ‘good practice’ - for lack of a better term.
Hope this helps :hoser:
‘Good practice’ - as in bad coding or forum etiquette? 
This file was something a friend found and shared with me years ago. I’m guessing it was made in Flash 5! And I don’t think I’ve been inappropriate.
Anyway, thanks for pointing that caps problem out to me. I’ll switch that stuff around to see if it works.
GD
He mean “good-practise” as in good coding… don’t take it the wrong way.
Where do you guys find this information?? I mean, ‘movieclip’ worked in previous version of Flash, and then Flash 7 and 8 comes out and now it’s ‘MovieClip’.
Another thing. I like to keep all my code in the timeline, but it takes a little rewriting to move the actions from a movie clip to the timeline. Take this file for example. The movieclip has this code on it:
onClipEvent (load){blah blah blah}
Would this be translated to this if I wanted to move it to the timeline?
onLoad(){ blah blah blah}
I wish there was a side to side coders quick guide to this sort of thing.
Where do you guys find this information?? I mean, ‘movieclip’ worked in previous version of Flash, and then Flash 7 and 8 comes out and now it’s ‘MovieClip’
I read every Flash 8 book avalaible when it came out, and i learn something new everyday. Practise makes perfect.
[quote=East High]Where do you guys find this information?? I mean, ‘movieclip’ worked in previous version of Flash, and then Flash 7 and 8 comes out and now it’s ‘MovieClip’.[quote]
Flash comes with a help file that explains that sort of thing… In fact, if you read through the best practices section, there is something close to a “side to side coders quickguide”.
Scripting in the timeline though, the MovieClip.onLoad() method is nowhere near the same as onClipEvent(load) (well, close, but only used for mc’s associated with class files). That clip event was mainly to initialize variables which you can do in the timeline.
so instead of:
[AS]onClipEvent (load) {
someVar = 2;
}[/AS]
you can simply say:
[AS]var someVar:Number = 2;[/AS]
You’ll just have to watch the scope.
It was always MovieClip, except it just didn’t matter in AS1.
thanks guys! that best practices thing looks to be pretty helpful.