Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
crtanje u flashu

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Flash
View previous topic :: View next topic  
Author Message
celebrus



Joined: 15 Aug 2004
Posts: 15
Location: VG

PostPosted: 15.08.2004 23:05    Post subject: crtanje u flashu Add user to your forum ignore list Reply with quote

zanima me crtanje pomoću action scripta(ako je uopće moguće).
ko zna, može kratak uvod?
Back to top
View user's profile Send private message Send e-mail
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 16.08.2004 01:04    Post subject: Re: crtanje u flashu Add user to your forum ignore list Reply with quote

celebrus wrote:
zanima me crtanje pomoću action scripta(ako je uopće moguće).
ko zna, može kratak uvod?

Napraviš empty movie clip i na njemu koristiš metode lineStyle, lineTo, curveTo, clear, moveTo... i good luck Smile you'll need it

naravno, vidio sam negdje da neki lik radi ekstenzije ili klase pomoću kojih se lakše crta, takvih stvari ima sigurno ali treba to nać. Ovo što sam nabrojao je osnovno, try it out... ja tako crtam funkcije

Evo, kratko je kao što si htio. Good night
Back to top
View user's profile Send private message Send e-mail Visit poster's website
celebrus



Joined: 15 Aug 2004
Posts: 15
Location: VG

PostPosted: 16.08.2004 15:30    Post subject: Add user to your forum ignore list Reply with quote

da, probo sam, ali ništa nisam uspio. jel bi mi mogo stavit neki jednostavan kod da malo proučim?
Back to top
View user's profile Send private message Send e-mail
unique



Joined: 29 Mar 2004
Posts: 655

PostPosted: 04.10.2004 21:27    Post subject: Add user to your forum ignore list Reply with quote

copy - paste iz
ActionScripting in Macromedia® Flash™ MX
By Phillip Kerman

"...
duplicateMovieClip() methods just aren't enough for you, you'll be happy to see that Flash MX has a new method called createEmptyMovieClip(). This was added mainly to work with the new set of runtime drawing methods. However, I can think of ways to use it on its own. For example, I might want to create a single clip on the Stage that contains (has nested inside) two instances of other clips. I can first create an empty clip, and then use attachMovie() to place several other clips inside my new clip. For example:

Code:
//create an empty clip called " myInstance " in the main timeline
_root.createEmptyMovieClip("myInstance",1);
myInstance.attachMovie("box", "boxClip",1);
myInstance.attachMovie("circle", "circleClip",2);

The last two lines attach symbols (with linkage "box" and "circle") into the newly created clip. In this way, you can generate clips with dynamic contents.

Like I said, the createEmptyMovieClip() method enables you to first create a clip and then draw into that clip. Flash MX's drawing methods let you dynamically create lines, fills, and gradients into any clip. Although you can draw into a clip that contains graphics, the shapes you draw are just that—shapes. Therefore, they are placed underneath everything else. Anyway, the drawing methods appear to be very simple (and they are); however, applying them to do amazing things is more work.

The basic approach is first to create an empty clip, and then start drawing into it. When drawing lines, it's as though you first tell Flash what thickness and color pen you want, where to place it on the canvas, and then where to draw to. The methods are: lineStyle() or moveTo(), and then either lineTo() or curveTo() (depending on whether you want a straight line). Consider the following simple example in which I first create an empty clip, set the lineStyle(), tell Flash where to place the pen, and then draw a line down 100 pixels:

Code:
_root.createEmptyMovieClip("clip",1);
_root.clip.lineStyle(3,0x0000FF,100);
_root.clip.moveTo(0,0);
_root.clip.lineTo(0,100);

The first line creates an instance called clip into level 1. The second line sets the line thickness to 3, the color to blue, and the alpha to 100 percent. The third line tells the pen to start at 0,0, and the fourth line where to draw to. The only tricky part is the moveTo() method. Think of this as saying, "Pick up the pen and place it down at this point."

Let me complete a drawing of an arrow:
Code:

_root.clip.lineTo(100,50);
_root.clip.lineTo(0,0);
_root.clip.moveTo(0,50)
_root.clip.lineTo(-100,50)


..."

evo pa prouči Wink

_________________
Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE!
Back to top
View user's profile Send private message
celebrus



Joined: 15 Aug 2004
Posts: 15
Location: VG

PostPosted: 08.10.2004 09:53    Post subject: Add user to your forum ignore list Reply with quote

thnx. jedinstveni, baš sam mislio postaviti novi post u vezi s duplicateMovieClip, pa samo vidio ovo. budem proučio.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Flash All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group