Feeds:
Posts
Comments

Archive for the ‘ActionScript 2.0’ Category

Our team uses Neutron inside our main product ReviewBasics. That is a really big Visual Studio 2005 solution (55+ projects), including several Neutron projects. In other words, our team is “building next generation Rich Internet Applications that combine Flash on the front-end and .NET on the server-side”, as the home page of Neutron website says.

Currently our flash front-end uses some quite big 3rd-party AS2 libraries which are referenced to Neutron projects (see the note below). The classes within the libraries participate in code complete operations, so it takes some time for IntelliSense database initialization while the project is loading.

Note: Neutron supports Zip reference feature that allows you to link an external library as a zip file, and Neutron automatically unzips and references classes within.

Actually, such possibilities are not needed for our server-side .NET part of the team. Most of them never touch the AS2.0 code. All they need is to compile this code while rebuilding the entire solution.

Well, that can be easily switched off. To disable IntelliSense database creation on project loading go to ‘Tools’ -> ‘Options’ in the main Visual Studio 2005 menu. Select ‘Projects and Solutions’ -> ‘Neutron Project Settings’ in the appearing Options dialog, and uncheck ‘Enable IntelliSense’ checkbox. Next time the projects will be loaded without IntelliSense initialization phase.

In addition, on this option page you can set the path, where MTASC compiler is located. That can be useful if you want to compile with HAMTASC instead. See How To: Substitute MTASC with HAMTASC tutorial.

Also, you can manage cache directory for ZIP references used in your Neutron project.

Enjoy!

 

~ Dmitry

Advertisements

Read Full Post »

http://www.gotoandlearn.com/download.php

I didn’t watch all of them, but those few that I watched are done very well.

 

~Mike

Read Full Post »

 

~Mike

Read Full Post »

This tutorial will demonstrate how to setup a project in order to easily trace your code.

We will be using Powerflasher SOS.

Powerflasher SOS (SocketOutputServer) is an XML Socket server with a graphic user interface. Connected clients can send messages to SOS. These messages are shown in SOS. Further on commands from SOS to Client can be sent. These are freely configurable.

It requires JavaVM starting from 1.3: http://java.com/en/download/index.jsp

This tutorial will demonstrate the following steps:

  • Download and run Powerflasher SOS
  • Create new ActionScript Application
  • Write code that will allow our application to “trace” to Powerflasher SOS using XMLSocket
  • Specify additional compilation parameter: -trace “Main.myTrace”. Compiler will replace all “trace()” statements with a call to Main.myTrace which will send messages over XMLSocket to SOS
  • We will then add
    • new ActionScript Class
    • two SWF files that will serve as ON/OFF states
  • We will then show the following
    • Loading resources
    • MovieClip.onRollOver, MovieClip.onRollOut events

Source code is here.

Click the image below to launch:

 

Here is the code for your reference:

class Main
{
    private static var sock : XMLSocket;
    static function main()
    {
        Stage.align = "TL";
        Stage.scaleMode = "noScale";
        
        if (_root.enableTrace == "true")
        {
            enableTrace();
        }
        trace("main() called");
        var app : App = new App();
        app.Start();
    }
    private static function enableTrace() : Void
    {
        sock = new XMLSocket();
        sock.connect("localhost", 4444);
        trace("connected");
    }
    public static function myTrace(obj : Object, fullclass : String, file : String, line : Number) : Void
    {
        sock.send("msg: " + obj + " (class: " + fullclass + ", line: " + line + ")\n");
    }
}
 
 
class App
{
    public function App()
    {
        
    }
    public function Start() : Void
    {
        var button : MovieClip = _root.createEmptyMovieClip("button", _root.getNextHighestDepth());
        button._x = 20;
        button._y = 20;
        
        var imageOn : MovieClip = button.createEmptyMovieClip("imageOn", button.getNextHighestDepth());
        imageOn.loadMovie("smiley_happy.swf");
        
        var imageOff : MovieClip = button.createEmptyMovieClip("imageOff", button.getNextHighestDepth());
        imageOff.loadMovie("smiley_sad.swf");
        
        button.onRollOver = function()
        {
            trace("");
            this.imageOff._visible = false;
        }
        
        button.onRollOut = function()
        {
            trace("");
            this.imageOff._visible = true;
        }
    }
}

~Mike

Read Full Post »

This tutorial will demonstrate how to create “resources” SWF that might contain required UI elements and then load them into your ActionScript application.

This tutorial will demonstrate the following steps:

  • Create new Flash Document using Macromedia Flash Professional 8
  • Create new Movie Clip (Linkage: Export for ActionScript, Export in first frame)

  • Add an image and create a simple motion tween
  • Publish to produce SWF
  • Create new ActionScript Application
  • Specify “input SWF” pointing to the produced SWF
  • Show code required to load needed Movie Clip

Source code is here.

Click image below to launch:

Read Full Post »