نوشته شده

هفت سین یک طراح وب و فلش کار! ۹

سلام خدمت دوستان عزیز….
با توجه به نزدیکی سال نو تصمیم گرفتن هفت سینی برای یک طراح وب بنویسم  ، اگه شما یک وبلاگ نویس هستید از شما دعوت می کنم این کار روی نسبت به علاقه و یا تخصص خودتون انجام بدید :

هفت سین یک طراح وب :

سی اس اس (Css)
سی پنل(CPanel – Control Panel)
سی ام اس (CMS – Content Management System)
ساب دامین (Sub Domain)
سایت (Site)
سرچ (Search)
سمی کالن (;)

و حالا هفت سین یک فلش کار کمی تخصصی (اکشن اسکریپت ۳) :

http://blog.iflashlord.com/wp-content/uploads/2010/03/7sin89-iflashlord.jpg

send

var sender:LocalConnection = new LocalConnection(  ); sender.send( "_exampleChannel", "example", "a string", 6.5, true);

setChildIndex

package {
  import flash.display.*;
  public class SetChildIndexExample extends Sprite {
    public function SetChildIndexExample(  ) {
      // Create three different colored circles and
      // change their coordinates so they are staggered
      // and aren't all located at (0,0).
      var red:Shape = createCircle( 0xFF0000, 10 );
      red.x = 10;
      red.y = 20;
      var green:Shape = createCircle( 0x00FF00, 10 );
      green.x = 15;
      green.y = 25;
      var blue:Shape = createCircle( 0x0000FF, 10 );
      blue.x = 20;
      blue.y = 20;

      // Add the circles, red has index 0, green 1, and blue 2
      addChild( red );
      addChild( green );
      addChild( blue );

      // Move the blue circle underneath the others by placing
      // it at the very bottom of the list, at index 0
      setChildIndex( blue, 0 );
    }

    // Helper function to create a circle shape with a given color
    // and radius
    public function createCircle( color:uint, radius:Number ):Shape {
      var shape:Shape = new Shape(  );
      shape.graphics.beginFill( color );
      shape.graphics.drawCircle( 0, 0, radius );
      shape.graphics.endFill(  );
      return shape;
    }
  }
}

setInterval

package {
    import flash.display.Sprite;
    import flash.events.TimerEvent;
    import flash.utils.Timer;

    public class ExampleApplication extends Sprite {
        // Declare and initialize a variable to store the value
        // of the previous timer reading.
        private var _PreviousTime:Number = 0;

        public function ExampleApplication(  ) {
            var tTimer:Timer = new Timer(500, 10);
            tTimer.addEventListener(TimerEvent.TIMER, onTimer);
            tTimer.start(  );
        }

        private function onTimer(event:TimerEvent):void {
            // Output the difference between the current timer value and
            // its value from the last time the function was called.
            trace(flash.utils.getTimer(  ) - _PreviousTime);
            _PreviousTime = flash.utils.getTimer(  );
        }
    }
}

Sound

package {
    import flash.display.Sprite;
    import flash.media.Sound;
    import flash.net.URLRequest;

    public class LoadSoundExample extends Sprite {
        private var _sound:Sound;

        public function LoadSoundExample (  ) {
            _sound = new Sound(  );
            _sound.load(new URLRequest("song.mp3"));
        }
    }
}

substr

var example:String = "Bunnies";
trace( example.substr( 0 ) );      // Displays: Bunnies
trace( example.substr( 0, 3 ) );   // Displays: Bun
trace( example.substr( 3, 3 ) );   // Displays: nie
trace( example.substr( -1 ) );     // Displays: s
trace( example.substr( -2, 5 ) );  // Displays: es

setColor

package {
  import flash.display.*;
  import flash.net.URLRequest;
  import flash.events.Event;

  public class LoaderExample extends Sprite {

    private var _loader:Loader;

    public function LoaderExample(  ) {
      // Create the Loader and add it to the display list
      _loader = new Loader(  );
      addChild( _loader );

      // Add the event handler to interact with the loaded movie
      _loader.contentLoaderInfo.addEventListener( Event.INIT, handleInit );

      // Load the external movie
      _loader.load( new URLRequest( "ExternalMovie.swf" ) );
    }

    // Event handler called when the externally loaded movie is
    // ready to be interacted with
    private function handleInit( event:Event ):void {
      // Typed as * here because the type is not known at compile-time.
      var movie:* = _loader.content;

      // Calls a method in the external movie to get data out
      // Displays: 0
      trace( movie.getColor(  ) );

      // Calls a method in the external movie to set data.
      // Sets the color in the external movie, which draws
      // a circle with the new color, in this case red
      movie.setColor( 0xFF0000 );
    }
  }
}

setTextFormat

field.html = true;
field.htmlText = "<b>Bold text</b> <u>Underlined text</u>";
var formatter:TextFormat = new TextFormat(  );
formatter.bold = true;       // Bold the text
formatter.color = 0xFFFF00;  // Make the text yellow
formatter.blockIndent = 5;   // Adjust the margin by 5 points
field.setTextFormat(formatter);

field.text = "this is sample text";
field.setTextFormat(formatter);    // Formatting applied
field.text = "this is new text";   // No formatting applied
field.setTextFormat(formatter);    // Formatting reapplied
field.text += "appended text";     // Formatting removed

پیشا پیش سال نو مبارک باد.. ;)

یک ستارهدو ستارهسه ستارهچهار ستارهپنج ستاره (45 رای ها, معدل: 498 از 5)
Loading ... Loading ...

مطالب مرتبط

تایید صحت ایمیل در اکشن اسکریپت ۳
سلام ، قصد دارم مدتی مقالات کوتاه  و کاربردی رو برای دوستان قرار بدم امیدوارم...
معکوس کردن یک رشته متنی در AS3
برای معکوس کردن یک رشته متنی راه های مختلفی وجود دارد در زیر سعی کردیم به...
آرایه ها در اکشن اسکریپت ۳
با سلام و تبریک مجدد فرخنده میلاد با سعادت یگانه منجی عالم آقا امام زمان...
استفاده از کلاس تاریخ در اکشن اسکریپت ۳
فلش CS4 |  اکشن اسکریپت ۳/۰ | سطح مقدماتی در این خودآموز شما به  نحوه استفاده...

آدرس ایمیل شما :


اشتراک فید نظرات

تا به حال ۹ نظر به این مطلب داده شده است

  1. محسن می‌گه:

    سلام
    عید شما هم مبارک یه سری ایمیل و پیغام و اینا دادم بهتون جواب ندادید منتظرم هنوز موفق باشی رفیق !

  2. زری می‌گه:

    دلهای پر مهرمان را به روزهای سبز و زیبای بهار پیوند می زنیم و شادی را برای یکدیگر به ارمغان می آوریم.

    بهروز عزیز آغاز فصل جدید بر شما خجسته باد

  3. پیام می‌گه:

    جالب بود
    سال نو مبارک
    موفق باشید

  4. محمد حسین می‌گه:

    سلام بهروز جان…
    خسته نباشی!
    مطلب خوبی بود…
    مخصوصا ۷سین ها!!
    موفق و پیروز باشی
    محمد حسین

  5. DaDaDooDOo می‌گه:

    سلام سال نو مبارک ، من setChildIndex نداشتم کلاً Syntax فلش رو گذاشتم … اشکال نداره ؟

شما می توانید نظر خود را در اینجا وارد نمایید

* بخش های ستاره دار الزامی است