Compound Action Creation Functions

PRActionCreateQAlphaFlash(startVisible, outDurationSecs, outDelaySecs, inDurationSecs, inDelaySecs, easeFunc)

Description

Creates and returns an action that, when played by an oPRAction-derived object instance, that instance will flash by fading in and out of view using the instance's image_alpha property. When setting startVisible as true, for best results ensure that the instance is already fully faded in (i.e. set image_alpha to 1.) Likewise, with startVisible as false, the instance should already be faded out (i.e. set image_alpha to 0) before playing this action.

Parameters
  • startVisible Bool

If true, will fade out first then in. If false will do the opposite.

  • outDurationSecs Real

The duration, in seconds, of the fade out effect

  • outDelaySecs Real

The duration, in seconds, that the instance stays faded out.

  • inDurationSecs Real

The duration, in seconds, of the fade in effect

  • inDelaySecs Real

The duration, in seconds, that the instance stays faded in.

  • easeFunc Function ID

The easing function to use for the fade in/out effects.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateQBlendFlash(colour1, colour2, durationSecs1, delaySecs1, durationSecs2, delaySecs2, easeFunc)

Description

Creates and returns an action that, when played by an oPRAction-derived object instance, that instance will use colour blending to flash from colour1 to colour2 and back again. For best results, ensure that the image_blend property of the instance matches the colour specified in colour1 before playing this action.

Parameters
  • colour1 Colour

The from colour to use in the blend flash effect.

  • colour2 Colour

The to colour to use in the blend flash effect.

  • durationSecs1 Real

The duration, in seconds, that it takes for colour1 to change to colour2.

  • delaySecs1 Real

The duration, in seconds, to wait after the 1st colour blend effect.

  • durationSecs2 Real

The duration, in seconds, that it takes for colour2 to change back to colour1.

  • delaySecs2 Real

The duration, in seconds, to wait after the 2nd colour blend effect.

  • easeFunc Function ID

The easing function to use for the blending effects.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateQBlink(startVisible, visDurationSecs, invisDurationSecs)

Description

Creates and returns an action that, when played by an oPRAction-derived object instance, that instance will alternate between hidden and unhidden making it appear to be blinking.

Parameters
  • startVisible Bool

The instance will start out as visible if true, invisible otherwise.

  • visDurationSecs Real

The duration, in seconds, that the instance stays visible during the blink.

  • invisDurationSecs Real

The duration, in seconds, that the instance stays invisible during the blink.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateQBounce(travel, angle, durationSecs, repeatCount, easeUpFunc, easeDownFunc)

Description

Creates and returns an action that, when played by an oPRAction-derived object instance, that instance will travel in one direction and then back in the opposite direction simulating a single bounce motion.

Parameters
  • travel Real

The distance, in pixels, that the bounce motion will travel in each direction.

  • angle Real

The angle in degrees that the motion travels in. 90 for straight up.

  • durationSecs Real

The duration, in seconds, that the entire movement takes.

  • repeatCount Int

The number of times to play the bounce animation.

  • easeUpFunc Function ID

The easing function to use for the 1st half of the bounce movement.

  • easeDownFunc Function ID

The easing function to use for the 2nd half of the bounce movement.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateQBreathe(sizeBy, durationSecs, delaySecs, repeatCount, easeFunc)

Description

Creates and returns an action that, when played by an oPRAction-derived object instance, that instance will use scaling and timing to create the appearance that it is taking breaths.

Parameters
  • sizeBy Real

The amount that the instance will scale up by when taking a breath.

  • durationSecs Real

The duration, in seconds, that the entire breath animation takes to play out.

  • delaySecs Real

The duration, in seconds, between each breath.

  • repeatCount Int

The number of times to play the breath animation.

  • easeFunc Function ID

The easing function to use for the breathing effect.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateQFlipXY(xDurationSecs, yDurationSecs, repeatCount, easeFunc)

Description

Creates and returns an action that, when played by an oPRAction-derived object instance, that instance will flip on its x and/or y axes (governed by its anchor point) using horizontal and vertical scaling to achieve the effect.

Parameters
  • xDurationSecs Real

The duration, in seconds, that it takes for x-axis flip to occur. 0 for no x flip.

  • yDurationSecs Real

The duration, in seconds, that it takes for y-axis flip to occur. 0 for no y flip.

  • repeatCount Int

The number of times to repeat the flipping movement. Set to 0 to repeat indefinitely.

  • easeFunc Function ID

The easing function to use for the flipping effects.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateQFloat(hTravel, hDurationSecs, vTravel, vDurationSecs)

Description

Creates and returns an action that, when played by an oPRAction-derived object instance, that instance will move using subtle up and down, and side to side motion like it is floating.

Parameters
  • hTravel Real

The horizontal distance, in pixels, of the floating motion.

  • hDurationSecs Real

The duration, in seconds, of the horizontal floating motion.

  • vTravel Real

The vertical distance, in pixels, of the floating motion.

  • vDurationSecs Real

The duration, in seconds, of the vertical floating motion.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateQHeartbeat(sizeBy, durationSecs, delaySecs, repeatCount, easeFunc)

