+ Reply to Thread
Results 1 to 7 of 7

Caricamento filmati e posizionamento allo Stage...

This is a discussion on Caricamento filmati e posizionamento allo Stage... within the Actionscript 3.0 base forums, part of the Flash Italiano category; Ciao Flep! ho un picco lo problem...ho un swf contenitore che mi carica un intero sito in cui ho impostato ...

  1. #1
    Junior Member Settled In SWFish is on a distinguished road SWFish's Avatar
    Join Date
    Jan 1970
    Posts
    22
    Rep Power
    0

    Caricamento filmati e posizionamento allo Stage...

    Ciao Flep!
    ho un picco lo problem...ho un swf contenitore che mi carica un intero sito in cui ho impostato le dimensioni 100% no scale etc...per avere la barra preload al centro dello schermo! Ora una volta caricato l'swf come faccio da questo a posizionare gli elementi tenendo come riferimento le dimesioni dello stage... in poche parole vorrei posizionare in menù che ho nell'swf caricato al centro dello schermo ma con menu_mc.x=stage.stageWidth/2 non ottengo nulla!
    Spero di essere stato abbastanza chiaro..
    tanks

  2. #2
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,762
    Rep Power
    11

    Re: Caricamento filmati e posizionamento allo Stage...

    In che senso non ottieni nulla ?
    Il menu non si sposta ?
    Prova anche a fare dei trace del tipo:
    trace(stage.stageWidth/2);
    trace(menu_mc.x);

  3. #3
    Junior Member Settled In SWFish is on a distinguished road SWFish's Avatar
    Join Date
    Jan 1970
    Posts
    22
    Rep Power
    0

    Riferimento: Caricamento filmati e posizionamento allo Stage...

    si..non si sposta!
    se faccio un trace(stage.width) e pubblicol'swf con il menù mi da le dimensioni dell'swf, ma se se pubblico l'swf contenitore in cui carico l'sfw con all'interno il menù mi da:

    TypeError: Error #1009: Impossibile accedere a una proprietà o a un metodo di un riferimento oggetto null.
    at index_fla::mc_menu_1/index_fla::frame1()


  4. #4
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,762
    Rep Power
    11

    Re: Caricamento filmati e posizionamento allo Stage...

    Usi Event.ADDED_TO_STAGE nel codice dell' SWF che carichi ?

    Altrimenti quando lo carichi, lui come fa a sapere quale è lo stage ?
    L' SWF che carichi ha una Document Class ? O ha codice solo sulla timeline ?

  5. #5
    Junior Member Settled In SWFish is on a distinguished road SWFish's Avatar
    Join Date
    Jan 1970
    Posts
    22
    Rep Power
    0

    Riferimento: Caricamento filmati e posizionamento allo Stage...

    no non ho usato l'added_to_stage...e cioè?
    il codice è scritto sulla timeline...

  6. #6
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,762
    Rep Power
    11

    Re: Caricamento filmati e posizionamento allo Stage...

    Devi usare ADDED_TO_STAGE o altrimenti il tuo SWF perde la gerarchia e non trova lo stage.

    Fai così:
    nel FLA dell' SWF che vuoi caricare scrivi:
    Code:
    this.addEventListener(Event.ADDED_TO_STAGE,go);
    
    function go(evt:Event):void
    {
    	// quì' inizi col codice che hai sulla timeline
    }
    In questo modo quando caricherai l' SWF, da dentro la funzione go puoi recuperare lo stage.
    Prova con untrace da dentro alla funzione go: trace(stage.stageWidth);

    Abituati a lavorare molto con i trace perchè sono un aiuto incredibile !

  7. #7
    Junior Member Settled In SWFish is on a distinguished road SWFish's Avatar
    Join Date
    Jan 1970
    Posts
    22
    Rep Power
    0

    Riferimento: Caricamento filmati e posizionamento allo Stage...

    Azz! Ora funziona!!
    Eh si hai ragione...devo applicarmi di più con sti cacchio di trace!!
    Cmq grazie ancora sei un grande!

+ Reply to Thread

Similar Threads

  1. [FL CS3 + AS3] Posizionamento nello stage al resize
    By steveaustin1974 in forum Actionscript 3.0 avanzato
    Replies: 15
    Last Post: 28-02-11, 15:06
  2. problema posizionamento oggetto su stage
    By giannicasa in forum Actionscript 3.0 base
    Replies: 3
    Last Post: 14-10-09, 11:40
  3. corson 18 allineare le clip allo stage
    By susannac in forum Video corsi
    Replies: 2
    Last Post: 20-06-09, 16:34
  4. Accedere allo stage da una classe secondaria
    By Adodado in forum Actionscript 3.0 avanzato
    Replies: 2
    Last Post: 29-11-08, 10:36
  5. Caricamento filmati e posizionamento allo Stage...
    By SWFish in forum Actionscript 3.0 avanzato
    Replies: 1
    Last Post: 04-11-07, 16:46

Tags for this Thread

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