void BaseEventListener::StartTargetPropertySound( Element *target, const String &property ) { String sound = target->GetProperty<String>( property ); if( sound.Empty() ) { return; } // check relative url, and add documents path if( sound[0] != '/' ) { ElementDocument *doc = target->GetOwnerDocument(); if( doc ) { URL documentURL( doc->GetSourceURL() ); URL soundURL( sound ); soundURL.PrefixPath( documentURL.GetPath() ); sound = soundURL.GetPathedFileName(); } } trap::S_StartLocalSound( sound.CString()+1 ); }
ASURL getLocation( void ) const { ElementDocument *document = GetCurrentUIDocument(); return ASURL( document->GetSourceURL().CString() ); }