# Tips to more efficient AS

**URL:** <https://forum.kirupa.com/t/tips-to-more-efficient-as/15333>\
**Category:** flash\
**Created:** [March 13, 2003, 3:01am UTC](https://forum.kirupa.com/t/tips-to-more-efficient-as/15333 "2003-03-13T03:01:07Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbDien](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sbDien](https://forum.kirupa.com/u/sbDien)\
**Post date:** [March 13, 2003, 3:01am UTC](https://forum.kirupa.com/t/tips-to-more-efficient-as/15333/1 "2003-03-13T03:01:07Z")

</div>

Can anybody give me any tips on reducing the amount of resource needed to run the script??

is there an alternative to ‘enterframe’ :-??

thanks…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 13, 2003, 3:18am UTC](https://forum.kirupa.com/t/tips-to-more-efficient-as/15333/2 "2003-03-13T03:18:55Z")

</div>

It all depends on what your trying to accomplish.

mouseMove is an alternative to enterFrame, but it all depends on the effect you are looking to achieve.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 13, 2003, 3:19am UTC](https://forum.kirupa.com/t/tips-to-more-efficient-as/15333/3 "2003-03-13T03:19:00Z")

</div>

Sure…

(1)Always try your best to understand scripting.

If not ask another person dont stop trying to understand code.

(2)When you get Script do experiments with it make somthing with it.

(3)Whatever script you get make sure you do experiments with it like 5 times.

(4)Make tutorials about the scriipt you learned.

Because nieether what script you get they always connect.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 13, 2003, 3:20am UTC](https://forum.kirupa.com/t/tips-to-more-efficient-as/15333/4 "2003-03-13T03:20:23Z")

</div>

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=14670&highlight=faster+code](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=14670&highlight=faster+code)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 13, 2003, 3:21am UTC](https://forum.kirupa.com/t/tips-to-more-efficient-as/15333/5 "2003-03-13T03:21:49Z")

</div>

Hrmm… the DNS didn’t change for me yet Jubba…

[http://64.207.155.38/forums/showthread.php?s=&threadid=14670](http://64.207.155.38/forums/showthread.php?s=&threadid=14670)

Just in case.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 13, 2003, 3:21am UTC](https://forum.kirupa.com/t/tips-to-more-efficient-as/15333/6 "2003-03-13T03:21:53Z")

</div>

Im way off topic

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 13, 2003, 3:23am UTC](https://forum.kirupa.com/t/tips-to-more-efficient-as/15333/7 "2003-03-13T03:23:42Z")

</div>

oh… i didn’t even realize that it changed for me… lol 🙂

haha I’M BETTER THAN YOU ARE!!! 😛 :trout:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 13, 2003, 3:29am UTC](https://forum.kirupa.com/t/tips-to-more-efficient-as/15333/8 "2003-03-13T03:29:00Z")

</div>

[AS]jubbaBetter = false;  
!jubbaBetter ? trace(“true”) : trace(“man i suck”);[/AS]

😛

I love these new AS tags.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 13, 2003, 3:33am UTC](https://forum.kirupa.com/t/tips-to-more-efficient-as/15333/9 "2003-03-13T03:33:32Z")

</div>

```auto
jubba = "Awesome";
beta = "beta";
newArray = beta.split("");
trace("LostinBeat is " + newArray[0] + newArray[1] + newArray[3] + newArray[2] + "!!!");

```

hmmmm…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 13, 2003, 10:22am UTC](https://forum.kirupa.com/t/tips-to-more-efficient-as/15333/10 "2003-03-13T10:22:28Z")

</div>

> \*Originally posted by lostinbeta \*  
> \*\*

```php
jubbaBetter = false;
!jubbaBetter ? trace("true") : trace("man i suck");

```

😛

I love these new AS tags. \*\*

And YET you used PHP? lol

to further expand on the subject

Apparently using frame progression is even more efficient then onClipEvent(enterFrame). For example, having your setup script on frame 1, your running script on frame 2 and a gotoAndPlay(2) on frame 3. This was common in Flash 4 to get onEnterFrame event functionality and keeps any single movieclip from having to mess with onClipEvent events (or its own onEnterFrame for MX)

tweens arent necessarily that slow either. Ive done tests before with 100+ moving objects using tweens and actionscript, and the tweens usually end up going faster. It really depends on what you are trying to do here though. Motion with actionscript and tweens are different beasts. There are times when tweens will be better for the job and there are times when you woud have to use actionscript. Its all depends on context and what is trying to be achieved.

> _lostinbeta_:  
> mouseMove is an alternative to enterFrame, but it all depends on the effect you are looking to achieve.

Size matters though (yes what they say is a lie! it DOES matter!) where the smaller the area of change on the screen, the faster Flash will be able to redraw it. (and yes, transparency hurts!)

playamarz mentioned in the other thread that RAM isnt a problem, and thats true. I wouldnt feel constrained in terms of memory resources. You have plenty to work with. And if it DOES become a problem, then Flash isnt the right vehicle for that project.

actionscript-wise, see

> **[no|wrap.de - Flasm](https://flasm.sourceforge.net/#optimization)**
>
> Flasm is a free command line assembler/disassembler of Flash ActionScript bytecode. It lets you make changes to any SWF. Flasm fully supports SWFs produced by Macromedia Flash 8 and earlier.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 13, 2003, 11:23am UTC](https://forum.kirupa.com/t/tips-to-more-efficient-as/15333/11 "2003-03-13T11:23:08Z")

</div>

You can read that too:

[http://www.bit-101.com/forum/viewtopic.php?t=1188](http://www.bit-101.com/forum/viewtopic.php?t=1188)
