Adobe Extending Flash Professional CS4 Manuale Utente Pagina 109

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 560
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 108
87
EXTENDING FLASH CS4 PROFESSIONAL
Document object
Usage
document.currentPublishProfile
Description
Property; a string that specifies the name of the active publish profile for the specified document.
Example
The following example adds a new publish profile with the default name and then displays the name of the profile in
the Output panel:
fl.getDocumentDOM().addNewPublishProfile();
fl.outputPanel.trace(fl.getDocumentDOM().currentPublishProfile);
The following example changes the selected publish profile to "Default":
fl.getDocumentDOM().currentPublishProfile = "Default";
document.currentTimeline
Availability
Flash MX 2004.
Usage
document.currentTimeline
Description
Property; an integer that specifies the index of the active timeline. You can set the active timeline by changing the value
of this property; the effect is almost equivalent to calling
document.editScene(). The only difference is that you
don’t get an error message if the index of the timeline is not valid; the property is simply not set, which causes silent
failure.
Example
The following example displays the index of the current timeline:
var myCurrentTL = fl.getDocumentDOM().currentTimeline;
fl.trace("The index of the current timeline is: "+ myCurrentTL);
The following example changes the active timeline from the main timeline to a scene named "myScene":
var i = 0;
var curTimelines = fl.getDocumentDOM().timelines;
while(i < fl.getDocumentDOM().timelines.length){
if(curTimelines[i].name == "myScene"){
fl.getDocumentDOM().currentTimeline = i;
}
++i;
}
See also
document.getTimeline()
Vedere la pagina 108
1 2 ... 104 105 106 107 108 109 110 111 112 113 114 ... 559 560

Commenti su questo manuale

Nessun commento