Beispiel #1
0
void CFlashUIGotoAndPlayBaseNode::GotoAndPlay( IUIElement* pElement, int frameId, const char* frameName )
{
	IFlashVariableObject* pMc = pElement->GetMovieClip( GetObjectDesc(), GetTmplDesc());
	if (pMc)
	{
		if (frameId > -1)
			pMc->GotoAndPlay( frameId );
		else
			pMc->GotoAndPlay( frameName );
	}
}
//------------------------------------------------------------------------
int CScriptBind_UIAction::GotoAndPlay( IFunctionHandler *pH, const char * elementName, int instanceID, const char * mcName, int frameNum )
{
	IUIElement* pElement = GetElement( elementName, instanceID );
	if ( pElement )
	{
		IFlashVariableObject* pMC = pElement->GetMovieClip( mcName );
		if ( pMC )
		{
			pMC->GotoAndPlay( frameNum );
			return pH->EndFunction( true );
		}
		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 );
}