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 unutar MovieClipa

 
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
sadnraxx



Joined: 03 Feb 2009
Posts: 1

PostPosted: 03.02.2009 09:32    Post subject: Crtanje unutar MovieClipa Add user to your forum ignore list Reply with quote

imam sljedeci kod AS3 na prvom frameu :

Code:

stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
stage.addEventListener(Event.RESIZE, resizeHandler);

 
         function mouseUpHandler(param1:MouseEvent) : void
        {
            stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
            return;
        }
   

        function mouseMoveHandler(param1:MouseEvent) : void
        {
            var _loc_2:Graphics;
            _loc_2 = graphics;
            _loc_2.lineStyle(10, 6710784);
            _loc_2.lineTo(stage.mouseX, stage.mouseY);
            return;
        }

         function mouseDownHandler(param1:MouseEvent) : void
        {
            var _loc_2:Graphics;
            stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);           
            _loc_2 = graphics;
            _loc_2.moveTo(stage.mouseX, stage.mouseY);
            return;
        }
             function refreshUI() : void
        {
            clickToDraw_mc.x = stage.stageWidth / 2 - clickToDraw_mc.width / 2;
            clickToDraw_mc.y = stage.stageHeight / 2 - clickToDraw_mc.height / 2;
            return;
        }
           function resizeHandler(param1:Event) : void
        {
            refreshUI();
            return;
        }


i ovo radi super..znaci mogu misem fino crtati po cjelom stageu. problem je sljedeci..importam sliku , Import -> import to library (ajmo rec tlocrt rukometnog igralista)..i sad taj image drag'n dropam na stage..sada crtanje radi ali radi ispod te insertane slike..znaci crtam na layeru na kojem sam i crtao ali ne preko slike...pitanje je kako da li tu insertanu sliku treba prebaciti u MovieClip i onda se u AS kodu referencirati na taj movieclip..ili kako dobiti da mogu crtati po toj slici..finalni produkt bi trebalo biti whiteboard sa tlocrtom igralista (nesto kao ono sta imaju treneri za slaganje akcija)..hvala unaprijed!
Back to top
View user's profile Send private message
Ivan Podrug - e1



Joined: 15 Apr 2005
Posts: 316
Location: Solin

PostPosted: 03.02.2009 10:50    Post subject: Add user to your forum ignore list Reply with quote

zamijeniti dubine importiranog ( slike ) i postojećeg objekta ?
flash swap depths?

_________________
there R only 10 typs of ppl.
Those who understand binary & those who don't.
Back to top
View user's profile Send private message
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