---
title: "init(named:fromURL:)"
framework: spritekit
role: symbol
role_heading: Initializer
path: "spritekit/skaction/init(named:fromurl:)"
---

# init(named:fromURL:)

Creates an action of the given name from an action file.

## Declaration

```swift
init?(named name: String, fromURL url: URL)
```

## Parameters

- `name`: The name of the action.
- `url`: The URL of the file containing the action.

## Return Value

Return Value A new action object.
