+ Reply to Thread
Results 1 to 4 of 4

leggere variabili da as esterno

This is a discussion on leggere variabili da as esterno within the Actionscript 3.0 base forums, part of the Flash Italiano category; Salve, avrei bisogno di accedere ad una variabile di una classe definita in un file as esterno chiamato mp3main.as il ...

  1. #1
    Junior Member Settled In dockers is on a distinguished road
    Join Date
    Jun 2009
    Posts
    3
    Rep Power
    0

    leggere variabili da as esterno

    Salve, avrei bisogno di accedere ad una variabile di una classe definita in un file as esterno chiamato mp3main.as
    il file mp3main.as è così :

    package
    {
    //import all flash.events net media etc etc.....
    // poi

    public class Mp3Main extends MovieClip{
    public var url:URLRequest;
    public var xmlLoad:URLLoader;
    public var musicXML:XML;
    public var song:Sound;
    public var channel:SoundChannel;
    public var sndTrans:SoundTransform;
    public var position:Number;
    public var textformatting:TextFormat;

    public function Mp3Main() {
    position = 0;
    sndTrans = new SoundTransform(vol_mc.percent);
    url = new URLRequest("music.xml");
    xmlLoad = new URLLoader(url);
    etc etc...


    ho bisogno di accedere alla variabile channel nel mio progetto fla.
    come posso fare?
    ho provato con :

    import Mp3Main;
    var canale:SoundChannel = Mp3Main.channel;

    ma evidentemente non è questa la sintassi corretta, qualcuno può darmi una mano??
    Grazie in anticipo a tutti!
    Jerry

  2. #2
    Junior Member Settled In dockers is on a distinguished road
    Join Date
    Jun 2009
    Posts
    3
    Rep Power
    0

    Re: leggere variabili da as esterno

    nessuno sa aiutarmi in qualche modo??

  3. #3
    Member Settled In Matita is on a distinguished road
    Join Date
    Mar 2009
    Posts
    31
    Rep Power
    0

    Re: leggere variabili da as esterno

    in flash devi scrivere cosi':

    Code:
    import Mp3Main;
    
    var mp3:Mp3Main = new Mp3Main();
    var channel:SoundChannel = mp3.channel;

  4. #4
    Junior Member Settled In dockers is on a distinguished road
    Join Date
    Jun 2009
    Posts
    3
    Rep Power
    0

    Re: leggere variabili da as esterno

    Ok ti ringrazio ho risolto, molto gentile!

+ Reply to Thread

Similar Threads

  1. Loading un swf esterno su di un nuovo livello con variabili x e y
    By abacigalupo in forum Flash CS3 | PHP | mySQL
    Replies: 0
    Last Post: 15-05-10, 15:29
  2. Passare variabili da MC esterno a Stage principale
    By Fiol84 in forum Actionscript 3.0 base
    Replies: 5
    Last Post: 07-12-09, 11:23
  3. Leggere file txt AS3
    By joker89 in forum Actionscript 3.0 base
    Replies: 3
    Last Post: 28-01-09, 05:13
  4. swf esterno + passaggio variabili
    By Nerlaleph in forum Actionscript 3.0 base
    Replies: 9
    Last Post: 01-12-08, 16:46
  5. leggere as3 esterno dal file.as (prob. import)
    By ehijon in forum Actionscript 3.0 base
    Replies: 1
    Last Post: 01-03-08, 18:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts