Skip to content

Commit

Permalink
links and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtynjala committed Mar 20, 2024
1 parent 5a80e94 commit 134e201
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ <h2>Updates</h2>
<div class="row featurette">
<div class="col-md-7">
<h2 class="featurette-heading">Familiar. <span class="text-muted">Easy-to-use.</span></h2>
<p class="lead">OpenFL implements the Flash Player API, but goes everywhere that browser plug-ins cannot. Use a familiar and battle-tested workflow to accelerate development. You can even leverage Adobe Animate as an integrated art pipeline.</p>
<p class="lead">OpenFL implements the Flash Player API, but goes everywhere that browser plug-ins cannot. Use a familiar and battle-tested workflow to accelerate development. You can even <a href="{{ site.baseurl }}/learn/haxelib/tutorials/using-swf-assets/">leverage Adobe Animate</a> as an integrated art pipeline.</p>
<p><a href="https://books.openfl.org/openfl-developers-guide/" class="btn btn-info" role="button">Read the OpenFL Developer's Guide &raquo;</a></p>
</div>
<div class="col-md-5">
Expand All @@ -91,8 +91,8 @@ <h2 class="featurette-heading">Flexible. <span class="text-muted">Open-source.</
<div class="row featurette">
<div class="col-md-7">
<h2 class="featurette-heading">Portable. <span class="text-muted">Cross-platform.</span></h2>
<p class="lead">Build games and applications for almost every platform imaginable -- Windows, macOS, Linux, iOS, Android, HashLink, Adobe AIR, and even JavaScript with WebGL. Bring your creative vision to life, on desktops, phones, tablets even game consoles.</p>
<p><a href="{{ site.baseurl }}/showcase/" class="btn btn-info" role="button">See the OpenFL App Showcase &raquo;</a></p>
<p class="lead">Build games and applications for almost every platform imaginable Windows, macOS, Linux, iOS, Android, HashLink, Adobe AIR, and even JavaScript with WebGL. Bring your creative vision to life, on desktops, phones, tablets even game consoles.</p>
<p><a href="{{ site.baseurl }}/learn/haxelib/docs/targets/" class="btn btn-info" role="button">See the available targets &raquo;</a></p>
</div>
<div class="col-md-5">
<img class="featurette-image img-responsive center-block" src="/images/home/CrossPlatform.png" alt="">
Expand Down
8 changes: 4 additions & 4 deletions learn/haxelib/tutorials/adding-animation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Once you know how to show an image in OpenFL, the next step to move toward build

The concept of a "tweening" is to create all of the inbetween steps for animation. In traditional animation, a head animator may draw the keyframes, and junior animators may draw all the frames inbetween to complete the motion.

