Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 21, 2012, 03:08:36 AM
Home
Forum
Documentation
Search
Help
Login
Register
Gaia Framework for Adobe Flash
>
Forum
>
Support
>
General Gaia Support
(Moderators:
Nemo
,
Ramiro
) >
What is the best way to get a custom attribute of an asset ?
Pages: [
1
]
« previous
next »
Print
Author
Topic: What is the best way to get a custom attribute of an asset ? (Read 132 times)
haungo
Gaia User
Posts: 39
What is the best way to get a custom attribute of an asset ?
«
on:
July 27, 2011, 10:34:09 AM »
What is the best way to get a custom attribute of an asset?
For Example, here's the XML:
<page id="intro" title="Intro" src="intro.swf" >
<asset id="introMusic" src="intro_audio.mp3" _volume=".2" />
</page>
and I want to set the volume of the Sound Asset to the value of the attribute I created as "_volume".
I wish it were as simple as this:
assets.introMusic.volume = assets.introMusic.@_volume ; // DOES NOT WORK.
What is the best and proper way to do this?
Thanks in advance,
-HaunGO
Logged
-Trying to find my way through GAIA
haungo
Gaia User
Posts: 39
Re: What is the best way to get a custom attribute of an asset ?
«
Reply #1 on:
July 27, 2011, 10:45:55 AM »
ok, so i just needed ".node" and it all works out.
assets.introMusic.node.@_volume
Logged
-Trying to find my way through GAIA
Ramiro
Moderator
Gaia Addict
Posts: 861
interactive pragmatism
Re: What is the best way to get a custom attribute of an asset ?
«
Reply #2 on:
July 27, 2011, 10:46:49 AM »
Code:
assets.introMusic.volume = assets.introMusic.node.@_volume;
Logged
steven
Gaia Author
Administrator
Gaia Evangelist
Posts: 3871
Re: What is the best way to get a custom attribute of an asset ?
«
Reply #3 on:
July 27, 2011, 11:41:27 AM »
Might want to wrap it in Number() but I guess you don't have to?
Logged
Steven Sacks | Gaia Author
Please support Gaia by
donating to the project!
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Downloads and Information
-----------------------------
=> * Download Gaia *
=> Lessons, Examples, Tips+Tricks, Mods and Utilities
=> Gallery
-----------------------------
Support
-----------------------------
=> General Gaia Support
=> Gaia AS3 Support
=> Gaia AS2 Support
=> Feature Requests
=> Non-Gaia Questions
-----------------------------
International Support
-----------------------------
=> Deutsche
=> Español
=> Français
=> Italiano
=> Português
=> 日本語
TinyPortal v1.0 beta 4 ©
Bloc
Loading...