void CFlashUIMCVisibleBaseNode::GetValues( IUIElement* pElement, bool &bVisible, float &alpha ) { IFlashVariableObject* pMc = pElement->GetMovieClip( GetObjectDesc(), GetTmplDesc()); if (pMc) { SFlashDisplayInfo info; pMc->GetDisplayInfo(info); bVisible = info.GetVisible(); alpha = info.GetAlpha() / 100.f; } }
//------------------------------------------------------------------------ int CScriptBind_UIAction::GetAlpha( IFunctionHandler *pH, const char * elementName, int instanceID, const char * mcName ) { IUIElement* pElement = GetElement( elementName, instanceID ); if ( pElement ) { IFlashVariableObject* pMC = pElement->GetMovieClip( mcName ); if ( pMC ) { SFlashDisplayInfo info; pMC->GetDisplayInfo( info ); return pH->EndFunction( info.GetAlpha() ); } UIACTION_WARNING( "LUA: Element %s has no movieclip %s", elementName, mcName ); } else { UIACTION_WARNING( "LUA: UIElement %s does not exist", elementName ); } return pH->EndFunction( false ); }