As a developer, a tweening library can enable you to act like the head animator, and focus on _what_ animation you wish to show, and not going stuck in the _how_ of all the mechanics. We recommend a library called Actuate, which we will use to create animation in code without a lot of work!
As a developer, a tweening library can enable you to act like the head animator, and focus on _what_ animation you wish to show, and not going stuck in the _how_ of all the mechanics. We recommend a library called [Actuate](https://lib.haxe.org/p/actuate), which we will use to create animation in code without a lot of work!

## Creating Your Project

To create an empty project (and follow along), open a command-prompt (Windows) or terminal (macOS/Linux) and run the following command:
To create an empty project (and follow along), open a command-prompt (Windows) or terminal (macOS/Linux) and run the [`openfl create` command](https://lime.openfl.org/docs/command-line-tools/samples/):

```sh
openfl create project AddingAnimation
Expand Down Expand Up @@ -50,7 +50,7 @@ class Main extends Sprite {

## Including Actuate in Your Project

To begin using Actuate, first you will need to edit the [_project.xml_](../../project-files/) file to include Actuate in your project.
To begin using [Actuate](https://lib.haxe.org/p/actuate), first you will need to edit the [_project.xml_](../../project-files/) file to include Actuate in your project.

There should be a `<haxelib />` tag already for OpenFL, we will need to add a similar tag for Actuate:

Expand Down Expand Up @@ -280,6 +280,6 @@ class Main extends Sprite {

## Issues

Any problems? Please visit the [community forums](http://community.openfl.org) if you are experiencing trouble!
Any problems? Please visit the [community forums](http://community.openfl.org) or [Discord server](https://discord.gg/tDgq8EE) if you are experiencing trouble!

[Return to Tutorials](../)
16 changes: 9 additions & 7 deletions learn/haxelib/tutorials/displaying-a-bitmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ redirect_from:

## Creating a New Project

OpenFL includes a "create" command that can help generate an empty or sample project for you.
OpenFL includes a [`create` command](https://lime.openfl.org/docs/command-line-tools/samples/) that can help generate an empty or sample project for you.

To create an empty project, open a command-prompt (Windows) or terminal (macOS/Linux) and run the following command:
To create an empty project, open a command-prompt (Windows) or terminal (macOS/Linux) and run the [`openfl create` command](https://lime.openfl.org/docs/command-line-tools/samples/) command:

```sh
openfl create project HelloWorld
Expand All @@ -25,7 +25,7 @@ openfl create DisplayingABitmap

## Adding an Image

The first thing we will do is add an image. First, copy an image (PNG or JPG format) to the "Assets" folder of the project. We will be using [this image](https://raw.githubusercontent.com/openfl/openfl-samples/master/features/display/DisplayingABitmap/Assets/openfl.png), but you can download or copy any image you like.
The first thing we will do is add an image. First, copy an image file (PNG or JPG format) to the "Assets" folder of the project. We will be using [this image](https://raw.githubusercontent.com/openfl/openfl-samples/master/features/display/DisplayingABitmap/Assets/openfl.png), but you can download or copy any image you like.

Open the "Source/Main.hx" file in the editor of your choice. It should look something like this:

Expand Down Expand Up @@ -82,11 +82,11 @@ class Main extends Sprite {
}
```

In order to see our `Bitmap` instance, we use `addChild` to make it visible on the display list. The "display list" is an easy-to-use method of drawing that is available in OpenFL.
In order to see our `Bitmap` instance, we [use `addChild` to make it visible on the display list](https://books.openfl.org/openfl-developers-guide/display-programming/working-with-display-objects/adding-display-objects-to-the-display-list.html). The ["display list"](https://books.openfl.org/openfl-developers-guide/display-programming/basics-of-display-programming.html) is an easy-to-use method of drawing that is available in OpenFL.

## Positioning an Object

When you use the display list, you can use `x` and `y` properties to control where an object will be drawn.
When you use the display list, you can [use `x` and `y` properties](https://books.openfl.org/openfl-developers-guide/display-programming/manipulating-display-objects/changing-position.html) to control where an object will be drawn.

```haxe
package;
Expand All @@ -113,7 +113,9 @@ If we set the bitmap position to (100, 200), instead of drawing at the upper-lef

Since the `x` and `y` values of a display object use the upper-left corner of the object, the math for centering our object will look something like this:

var centerValue = (totalWidth - imageWidth) / 2;
```haxe
var centerValue = (totalWidth - imageWidth) / 2;
```

We can determine the width of our window using the `stage.stageWidth` and `stage.stageHeight` values. We can use the `width` and `height` values of our bitmap to find how large it is. The resulting code looks like this:

Expand Down Expand Up @@ -172,6 +174,6 @@ openfl test ../DisplayingABitmap flash

## Issues

Any problems? Please visit our helpful [community forums](http://community.openfl.org) if you are experiencing trouble!
Any problems? Please visit our helpful [community forums](http://community.openfl.org) or [Discord server](https://discord.gg/tDgq8EE) if you are experiencing trouble!

[Return to Tutorials](../)
2 changes: 1 addition & 1 deletion learn/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Then, you can get up and running with the included [sample projects](docs/comman

## Fundamentals

If you are already familiar with Adobe Flash development with ActionScript 3.0, you should feel right at home with OpenFL. If you have never developed using ActionScript 3.0 or Flash before, that's okay because we offer the [OpenFL Developer's Guide](https://books.openfl.org/openfl-developers-guide/) to introduce you to some of the key concepts, classes and interfaces, and other APIs. You'll learn the fundamentals of [working with display objects](https://books.openfl.org/openfl-developers-guide/display-programming/), [listening for events](https://books.openfl.org/openfl-developers-guide/handling-events/), [drawing lines, curves, and shapes](https://books.openfl.org/openfl-developers-guide/using-the-drawing-api/), and much more.
We offer the [OpenFL Developer's Guide](https://books.openfl.org/openfl-developers-guide/) to introduce you to some of the key concepts, classes and interfaces, and other APIs. You'll learn the fundamentals of [working with display objects](https://books.openfl.org/openfl-developers-guide/display-programming/), [listening for events](https://books.openfl.org/openfl-developers-guide/handling-events/), [drawing lines, curves, and shapes](https://books.openfl.org/openfl-developers-guide/using-the-drawing-api/), and much more.

<p style="text-align:center"><a href="https://books.openfl.org/openfl-developers-guide/" target="_blank" class="btn btn-info" role="button">Read the OpenFL Developer's Guide &raquo;</a></p>

Expand Down

0 comments on commit 134e201

Please sign in to comment.