Announcement

Collapse
No announcement yet.

Scaleform - iPad - runtime movieclip generation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Scaleform - iPad - runtime movieclip generation

    Has anyone had any issues with scaleform/flash movieclips generated at runtime on the iPad platform? (iPad 2 running iOS7). this seems to work fine on an iPhone 4s, but for some reason they don't appear on the iPad.

    Code:
    function playActiveMessage(){
    
    	local GFxObject myTextMessage;
    	local vector2D screenDims;
    	
    	if ( myMessageList.Length != 0 ){
    		myTextMessage = GetVariableObject("root").AttachMovie("textMessage","messageInstance");
    		myTextMessage.GetObject("message").SetText(myMessageList[0]);
    		//place it in the center of the screen
    		GetGameViewportClient().GetViewportSize(screenDims);
    		myTextMessage.SetPosition(screenDims.X/2, screenDims.Y/2);
    		//remove it from the list when we've generated it
    		myMessageList.Remove(0,1);
    	}
    
    }

    #2
    [EDIT]
    was able to find out where the issue was, but wasn't able to find a solution using direct screen positioning control.

    GetGameViewportClient().GetViewportSize(screenDims ); screenDims were providing the correct resolution on both devices, but i guess i don't really understand authored global scale because i thought both were retina displays meaning i could have used screenDims/2 to get the center of the screen. not true. iPad2 required screenDims/4.

    so to avoid any cross compatibility issues, any dynamically generated movieclips have registration points at 0,0 to avoid any future problems. everything works fine now.

    Comment

    Working...
    X