View Full Version : OBO_FX class
devonair
October 5th, 2006, 04:55 AM
Sort of an ongoing class I'm working on that gathers a bunch of snippets of script I had lying around into some nice static methods that do various effects..
full class and some examples here (http://www.onebyonedesign.com/flash/obo_fx/), if anyone's interested...
macneilslt
October 5th, 2006, 03:16 PM
Nice work, those are pretty cool.
watery_fart
October 6th, 2006, 10:28 AM
I am having a little difficulty using this.. I have never really used classes or anything like that but I googled it up.
I took the class ActionScript and put it in a .AS file and saved it as OBX_FX.as
but after that the directions of all the websites are either different or just to difficult to follow, could anyone clarify or maybe direct me to a link of a tutorial or something that they know works?
tpspoons
October 6th, 2006, 11:09 AM
gotoandlearn.com has a nice tutorial on classes.
devonair
October 6th, 2006, 11:11 AM
I'll try to give a quick run down... packages in Flash are basically directories on your computer.. So if you look at a class' full package name, it tells you where to put the class file.. So, for example, if you look at "com.onebyonedesign.extras.OBO_FX" that says that the class file OBO_FX.as should be in a directory named "extras" which is in a directory named "onebyonedesign" which is in a directory named "com" (that's overly simplified, but it's true). Now, that "com" directory should be Flash's classpath. The quickest easiest way to do that is just put that directory in the same directory as the .fla file you're working on (there are better ways, but that's the quickest). Finally, in your fla's actionscript you just import that class with
import com.onebyonedesign.extras.OBO_FX;
After that, all those sample scripts on that examples page will work (of course, you'll have to create and name movieclips and textfields etc)..
hopefully, that'll help out and the class will be useful..
d.
B L U E
October 6th, 2006, 12:09 PM
nice! I need to get my lazy arse to compile a huge library, would make life much easier. We should do a huge kF collaberation!
watery_fart
October 6th, 2006, 12:44 PM
very cool, i got it to work! thanks :)
evildrummer
October 6th, 2006, 02:40 PM
I like your idea BLUE, we should have the kForums class library! (a project nokrev is excluded from!!!!< haha the stupid flash is evil man)
gvozden
October 7th, 2006, 06:45 AM
nice work !
Jeff Wheeler
October 7th, 2006, 11:31 AM
I like your idea BLUE, we should have the kForums class library! (a project nokrev is excluded from!!!!< haha the stupid flash is evil man)
I have my own. ;P
evildrummer
October 8th, 2006, 06:10 AM
haha, I was expecting you not to read this page about the almighty flash which leads me to my question, why dont you like flash?
Jeff Wheeler
October 8th, 2006, 10:11 AM
A lot of reasons. Mostly its misuse and inaccessibility.
evildrummer
October 8th, 2006, 10:34 AM
and cause yout not 1337 enough! :smirk2:
watery_fart
October 9th, 2006, 03:58 PM
I have another problem now :(
I have this class effect in one movie, called transition.swf and it works fine
but I have a larger file called website2.swf and whenever I load transition.swf into website2.swf, it doesn't work!!
I tried putting the actionscript in website2.swf instead of transition.swf but its not working
this is what ihave in transition.swf (in the first frame)
stop();
import OBO_FX;
_root.text_mc.onLoad = function() {
OBO_FX.scrambleText(_root.text_mc.my_txt, "MESSSAGE");
OBO_FX.scrambleText(_root.text_mc.my_txt1, "MESSAGE");
OBO_FX.scrambleText(_root.text_mc.my_txt2, "MESSAGE");
};
all I ahve in website2.swf regarding this issue is import OBO_FX
devonair
October 9th, 2006, 11:16 PM
Could be a few things. When you load a .swf into another, the _root "changes" (that is it always points to the _root of the loading .swf) which is why it's suggested you should avoid referring to "_root" and use relative paths instead. Also the MovieClip.onLoad() method is only for MovieClips linked to a class file, so that may be causing the problem.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.