feathersui / feathersui-starling

User interface components for Starling Framework and Adobe AIR
https://feathersui.com/learn/as3-starling/
Other
914 stars 386 forks source link

Pure ActionScript examples don't work #1776

Closed chrisvelevitch closed 5 years ago

chrisvelevitch commented 5 years ago

The pure ActionScript examples that come with 3.5.0 don't always work. For example, the HelloWorld example doesn't unless you change line 45 in HelloWorldWeb.as:-

var MainType:Class = getDefinitionByName("feathers.examples.helloWorld.Main") as Class;

to:-

var MainType:Class = feathers.examples.helloWorld.Main as Class;

Then is works. The same thing with the DrawersExplorer example.

My Feathers install was created with Feathers SDK Manager and I selected Feathers 3.5.0 and Air 31.0 and Flash Player 31.0.

Why is happening?

joshtynjala commented 5 years ago

The web versions of the examples are not distributed with the Feathers library. The code actually only exists so that I can build some SWFs to embed on feathersui.com.

However, if you want to build them, you need to use the -frame compiler option, like this:

-frame=two,feathers.examples.helloWorld.Main

This puts the Main class on frame 2 so that the first frame can load quickly and act as a preloader. You can see that I use the -frame compiler option in the build script.