-
Notifications
You must be signed in to change notification settings - Fork 3
Banner
This module contains functions for banner ads.
This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.
AdMob_Banner_Init⛔- AdMob_Banner_Set_AdUnit
- AdMob_Banner_Create
- AdMob_Banner_Create_Ext
- AdMob_Banner_GetWidth
- AdMob_Banner_GetHeight
- AdMob_Banner_Move
- AdMob_Banner_Show
- AdMob_Banner_Hide
- AdMob_Banner_Remove
⛔ This function was deprecated with version 1.3.0.
This function initialises the target identifier for banner functions.
Note
Please refer to AdMob_Banner_Set_AdUnit for more information.
Syntax:
AdMob_Banner_Init(adUnitId)
Argument | Type | Description |
---|---|---|
adUnitId | String | The ad unit ID |
Returns:
N/A
Versioning:
-
1.3.0
- ⛔ This function was deprecated.
This function sets the target identifier for banner functions, Banner functions don't allow multiple preloaded identifiers.
Syntax:
AdMob_Banner_Set_AdUnit(adUnitId)
Argument | Type | Description |
---|---|---|
adUnitId | String | The ad unit ID |
Returns:
N/A
Versioning:
-
1.3.0
- This function was introduced.
This function creates a banner ad.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Social Async Event.
Syntax:
AdMob_Banner_Create(size, bottom)
Argument | Type | Description |
---|---|---|
size | Real | The type of the banner to be displayed. |
bottom | Boolean | Whether the banner should be placed at the bottom of the display. |
Returns:
Triggers:
This event is triggered if the awaited task succeeds.
Key | Type | Description |
---|---|---|
type | AdMobEvent | The constant ADMOB_EV_BANNER_LOADED
|
This event is triggered if the awaited task fails.
Key | Type | Description |
---|---|---|
type | AdMobEvent | The constant ADMOB_EV_BANNER_LOAD_FAILED
|
errorMessage | String | the error code responsible for the failure |
errorCode | Real | the error message of the error code |
This function creates a banner ad with extended alignment options.
This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Social Async Event.
Syntax:
AdMob_Banner_Create_Ext(size, bottom, alignment)
Argument | Type | Description |
---|---|---|
size | Real | The type of the banner to be displayed. |
bottom | Boolean | Whether the banner should be placed at the bottom of the display. |
alignment | AdMobBannerAlignment | The horizontal alignment to be used by the banner. |
Returns:
Triggers:
This event is triggered if the awaited task succeeds.
Key | Type | Description |
---|---|---|
type | AdMobEvent | The constant ADMOB_EV_BANNER_LOADED
|
This event is triggered if the awaited task fails.
Key | Type | Description |
---|---|---|
type | AdMobEvent | The constant ADMOB_EV_BANNER_LOAD_FAILED
|
errorMessage | String | the error code responsible for the failure |
errorCode | Real | the error message of the error code |
Versioning:
-
1.4.0
- This function was introduced.
This function gets the width of the currently loaded banner ad block. The value returned is in pixels.
Note
This function returns the width in screen pixels, it’s up to the developer to convert the value to the correct scale according to the render target being used.
Syntax:
AdMob_Banner_GetWidth()
Returns:
This function gets the height of the currently loaded banner ad block. The value returned is in pixels.
Note
This function returns the height in screen pixels, it’s up to the developer to convert the value to the correct scale according to the render target being used.
Syntax:
AdMob_Banner_GetHeight()
Returns:
This function moves a banner that has been previously added. You supply a boolean that will determine if the banner should be placed at the bottom or at the top of the display.
Syntax:
AdMob_Banner_Move(bottom)
Argument | Type | Description |
---|---|---|
bottom | Boolean | Whether the banner should be placed at the bottom of the display. |
Returns:
This function shows the currently active, but hidden, banner ad block. When called, the banner will be shown to the user again and will be able to receive input.
You can hide the banner again at any time using the AdMob_Banner_Hide function.
Syntax:
AdMob_Banner_Show()
Returns:
This function hides the currently active banner ad block. When called, the banner will be removed from the user’s view and will no longer receive input.
You can show the banner again at any time using the AdMob_Banner_Show function.
Syntax:
AdMob_Banner_Hide()
Returns:
This function removes the currently active banner from the app. If you call this function then want to show ads again, you must call the AdMob_Banner_Create function first to add a new banner to the display.
Syntax:
AdMob_Banner_Remove()
Returns:
YoYoGames 2024