javascriptiosiad

Javascript in iAd Producer


I'm really struggling to find documentation for Javascript in iAd producer. If Anyone has a link it would be much appreciated.

I need to register click events on images and either displace a layer that is not visible, import an asset from the library or move an item into the stage from off screen. Has anyone got any code examples I could use for this?

I also need to detect the orientation of the device so I can move in an assest from off the stage.


Solution

  • I'm learning it myself and hoping to do things similar to what it sounds like you are doing. But have you been using this as a resource?

    https://developer.apple.com/library/iad/navigation/index.html

    I see there's information about the device orientation in a couple of places that I see but I'm not 100% sure this is exactly what you are looking for:

    https://developer.apple.com/library/iad/#documentation/iAdJS/Reference/iAd.DeviceClassRef/iAd/iAd.html#//apple_ref/doc/uid/TP40012111

    https://developer.apple.com/documentation/webkitjs/deviceorientationevent#//apple_ref/doc/uid/TP40010526