Visualizzazione dei risultati da 1 a 4 su 4

Discussione: Lavagna in Flash

  1. #1

    Lavagna in Flash

    Vorrei sapere se è possibile creare un pannello in flash tipo una lavagna in cui l'utente possa Disegnare. Un po' tipo quella di Msn quando si usa la modalità scrittura a mano...

    Esiste una cosa del genere?

  2. #2

  3. #3
    codice:
    function Drawing(__path, __color) {
    	// andr3a, scritta al volo il 28/01/2006
    	// compatibile Flash 6, 7, 8 .. forse pure FlashLite 2.0
    	function __init(__path, __s, __color) {
    		var __listener = __initListener(__path, __s, __color);
    		Mouse.addListener(__listener);
    		__initMenu(__path, __listener);
    	};
    	function __initListener(__path, __s, __color) {
    		var __listener = new Object();
    		__listener.path = __path[__s];
    		__listener.onMouseDown = function() {
    			this.__draw = true;
    			this.path.moveTo(__path._xmouse, __path._ymouse);
    		};
    		__listener.onMouseMove = function() {
    			if(this.__draw) {
    				with(this.path) {
    					lineStyle(1, __color);
    					lineTo(__path._xmouse, __path._ymouse);
    				}
    			}
    		};
    		__listener.onMouseUp = function() {
    			this.__draw = false;
    		};
    		__listener.clearDrawed = function() {
    			__path[__s].clear();
    		};
    		return __listener;
    	};
    	function __initMenu(__path, __listener) {
    		if(ContextMenu) {
    			var __cmenu = new ContextMenu();
    			__cmenu.customItems.push(new ContextMenuItem("Clear", __listener.clearDrawed));
    			__path.menu = __cmenu;
    		};
    	};
    	function __depth(__path) {
    		var __depth = 1000;
    		if(__path.getNextHighestDepth)
    			__depth = __path.getNextHighestDepth();
    		return __depth;
    	};
    	var __s = '__drawing__' + Math.random() * 123456789 + '__';
    	__path.createEmptyMovieClip(__s, __depth(__path));
    	__init(__path, __s, __color);
    }
    Drawing(this, 0x00000);
    Formaldehyde a new Ajax PHP Zero Config Error Debugger

    WebReflection @WebReflection

  4. #4
    SI può risalire alle cordinate dei disegni fatti???
    MITTICCOOOOOOOOO!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.