Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do Dictionaries Work Within and Between a Class?

Engaged ,
Jul 24, 2014 Jul 24, 2014

I am attempting to understand the connection between the dictionary and the class.

In the code below a dictionary is established in the Assets class. This class manages all of the assets in the project. Other classes can request the images in this Assets class. For example, in the following code the Welcome class is requesting a background image from the Assets class: bg = new Image(Assets.getTexture(”BgWelcome”));

But I don't see how these images are automatically placed in the dictionary. I don't see the connection beyond the fact that they are embedded within the class.

FYI, the example uses Starling API's (e.g. texture)

*Code taken from Hungry Hero Tutorial

DictionaryQuestion.png

TOPICS
ActionScript
409
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 25, 2014 Jul 25, 2014

you need to understand the embed directive, Adobe Flex 4.6 * Embedding asset types

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 25, 2014 Jul 25, 2014

Thanks. That is useful. Also here's a response I got from the Starling Forum:

The class is Assets

Where it says bitmap = new Assets[name]
It's getting the texture class embedded in that class. You don't need to write this out like in that tutorial. Starling comes with an assetmanager. Give that a read.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 25, 2014 Jul 25, 2014

Also, where do I mark as correct or helpful? That option is not visible like in the older system. I checked "Actions," not there.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 25, 2014 Jul 25, 2014

the first item in the actions dropdown is 'mark as helpful'.  at least, that's what i see.  also there's 'correct answer' button attached to each message.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 26, 2014 Jul 26, 2014
LATEST

In the Actions dropdown it says "No actions are available." I've check my profile settings as well and don't see anything to help. I'll contact Adobe to see what the problem is.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines