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

# init(named:from:duration:)

Creates an action of the given name from an action file with a new duration.

## Declaration

```swift
init?(named name: String, from url: URL, duration: TimeInterval)
```

## Parameters

- `name`: The name of the action
- `url`: The url of the file containing the action
- `duration`: The duration of the action
