header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
action2n3
Points:200
Posts:0
Answered

9/29/2010 7:52:01 AM

Title: Difference between movieclip and sprite?


I have a question in mind from long time. What is the difference between MovieClip and Sprite? I know Sprite is single frame movieclip without timeline we can not use methods like gotoAndPlay and gotoAndStop for sprite. But what else? MovieClip must be having some major advantage over Sprite or major difference, any idea?

Thanks



1
Davis
Points: 780
Posts:0
9/29/2010 8:46:16 AM



Sprite is the most basic object we have in flash with only the smallest number of properties required to exist in flash , its similar to a drawing object created in flash. It does not have timeline and actionscript inside so it basically a design element. Sprite is very light weight and can be used to draw graphics where movieclip is not required. For e.g if you want to draw a rectangle object , you can simply declare a sprite and draw rectangle in sprite. So this is a very light weight object you created.

2
action2n3
Points: 200
Posts:0
9/29/2010 9:22:42 AM



Thanks for sharing. The info provided is very help full to understand. I hope there will be some other differences.

3
bob_senior
Points: 1320
Posts:0
Accepted Answer
9/29/2010 10:03:59 AM



Sprite Class is introduced in AS 3.0 . The reason behind was to provide a light weight graphic element which provides similar functionality to movieclip but without timeline. Sounds not so important but with actionscript 3.0 the scripting became extensive in flash, and developers started creating lot of components. Now you can understand that for creating User Interface most of the times we do not require animation inside which means no time line required. To give you an example lets assume we create 20 buttons for our flash application. Now If we are using movieclips inside buttons then they all will play there timeline and hence put stress on processor unwarrantably. So in this case we have 20 movieclips playing simultaneously without the need. But if you use 20 sprites as design inside your buttons then there is no processor overhead. So actually the sprite class we introduced so we can create User Interface without compromising performance.

For more technical Information you can see the details on Adobe pages :

http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/display/Sprite.html
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/display/MovieClip.html

4
action2n3
Points: 200
Posts:0
9/30/2010 12:54:07 AM



Thanks bob_senoir this is very use full information. It cleared lots of questions :)

5
Rohit
Points: 0
Posts:0
7/14/2011 9:26:04 PM



Cool nice description bob_senior and Davis.

Thanks

6
Tukenmezkelam
Points: 0
Posts:0
9/25/2011 11:15:07 AM



Nice.

7
wewe
Points: 0
Posts:0
4/1/2012 5:46:18 AM



thanx alot


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 4+8 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions