changed nmml format in latest nme?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

changed nmml format in latest nme?

Alex Liebert
Greetings,

Testing svn nme against flash target now, but I have things like this in my nmml:

<image id="shadow-hi" name="gameassets/imagehigh/foodshadow.png" />

The generated code then puts this in getAsset under applicationmain:

if (inName=="omshadow-hi")
 
            return Assets.getBitmapData ("gameassets/imagehigh/om_shadow.png");

however, the generated Assets class is looking for the 'id' attribute again, not name.

is getAsset() deprecated?  or ID?

Alex


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: changed nmml format in latest nme?

Alex Liebert
( ican change ::resourceName:: to ::id:: in the ApplicationMain.getAsset() template to fix this, but am not clear if this is the right solution and what the intended asset path is)


On Fri, Sep 23, 2011 at 1:24 PM, Alex Liebert <[hidden email]> wrote:
Greetings,

Testing svn nme against flash target now, but I have things like this in my nmml:

<image id="shadow-hi" name="gameassets/imagehigh/foodshadow.png" />

The generated code then puts this in getAsset under applicationmain:

if (inName=="omshadow-hi")
 
            return Assets.getBitmapData ("gameassets/imagehigh/om_shadow.png");

however, the generated Assets class is looking for the 'id' attribute again, not name.

is getAsset() deprecated?  or ID?

Alex



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: changed nmml format in latest nme?

singmajesty
Alex,

I've committed an update to SVN to fix this issue. Thank you for catching  
this.

Yes, it should be using the ID twice... then in nme.installer.Assets it  
should use resourceName


ApplicationMain.getAsset () still exists, but nme.Assets is a new API that  
allows you to access assets, strictly typed. It also provides a  
convenience method of "getText" over "getBytes", to read a string-based  
file instead of having to convert from bytes yourself.



On Fri, 23 Sep 2011 13:26:42 -0700, Alex Liebert  
<[hidden email]> wrote:

> ( ican change ::resourceName:: to ::id:: in the  
> ApplicationMain.getAsset()
> template to fix this, but am not clear if this is the right solution and
> what the intended asset path is)
>
>
> On Fri, Sep 23, 2011 at 1:24 PM, Alex Liebert  
> <[hidden email]>wrote:
>
>> Greetings,
>>
>> Testing svn nme against flash target now, but I have things like this  
>> in my
>> nmml:
>>
>> <image id="shadow-hi" name="gameassets/imagehigh/foodshadow.png" />
>>
>> The generated code then puts this in getAsset under applicationmain:
>>
>> if (inName=="omshadow-hi")
>>
>>             return Assets.getBitmapData
>> ("gameassets/imagehigh/om_shadow.png");
>>
>> however, the generated Assets class is looking for the 'id' attribute
>> again, not name.
>>
>> is getAsset() deprecated?  or ID?
>>
>> Alex
>>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: changed nmml format in latest nme?

Alex Liebert
sounds great- updating now.  Thanks!

On Fri, Sep 23, 2011 at 1:37 PM, Joshua Granick <[hidden email]> wrote:
Alex,

I've committed an update to SVN to fix this issue. Thank you for catching this.

Yes, it should be using the ID twice... then in nme.installer.Assets it should use resourceName


ApplicationMain.getAsset () still exists, but nme.Assets is a new API that allows you to access assets, strictly typed. It also provides a convenience method of "getText" over "getBytes", to read a string-based file instead of having to convert from bytes yourself.




On Fri, 23 Sep 2011 13:26:42 -0700, Alex Liebert <[hidden email]> wrote:

( ican change ::resourceName:: to ::id:: in the ApplicationMain.getAsset()
template to fix this, but am not clear if this is the right solution and
what the intended asset path is)


On Fri, Sep 23, 2011 at 1:24 PM, Alex Liebert <[hidden email]>wrote:

Greetings,

Testing svn nme against flash target now, but I have things like this in my
nmml:

<image id="shadow-hi" name="gameassets/imagehigh/foodshadow.png" />

The generated code then puts this in getAsset under applicationmain:

if (inName=="omshadow-hi")

           return Assets.getBitmapData
("gameassets/imagehigh/om_shadow.png");

however, the generated Assets class is looking for the 'id' attribute
again, not name.

is getAsset() deprecated?  or ID?

Alex


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org