<!-- fivemad.com, Markdown source of https://fivemad.com/docs/tools/scaleform-reference -->
> Source: https://fivemad.com/docs/tools/scaleform-reference
> Section: Tools
> Tags: scaleform, BeginScaleformMovieMethod, UI, shards, HUD
> Tool: https://fivemad.com/tools/scaleform-reference
> Last updated: 2026-09-25
> Site map for assistants: https://fivemad.com/llms.txt

# Scaleform Functions

Search every GTA V scaleform movie, look at its first frame, see each function with its real parameter names, and build a ready Lua call with BeginScaleformMovieMethod and a draw loop.

Scaleform Functions is a reference of GTA V scaleform movies and the functions you can call on them, with their parameter names. Pick a function, fill the parameters, and copy a Lua snippet that loads the movie, calls it and draws it.

Every snippet block on this page has a **Lua / JS / TS / C#** switcher in its corner. The choice is remembered across the site, and [the runtimes page](/docs/development/runtimes) explains what changes between them.

## What it is for

Scaleform movies are the Flash UI files GTA V uses for big "mission passed" shards, instructional buttons, phones, computer screens, the minimap and more. Using one from a script means knowing the movie name, the function name and the order of its arguments. This page lists all of that and writes the boilerplate so you can try a message in seconds.

## Quick start

1. The page opens on `MIDSIZED_MESSAGE` with `SHOW_SHARD_MIDSIZED_MESSAGE` selected.
2. Search movie names in the **Movies** tab, or switch to **Functions** to search function names across every movie (type at least 2 characters, for example `SET_TITLE`).
3. Click a movie, then a function in its list.
4. In the **Snippet builder**, check the type of each parameter and type a value.
5. Copy `scaleform.lua`.

## Browsing

| Control | What it does |
| --- | --- |
| **Movies** / **Functions** tabs | Search by movie name, or by function name across all movies. The Functions search also matches a parameter name exactly. |
| Category chips | **All**, frontend, generic, generic_2, heist_mp, minigames, minimap, platform_pc, web. |
| **UPPERCASE functions only** | Hides lowercase functions, which are mostly internal. |
| **Filter functions** | Appears on a movie with more than 8 functions. |

## The picture

Every movie that has something to look at shows a still of its first frame, plus its stage size, frame rate, frame count and how many symbols and textures it holds.

Read the still for what it is. It is the movie as the file itself lays it out, with no script running, so anything the game fills in later (the text of a shard, a player name, a live map) is not in it. Most movies draw nothing at all on their own stage because their whole screen is built in ActionScript at runtime; for those the picture is one of the movie's own symbols and the panel says which one. A handful of movies, mostly the plain text HUD ones such as `hud_cash` and `hud_area_name`, are empty until a script fills them, and they say that instead of showing a picture.

Each movie shows its category, its name (click to copy) and the function count. Functions are listed with their parameter names, for example `SHOW_SHARD_MIDSIZED_MESSAGE(bigText, msgText, colID, useDarkerShard, useCondensedShard)`. The selected movie and function are kept in the URL (`?movie=` and `?fn=`), so you can link someone straight to a function.

## Snippet builder

For every parameter you get a type dropdown and a value field. The type is pre-filled from the parameter name (`useDarkerShard` becomes a bool, `colID` an int, `bigText` a string). Change it if the movie expects something else.

| Type | Native written |
| --- | --- |
| int | `ScaleformMovieMethodAddParamInt` |
| float | `ScaleformMovieMethodAddParamFloat` |
| bool | `ScaleformMovieMethodAddParamBool` |
| string (TextureNameString) | `ScaleformMovieMethodAddParamTextureNameString` |
| string (PlayerNameString) | `ScaleformMovieMethodAddParamPlayerNameString` |
| text (BeginTextCommand...) | `BeginTextCommandScaleformString("STRING")`, `AddTextComponentSubstringPlayerName`, `EndTextCommandScaleformString` |

| Option | What it does | Default |
| --- | --- | --- |
| **Draw fullscreen** | Adds a `DrawScaleformMovieFullscreen` loop after the call. | on |
| **Duration (seconds)** | How long to draw before `SetScaleformMovieAsNoLongerNeeded`. `0` draws forever. | 5 |

Use the text type when you want `~r~` style colour codes or long strings, since the plain string natives do not format.

## Example

What the builder writes for a green midsized shard:

```lua title="scaleform.lua"
local function LoadScaleform(name)
    local handle = RequestScaleformMovie(name)
    local timeout = GetGameTimer() + 5000
    while not HasScaleformMovieLoaded(handle) do
        if GetGameTimer() > timeout then return nil end
        Wait(0)
    end
    return handle
end

CreateThread(function()
    local scaleform = LoadScaleform("MIDSIZED_MESSAGE")
    if not scaleform then return print("Could not load MIDSIZED_MESSAGE") end

    BeginScaleformMovieMethod(scaleform, "SHOW_SHARD_MIDSIZED_MESSAGE")
    ScaleformMovieMethodAddParamTextureNameString("MISSION PASSED") -- bigText
    ScaleformMovieMethodAddParamTextureNameString("You delivered the car") -- msgText
    ScaleformMovieMethodAddParamInt(2) -- colID
    ScaleformMovieMethodAddParamBool(false) -- useDarkerShard
    ScaleformMovieMethodAddParamBool(false) -- useCondensedShard
    EndScaleformMovieMethod()

    local untilTime = GetGameTimer() + 5000
    while GetGameTimer() < untilTime do
        DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255, 0)
        Wait(0)
    end
    SetScaleformMovieAsNoLongerNeeded(scaleform)
end)
```

## Tips

- A scaleform only shows while you draw it every frame.
- Call functions after the movie has loaded, or they are dropped.
- Release a movie you no longer need with `SetScaleformMovieAsNoLongerNeeded`.
- `colID` style parameters take HUD colour ids. The [Draw Text Colors](/tools/text-colors) page lists the common HUD colours by name.

> [!WARNING]
> Movies in the **frontend** category (pause menu and similar) usually cannot be drawn with `DrawScaleformMovie`. They are driven through `BeginScaleformMovieMethodOnFrontend` and friends, and are mostly undocumented. The tool shows a warning on those movies.

## Limitations

- Not every listed function does something in game. UPPERCASE functions are the movie's public API and usually work; lowercase ones are internal but sometimes work too.
- Only parameter names are known, not their types or allowed values. Test in game.

Data: Vespura ([tomgrobbe.com](https://tomgrobbe.com/fivem/scaleform/)).

## Related tools

- [Draw Text Colors](/docs/tools/text-colors)
- [Warning Screen Buttons](/docs/tools/warning-buttons)
- [Controls Reference](/docs/tools/controls-reference)
- [Sound Browser](/docs/tools/sound-browser)
