Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

Classi esterne as3

This is a discussion on Classi esterne as3 within the FLEX builder 3 forums, part of the Flash CS3 e Actionscript 3.0 category; Vorrei che mi comparisse la scritta Hello World, Luca sul controllo Text ma non riesco Code: private function init():void { ...


Go Back   Forum Flash CS3 Flash CS4 > Flash CS3 e Actionscript 3.0 > FLEX builder 3

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-07-08, 15:59
Junior Member
 
Join Date: Feb 2008
Posts: 6
Rep Power: 0
lucavalentino is on a distinguished road
Classi esterne as3

Vorrei che mi comparisse la scritta Hello World, Luca sul controllo Text ma non riesco

Code:

    

    
    
                private function init():void
            {
                var myGreeter:Greeter = new Greeter();
                mainText.text = myGreeter.sayHello("Luca");
            }    
    
    

Questa è la classe:
Code:
package 
{
    public class Greeter
    {

        public function sayHello (n:String):String
        {
            var greeting:String;
            greeting="Hello World, "+n;
            return greeting;
        }
    }
}
__________________
Amanti del Giappone http://xoomer.alice.it/lucavalesuzuki
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2 (permalink)  
Old 01-07-08, 16:11
Junior Member
 
Join Date: Feb 2008
Posts: 6
Rep Power: 0
lucavalentino is on a distinguished road
Riferimento: Classi estenre as3

il codice che non si vede eccolo:

HTML Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Text width="300" fontSize="24" textAlign="center" id="mainText" left="216" top="243" bottom="253" text="" enabled="true" alpha="1.0">
    <mx:Script>
        <![CDATA[
        private function init():void
            {
                var myGreeter:Greeter = new Greeter();
                mainText.text = myGreeter.sayHello("Luca");
            }    
        ]]>
    </mx:Script>
    </mx:Text>
</mx:Application>
__________________
Amanti del Giappone http://xoomer.alice.it/lucavalesuzuki
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Flash CS3 embed di pagine esterne menhir Flash CS3 Design 3 29-10-08 18:28
AIUTO:AS3 loader immagini esterne gaejin Actionscript 3.0 base 0 05-10-08 19:05
Papervision e classi esterne enricoB Actionscript 3.0 base 2 05-06-08 01:04
creare un menu e gestire sezioni esterne salvo AIUTO utilità free 5 04-06-08 21:23
Lettura Variabili esterne brunovr Flash CS3 generale 5 18-03-08 23:08


All times are GMT. The time now is 17:37.


Powered by vBulletin versione 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap


FlepStudio
by Filippo Lughi
P.IVA 03605860406