Questions tagged [document-class]

39 questions
15
votes
3 answers

Accessing the Document class in AS3

How can instantiated classes access the Document class? Even after I name the Document class using the Properties bar in Flash, attempting to access it from other classes usually fails, saying "attempting to access an undefined property... One…
Robin Rodricks
  • 99,791
  • 133
  • 372
  • 575
4
votes
1 answer

`root` changes in different places

In ActionScript 3, I've read that the root variable references an instance of the Document Class. Within my document class constructor, a trace(this == root) returns true. Later in the constructor, a constructor of another class is called. This…
wchargin
  • 14,264
  • 11
  • 61
  • 106
4
votes
2 answers

Running AS3 Function Asynchronously

I'm having a bit of trouble making sense of some of the tutorials for this online, thus why I'm asking here. (Using ActionScript 3, Adobe AIR, and Flash Professional CS5.5) I have a very heavy function in my AS3 document class that I need to run…
CodeMouse92
  • 6,515
  • 12
  • 65
  • 124
1
vote
1 answer

Flash TypeError: Error #1009: Cannot access a property or method of a null object reference. - when accessing TLFTextField from Document Class

I'm lost on this one. I receive a TypeError: Error #1009: Cannot access a property or method of a null object reference. output message the first time my Document Class tries to access a simple textfield on the stage (added from the IDE, not…
yellow-saint
  • 668
  • 1
  • 12
  • 31
1
vote
2 answers

display lines in AS3

I am baffled by this function, which is called prior to this with parameters 22 and 58 for xVal ad yVal respectively. It doesn't display anything when the swf is compiled and tested, and it's error free. The code is in the document class: …
Colin Brogan
  • 726
  • 10
  • 22
1
vote
2 answers

How to add a subtitle in class article in Latex?

I am writing a report in Latex and my document class must be article. I want to add some additional text under my title but I can't find anything that would correspond to a subtitle command. Does anyone have any…
Pete97
  • 21
  • 1
  • 5
1
vote
2 answers

Differences between timeline code vs Document class code

I'm trying to explain the differences between writing timeline code vs Document Class code, so far I have: Timeline code: - doesn't require a package and class declaration Document Class code: - requires a package and class declaration Timeline…
redconservatory
  • 19,528
  • 37
  • 112
  • 184
1
vote
0 answers

Is it possible to use documentclass like wileySix as book template in rmarkdown?

I would like to use a different template than the default defined for documentclass: book such as the wileySix. Would that be possible? Maybe by including in_header: file.tex and inside such file I could define \documentclass{wileySix}? Then…
Fábio Salles
  • 325
  • 4
  • 13
1
vote
3 answers

AS3 trouble instantiating Document Class of loaded SWF

I am loading one swf into another using the Loader class, but when the child swf finishes loading and is added to the display list, its Document Class is not instantiated. I have a few trace statements that should execute when the object is created,…
Marcy Sutton
  • 847
  • 12
  • 21
1
vote
0 answers

ActionScript 3.0 Document Class not extending to MovieClip or Sprite

Can I have a document class which is not extending to either sprite or movieclip, but this is extending to an another class which is inherited by Sprite? I have to access stage in document class, but I am getting stage as null object…
1
vote
1 answer

as3 accessing objects and vars on main timeline from class

I am trying to access vars, functions and objects hard coded on the main timeline from a class. The Objects, vars etc... are loaded when I call a function in the class like this: Some code from main timeline: import com.beauMoves; var bm = new…
Papa De Beau
  • 3,416
  • 17
  • 75
  • 132
0
votes
1 answer

Assigning to typed variables across SWF boundaries breaks

I'm writing an application that uses extendable UI elements, whose precise implementation is determined at run-time using configuration. So for example, I want to show a list of items, which - depending on the configuration - may be shown as…
Guss
  • 24,799
  • 13
  • 87
  • 109
0
votes
2 answers

Flash cs5 code location confusion

Whenever I place the following code on the first frame of my movie, it works fine: var strGlobal:String = "Global"; function scopeTest() { trace(strGlobal); // Global } scopeTest(); trace(strGlobal); // Global But when I remove it and…
Brandon
  • 81
  • 3
  • 10
0
votes
1 answer

dynamically draw circle preloader error 1061 when in document class

I found a tutorial on how to make a dynamic unfilled and filled circle. that will take input from a slider to dertermine how much of the circle is drawn. I wanted to use this for a preloader. Unlike the author I would like to use it inside of a…
Yamiko
  • 4,605
  • 4
  • 26
  • 48
0
votes
1 answer

Stage properties in custom class, not Document Class

I need to use stage.width/height in my CustomClass so I found some topics about it. if (stage) { init(ar,firma,kontakt,oferta,naglowek,tekst,dane); } else { …
Błażej
  • 3,512
  • 7
  • 31
  • 59
1
2 3