Показать сообщение отдельно
Старый 25.01.2012, 19:59
Nikolay00700 вне форума Посмотреть профиль Отправить личное сообщение для Nikolay00700 Найти все сообщения от Nikolay00700
  № 14  
Ответить с цитированием
Nikolay00700

Регистрация: Dec 2011
Сообщений: 40
Код AS3:
package 
{
	import flash.text.TextField;
	import flash.display.Sprite;
	import flash.text.TextFormat;
	import flash.events.*;
 
	public class Proba  extends Sprite 
	{
 
		[Embed(source = '../../lib/arialbd.ttf', fontName = 'Arial bold', mimeType = 'application/x-font' )]
		private static const FontClass:Class;
		public static var font:String = (new FontClass()).fontName;
 
 
		public var image:some_image = new some_image();//картинка 40х40
		private var f_text:TextField = new TextField();
		private var text_format:TextFormat = new TextFormat();
		private var Contein:Sprite = new Sprite();
 
		public function Proba() 
		{
			addChild(image);
			image.x = -50;
			image.y = -50;
			image.width = 100;
			image.height = 100;
 
 
			addChild(f_text);
			f_text.x = -20;
			f_text.y = -20;
			f_text.embedFonts = true;
			f_text.text  = "proba";
 
 
			addChild(Contein);
			Contein.addChild(image);
			Contein.addChild(f_text);
 
 
			text_format.bold = true;
			text_format.font = font;
			text_format.size = 18;
			f_text.textColor  = 0xffffff;
 
			f_text.setTextFormat(text_format);
 
 
			this.x = 100;
			this.y = 100;
 
			Contein.addEventListener(MouseEvent.CLICK, move);
 
 
		}
 
		public function move(e:Event):void 
		{
			Contein.rotation += 2;
		}
 
 
 
	}
 
}
Ну не работает у меня....
Я не понимаю что снова не так...
По аналогии с предложенным elder_Nosferatu кодом доработал свой...
Результат - без изменений...