Re: mtasc Digest, Vol 50, Issue 3

View: New views
2 Messages — Rating Filter:   Alert me  

Re: mtasc Digest, Vol 50, Issue 3

by Scott Christensen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for info on the flag.  It does make sense that the default is to either allow only access to the file system OR the internet.  
 
I've set the flag on my system to allow global access, but good to know users on the internet won't need to change it as everything on the internet for them.
 
I will take a look at projectsprouts.org
 
Another question, it appears Actionscript doesn't have any background threads? Any thoughts on loading assets in the background for a MMORPG to minimize delays?  
 

--- On Wed, 1/14/09, mtasc-request@... <mtasc-request@...> wrote:
From: mtasc-request@... <mtasc-request@...>
Subject: mtasc Digest, Vol 50, Issue 3
To: mtasc@...
Date: Wednesday, January 14, 2009, 7:01 PM

Send mtasc mailing list submissions to
	mtasc@...

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.motion-twin.com/mailman/listinfo/mtasc
or, via email, send a message with subject or body 'help' to
	mtasc-request@...

You can reach the person managing the list at
	mtasc-owner@...

When replying, please edit your Subject line so it is more specific
than "Re: Contents of mtasc digest..."


Today's Topics:

   1. Re:  potentially unsafe operation - network access flag
      (Luke Bayes)


----------------------------------------------------------------------

Message: 1
Date: Tue, 13 Jan 2009 09:56:16 -0800
From: Luke Bayes <lbayes@...>
Subject: Re: [mtasc] potentially unsafe operation - network access
	flag
To: sukosuko11@..., 	MotionTwin ActionScript2 Compiler List
	<mtasc@...>
Message-ID:
	<b2a6b2290901130956xa27b001p1374502e42e86daa@...>
Content-Type: text/plain; charset=ISO-8859-1

You probably need to update your local trust cfg file. It's in
different places on different OSes and for different player vesions.

Here is more info:
http://www.abdulqabiz.com/blog/archives/flash_and_actionscript/flash_player_trust_f.php

This problem usually appears with code that is attempting to load
content from both the network and the file system. I believe the
desktop Flash Player will automatically configure itself to support
whichever operation happens first.

If you'd like to avoid this problem and many, many others, you might
want to check out http://projectsprouts.org which is a tool set that
automates the build (and much more) for ActionScript 2, ActionScript 3
and Flex projects.


Good Luck,

Luke Bayes
http://www.asserttrue.com



On Mon, Jan 12, 2009 at 9:50 PM, Scott Christensen <sukosuko11@...>
wrote:
> Hi,
> I get the error 'Adobe Flash Player has stopped a potentially unsafe
> operation... trying to communicate with this internet-enabled location:
> www.youtube.com'
>
> Does anyone know how to compile an .swf using mtasc and have network
> access switched on?
>
> thx,
> Scott
>
>
> --
> MTASC : no more coffee break while compiling
>



------------------------------

_______________________________________________
mtasc mailing list
mtasc@...
http://lists.motion-twin.com/mailman/listinfo/mtasc


End of mtasc Digest, Vol 50, Issue 3
************************************


--
MTASC : no more coffee break while compiling

Re: Re: mtasc Digest, Vol 50, Issue 3

by Luke Bayes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Background threads....

First thing is that you're in a single-threaded environment and you're
not really getting out of that.

The good news is that downloads do happen in a separate process, so
they don't lock up the UI.

In the past, we have built Finite State Machines, and Asynchronous
Command Queues for long-running background-ish processes.

Given these two patterns, I'd say the Command Queue proved most
flexible and useful for us.


Pseudocode for CommandQueue with clients:


// Dispatches a COMPLETED event
interface Command {
    function execute():void;
}

// Dispatches a COMPLETED event whenever queue is empty
class CommandQueue {
    public function push(command:Command):void {
        // add listeners and execute
    }
}


class Main {

    public static function main() {
        var queue:CommandQueue = new CommandQueue();
        queue.addEventListener(COMPLETED, queueCompletedHandler);
        var assetLoader:Command = new AssetLoader('assets/foo.png');
        var xmlLoader:Command = new XMLLoader('xml/foo.xml');
        queue.push(assetLoader);
        queue.push(xmlLoader);
    }

    private function queueCompletedHandler(event:Event):void {
        // Queue is complete, do other work
    }
}


Good Luck,


Luke Bayes
http://www.asserttrue.com


On Wed, Jan 14, 2009 at 4:37 PM, Scott Christensen <sukosuko11@...> wrote:

> Thanks for info on the flag.  It does make sense that the default is to
> either allow only access to the file system OR the internet.
>
> I've set the flag on my system to allow global access, but good to
> know users on the internet won't need to change it as everything on the
> internet for them.
>
> I will take a look at projectsprouts.org
>
> Another question, it appears Actionscript doesn't have any background
> threads? Any thoughts on loading assets in the background for a MMORPG to
> minimize delays?
>

--
MTASC : no more coffee break while compiling