Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 07-12-2004, 15:05   #1 (permalink)
Neuer User
 
Registriert seit: Dec 2004
Beiträge: 122
Malen bzw Zeichnen in Flash mit actionscript????

Hallo...

...wie schaffe ich es, da ich im Flash per Actionscript AUF einem Bild malen kann. Also ich hab ein hintergrundbild und darauf möchte ich was einzeichnen. Habe auch schon scripte gefunden, mit denen mal zecihnen kann, aber leider zeichnen die nur auf dem Weißen Hintergrund. Sobald ein Bild eingefügt wird, mal er automatisch unter dem bild und nicht AUF dem Bild. Auch wenn die die anordnugn der layer ändere!

Kann mir jemand helfen????????? THX
bluscht ist offline   Mit Zitat antworten
Alt 07-12-2004, 15:15   #2 (permalink)
Phlasher
 
Benutzerbild von gerard
 
Registriert seit: Nov 2001
Ort: Unna-Königsborn (NRW)
Beiträge: 466
Wenn du auf ein Bild malen möchtest:

Bild auf Ebene 1
Malfläche als Leres MC auf Ebene 2
Mit AS in MC auf Ebene 2 mahlen
__________________
Keep on Flashing
gerard ist offline   Mit Zitat antworten
Alt 07-12-2004, 15:28   #3 (permalink)
Neuer User
 
Registriert seit: Dec 2004
Beiträge: 122
danke für schnelle Hilfe...

ich denke du meinst mit MC Movieclip????
das hab ich so gemacht...aber er malt mir immer nur unter dem Bild.

EBENE1: BG_Bild
Ebene2: Keyframe mit leerem Movieclip + Actionscript


Actionscript lautet:


this.onMouseMove = function() {
if (draw) {
_root.lineStyle(5, 0x000000, 100);
_root.lineTo(_root._xmouse, _root._ymouse);
}
};

this.onMouseDown = function() {
draw = true;
_root.moveTo(_root._xmouse, _root._ymouse);
};

this.onMouseUp = function() {
draw = false;
};

clear_btn.onRelease = function() {
_root.clear();
}



Ist das script eventuell falsch??? THX
bluscht ist offline   Mit Zitat antworten
Alt 07-12-2004, 16:55   #4 (permalink)
.
 
Registriert seit: May 2003
Ort: bayern
Beiträge: 1.117
du mußt dafür sorgen, daß deine malfläche über deinem bild liegt, z.B. so:

ActionScript:
  1. mc = this.createEmptyMovieClip("mc",1);
  2.  
  3. this.onMouseMove = function() {
  4.  
  5. if (draw) {
  6. mc.lineStyle(5, 0x000000, 100);
  7. mc.lineTo(_root._xmouse, _root._ymouse);
  8. }
  9. };
  10.  
  11. this.onMouseDown = function() {
  12. draw = true;
  13. mc.moveTo(_root._xmouse, _root._ymouse);
  14. };
  15.  
  16. this.onMouseUp = function() {
  17. draw = false;
  18. };
  19.  
  20. clear_btn.onRelease = function() {
  21. mc.clear();
  22. }
__________________
[mooseMash]
mooseMash ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 19:41 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele