?

Log in

No account? Create an account
Flash - brad's life — LiveJournal [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Flash [Jun. 2nd, 2001|06:34 pm]
Brad Fitzpatrick
I'm taking a break from studying to learn Macromedia Flash. I noticed they had a free download of the authoring software on their website.

Fear.

Update: That was fun for, like... 5 minutes almost. Need to get back to studying. I'll resume making ghost symbols and scaling and rotating them after finals.
LinkReply

Comments:
[User Picture]From: firelegend
2001-06-02 08:04 pm (UTC)

ah the wonders of flash..

haha cool link, i hate those stupid screans ya have to fill out..

If you are bored again, try this:
(you can do this in the object "actions" window; put it into "expert mode" - the little arrow in the top right is a drop down)

put this on a circle GRAPHIC SYMBOL you make in the main scene:


onClipEvent(enterFrame){
if(_root.clicked=="up"){
this._y--;
}else if(_root.clicked=="down"){
this._y++;
}else if(_root.clicked==""){
this._y = this._y;
}
}


put this on an up arrow BUTTON you make in the main scene:


on(press){
clicked = new String();
clicked = "up";
}
on(release){
clicked = "";
}

put this on an down arrow BUTTON you make in the main scene:

on(press){
clicked = new String();
clicked = "up";
}
on(release){
clicked = "";
}

// note: == is like an is statment and ++ is the
// equivilant to x + 1 and -- is like x - 1 ...
(Reply) (Thread)
[User Picture]From: bradfitz
2001-06-02 09:01 pm (UTC)

Re: ah the wonders of flash..

I can see what the above code does without even trying it.... you click and hold a button to make it move up or down. Yes, Flash sure is wonderful. :)

Although for your down button you meant to do clicked = "down". Or, easier: clicked = new String("down"), probably.
(Reply) (Parent) (Thread)
[User Picture]From: firelegend
2001-06-02 09:31 pm (UTC)

Re: ah the wonders of flash..

yeah yeah i was freakin coping and pasting outa ma
movie MO FO!!!!!!! You always pickin on me :P

yeah clicked = new String("down") works, though some would say declaring the new string is good form.. but ya don't have to do it.. I dunno!
(Reply) (Parent) (Thread)
[User Picture]From: bradfitz
2001-06-02 10:05 pm (UTC)

Re: ah the wonders of flash..

Allow me to pick on you more....

clicked = new String()

is not a declaration. In fact, you seem to not declare "clicked" at all. A declaration is a statement that assigns a type to a symbol within a namespace.

Doing:

clicked = new String();
clicked = "up";

is actually more wasteful than:

clicked = new String("up");

Because in the prior case, you call the constructor of the String class and it sets its length member to 0, and depending on how efficient it is, allocates a zero length string for it. Then, on the next line the constructor is called again, since in most languages like that assignments of string literals are overloaded in the language spec to be assignments to a new construction of a String with the string literal as the arguement to the constructor.

That is, this:

foo = "bar";

is changed to:

foo = new String("bar");

at compile-time. (where by compile-time I don't care if it's an interpretted language... it's still compiled into some form before being interpretted)

So, your way of doing it in two lines is equivalent to:

clicked = new String();
clicked = new String("up");

But... you don't handle memory management in ActionScript do you? So that means the clicked symbol has a reference count on it... the old empty String you had assigned to it now has to be discarded, so your way is not only an extra line, but it's either slower (if the free happens immediately), or bloated (if the extra instance of the string object lives on for awhile, before a garbage collecting thread comes along and cleans up)

If you want to discuss languages, compilers, or any other geeky CS topic, you know where to find me. :)

(Reply) (Parent) (Thread)
[User Picture]From: eyenot
2001-06-03 12:47 am (UTC)
flash is extremely limited, and content authoring even with the best tools (macromedia's own, available in free trial or extremely expensive versions) is far too time-consuming to even consider. on the other hand the possibility of being featured at newgrounds is tempting.
(Reply) (Thread)
[User Picture]From: mart
2001-06-03 04:38 am (UTC)

Ahem... "yuck." )

(Reply) (Thread)
From: ibrad
2001-06-04 04:36 pm (UTC)
Thank you.
(Reply) (Parent) (Thread)