Description

Creates and returns an action that, when played by an oPRAction-derived object instance, that instance will use scaling and timing to create a movement similar to how a heart beats.

Parameters
  • sizeBy Real

The amount that the instance will scale up by when beating.

  • durationSecs Real

The duration, in seconds, per heartbeat.

  • delaySecs Real

The duration, in seconds, between each heartbeat.

  • repeatCount Int

The number of times to play the heartbeat animation.

  • easeFunc Function ID

The easing function to use for the heartbeat effect.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateQJumpBounce(travel, angle, bounceLoss, durationSecs, delaySecs, repeatCount, easeUpFunc, easeDownFunc)

Description

Creates and returns an action that, when played by an oPRAction-derived object instance, that instance will bounce back and forth along the given angle and keep repeating until all of its bounce enrgy has been lost. Simulates a bouncing ball motion. The number of bounces that occurs depends on the value specified in bounceLoss, where a higher number results in less energy lost per bounce while a lower number represents more energy lost.

Parameters
  • travel Real

The distance, in pixels, that the initial bounce will travel.

  • angle Real

The angle in degrees that the motion travels in. 90 for straight up.

  • bounceLoss Real

The amount of energy lost per bounce. Range from 0 (total loss) to 0.99 (almost no loss)

  • repeatCount Int

The number of times to play the heartbeat animation.

  • durationSecs Real

The duration, in seconds, of the initial bounce.

  • delaySecs Real

The duration, in seconds, between each bounce.

  • repeatCount Int

The number of times to play the bounce animation.

  • easeUpFunc Function ID

The easing function to use for the 1st half of the bounce movement.

  • easeDownFunc Function ID

The easing function to use for the 2nd half of the bounce movement.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateQPopIn(sizeToMax, sizeToNormal, durationSecs, easeFunc1, easeFunc2)

Description

Creates and returns an action that, when played by an oPRAction-derived object instance, that instance will "pop" into existence by first zooming from nothingness to the scale given in sizeToMax, and then zooming back down to the given sizeToNormal scale. For best results, ensure that your instance starts off at a scale of 0 before playing this action.

Parameters
  • sizeToMax Real

The scale size to zoom up to when popping into existence.

  • sizeToNormal Real

The scale size to zoom back down to when settling to normal size.

  • durationSecs Real

The duration, in seconds, for the entire effect.

  • easeFunc1 Function ID

The easing function to use for the zoom in part of the effect.

  • easeFunc2 Function ID

The easing function to use for the zooming down to normal size part of the effect.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateQPopOut(sizeTo, durationSecs, easeFunc1, easeFunc2)

Description

Creates and returns an action that, when played by an oPRAction-derived object instance, that instance will "pop" out existence by first scaling up to the scale value given in sizeTo, and then zooming out quickly until it disappears into the distance. For best results, ensure that your instance starts off at its normal size before playing this action.

Parameters
  • sizeTo Real

The scale size to zoom up to for the first part of the effect.

  • durationSecs Real

The duration, in seconds, for the entire effect.

  • easeFunc1 Function ID

The easing function to use for the zoom in part of the effect.

  • easeFunc2 Function ID

The easing function to use for the zooming away into the distance part of the effect.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateQShake(isHorz, travel, shakeCount, durationSecs)

Description

Creates and returns an action that, when played by an oPRAction-derived object instance, that instance will move either side to side or up and down using abrupt, sharp movements. A virtual head nod/shake if you will.

Parameters
  • isHorz Bool

Creates a horizontal shake action if true, a vertical shake if false.

  • travel Real

The distance, in pixels, of the shake.

  • shakeCount Int

The number of times the shake will occur.

  • durationSecs Real

The duration, in seconds, of each shake.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateQSlideFade(moveXBy, moveYBy, alphaTo, easeFunc, durationSecs)

Description

Creates and returns an action that, when played by an oPRAction-derived object instance, that instance will slide smoothly by the given directional amounts in moveXBy and moveYBy while fading in or out to the given alphaTo value.

Parameters
  • moveXBy Real

The distance, in pixels, that the instance will move by along the x axis.

  • moveYBy Real

The distance, in pixels, that the instance will move by along the y axis.

  • alphaTo Real

The alpha value that the instance will fade in or out to.

  • easeFunc Function ID

The easing function to use for the movement.

  • durationSecs Real

The duration of the slide motion.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.

PRActionCreateQWobble(travelDegrees, durationSecs, repeatCount, easeFunc)

Description

Creates and returns an action that, when played by an oPRAction-derived object instance, that instance will wobble clockwise and counter-clockwise at its anchor point using rotation to achieve the effect.

Parameters
  • travelDegrees Real

The distance in angles to use for the wobble effect.

  • durationSecs Real

The duration, in seconds, per wobble.

  • repeatCount Int

The number of times to repeat the wobble movement. Set to 0 to repeat indefinitely.

  • easeFunc Function ID

The easing function to use for the wobble effects.

Returns
PRAction Struct

An action that can be played by a PRAction-derived object.


© 2021 Prismatic Realms, Inc. Contact

Green Hosting Badge