[xray] Going nuts over here!

John Grden neoriley at gmail.com
Thu Aug 31 15:17:53 EDT 2006


Here's a copy of what a main file should look like:

import com.blitzagency.xray.util.XrayLoader;

class com.blitzagency.Main
{
    static var app : Main;

    function Main()
    {
        XrayLoader.addEventListener(XrayLoader.LOADCOMPLETE, this, "run");
        XrayLoader.loadConnector("xrayConnector_1.6.swf");
    }

    // entry point
    public static function main(mc)
    {
        app = new Main();
    }

    private function run(evtObj:Object):Void
    {
         // code to run after xray is loaded
    }

}

Now, I'm guessing by the code that you're using the new xrayLogger levels
etc.

I have a new version of this I will be putting out this week (next day or
so) that makes it a bit cleaner on the logging and leveraging mtasc's -trace
switch

Let me know if that helped at all,

jpg

On 8/31/06, henrik rudstrom <henrik.rudstrom at gmail.com> wrote:
>
> Hi
> Trying to get my AMES set up on OSX 10.4.6 , got most of it working now:
> an ant build that creates a swf file from xml and compiles with mtasc.
> the last two days i've been trying to get Xray up with the connector only
> package. (with the component in flash works fine)
> Its a jungle out there!
>
>
> my class looks like this:
>
> import com.blitzagency.xray.util.*;
> class HelloWorld{
>     /** Holds reference to the single global class that main() creates */
>     static var app:HelloWorld;
>     /** Constructor: does all the work */
>     function HelloWorld(){
>         _root.createTextField("txt",10,0,0,0,0);
>         _root.txt.autoSize='left';
>         _root.txt.text="Hello World!\n";
>         _global.Xray.xrayLogger.error("myObj");
>
>         _global.tt("Finished initializing HelloWorld");
>     }
>
>     /** Program entry point: creates one global instance of our class */
>     static function main(){
>         XrayConnect.getInstance(_level0,true);    //true means show
>         app=new HelloWorld();
>     }
> }
>
> and the essential part of my build file:
> <target name="compile" description="builds sample swf">
>
>
>         <swfmill src="${src.dir}/xraytemplate.swfml"         dest="${
> build.dir}/${ant.project.name}.swf"/>
>         <mtasc
>             src="${ main.class}"
>             classpath="${src.dir}:${xray.dir}:${zeroi.dir}"
>             swf="${build.dir}/${ant.project.name}.swf"
>             main="true"
>             header="${width}:${height}:${framerate}:${bgcolor}"
>             mtasc="/Applications/mtasc-1.12-osx/mtasc"
>             verbose="yes"
>         />
> </target>
>
> everything compiles fine, but when i run the xray application/swf and my
> own application, no connection is found. Making a swf in flash works fine
> though, but when i use mtasc to compile into it, it doesnt connect.
>
> Anyone know what im doing wrong?
>
> thanks a lot
>
> h
>
>
>
>
> _______________________________________________
> xray mailing list
> xray at osflash.org
> http://osflash.org/mailman/listinfo/xray_osflash.org
>
>
>


-- 
[  JPG  ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/xray_osflash.org/attachments/20060831/a0f0de47/attachment.htm


More information about the xray mailing list