Re: [Flashcoders] pointers, references and just straight up values

2008-11-29 Thread Eduardo Omine
That's correct...
AFAIK only primitive types (Strings, Boolean, Numbers, uints and ints)
are passed as values.
All other types are passed as references.

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS statement this[testStudent + i] in JAVA ?

2008-11-17 Thread Eduardo Omine
From what I understand you have a 2D String array and want to use the
values in this array to initialize new instances of the Student class.
The simplest is an Student array:


int len = myStudnts.length;
Student[] testStudents = new Student[len];
for(int i=0; ilen; i++)
{
// change Student constructor to accept a String array as parameter
testStudents[i] = new Student(myStudents[i]);
}


Access individual Student instances later using array indexes:
testStudents[2].goToSchool();

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: masking w/o using bitmapCaching = true?

2008-10-10 Thread Eduardo Omine
In this case cacheAsBitmap is processor-heavy because for Flash Player
it doesn't make sense to cache something that is constantly
changing.

BlendMode.ERASE can be processor-heavy too, but it should perform
better than your current setup.

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: masking w/o using bitmapCaching = true?

2008-10-09 Thread Eduardo Omine
You should try BlendMode.ERASE.
Draw a gradient with alpha=0 at center, and alpha=1 at the edges.
Place it right on top of your menu and set its blendMode to ERASE.
The sprite containing the menu and the mask must have blendMode set to
LAYER (or any other blendMode with a similar working).

maskGradient.blendMode = BlendMode.ERASE;
container.blendMode = BlendMode.LAYER;

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Access MainTimeline reference from within a component

2008-08-27 Thread Eduardo Omine
I understand that Flash prepends the filename to MainTimeline as a
convenience because there's no DocumentClass.
MainTimeline is not a class or type definition, it's simply a default name.

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Access MainTimeline reference from within a component

2008-08-27 Thread Eduardo Omine
I think the question is: what do you need the FLA filename for?
Relying on filename seems very hack-ish and unreliable -- it's common
to have files renamed during the development process and for testing
purposes.

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] load many XML files problem

2008-08-24 Thread Eduardo Omine
Who's calling PreloadXML and how (show some code)?

I don't know why you need to load 90 files, but it sure sounds like a
better way could be worked out.
You could concatenate all files with a server-side script and load a
single XML file, for example.

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] json flash 8/9

2008-08-22 Thread Eduardo Omine
On Fri, Aug 22, 2008 at 9:49 AM, Hans Wichman
[EMAIL PROTECTED] wrote:
 - does n1 know of a good reason to use webservices through json through
 javascript in flash

Some developers prefer JSON over XML. But there's no need to use a JS
library to connect Flash to server. With AS3 you load and send JSONs
with URLLoader. To decode and encode JSON objects use the as3corelib
library:
http://code.google.com/p/as3corelib/

Performance-wise, it is best to use AMF (binary format) if possible.
Working with JSON should be slower than XML because XML parsing is
native to AS3.

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] json flash 8/9

2008-08-22 Thread Eduardo Omine
With AS2 I'd recommend using Flash Remoting with AMF (binary format).
AMFPHP is the most well-known AMF solution, but there are AMF
solutions for Python and Java too (and probably other server
technologies).

http://www.amfphp.org/
http://pyamf.org/
http://sourceforge.net/projects/openamf/


And yes, you need an AS2 library to parse JSONs too.
http://www.5etdemi.com/blog/archives/2006/05/cinqetdemijson-a-better-json-parser-for-as2-suited-for-config-files/

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Removing loaded swf...

2008-08-15 Thread Eduardo Omine
In gotoPage(), try this:

var loader:Loader = Loader(currentPage.parent);


instead of:

var loader:Loader = Loader(e.target); // e.target refers to currentPage


-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 accessing functions from other classes

2008-08-13 Thread Eduardo Omine
Dispatch an event from the loaded SWF and let the parent SWF handle the action.

* * * * * * * * * *
MainSite.as
dispatchEvent(new Event(myEventName));

* * * * * * * * * *

Gallery.as
mainSite.addEventListener(myEventName, myListener);

private function myListener(e:Event):void
{
// call desired method here
}

* * * * * * * * * *

HTH

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] hi All

2008-07-11 Thread Eduardo Omine
Martin, you can access library assets from loaded SWFs and create
multiple instances of those assets. It's not exactly the same thing,
but still *very* useful.

var Asset:Class =
Class(loader.contentLoaderInfo.applicationDomain.getDefinition(assetLinkageName));

var assetInstance:MovieClip = new Asset(); // type your instances accordingly

* * *

Read more at:
http://www.scottgmorgan.com/blog/index.php/2007/06/18/runtime-font-embedding-in-as3-there-is-no-need-to-embed-the-entire-fontset-anymore/

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to add bitmaps from my library to the stage AS3?

2008-06-19 Thread Eduardo Omine
IIRC, because your LibImage extends BitmapData, it needs the 2
parameters required by the BitmapData constructor (width and height).

var formatImg = new LibImage(10, 10);

http://www.kirupa.com/forum/showthread.php?p=2113725

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] as3 classes var query

2008-06-12 Thread Eduardo Omine
package test
{
public class test2 extends Sprite
{
var testInstance:test = new test;
trace(testInstance.hello);
}
}

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] FMS3 console unable to inspect SharedObjects

2008-06-12 Thread Eduardo Omine
Hi all,
I am running FMS 3.0.1 but I can't inspect the properties in my
SharedObjects with the admin console. Opening the SharedObjects tab
under View Applications results in the following error appearing in my
Server Log:

Thu 02:34:30 PM: Connection rejected by server. Reason : [
Server.Reject ] : Invalid uri :
rtmp:///myapp/_definst_?_fcs_debugreq_=1434190


The application itself runs with no problems.
For testing purposes I reduced my main.asc code to this:

application.onAppStart = function()
{
application.allowDebug = true;
application.so = SharedObject.get('so');
application.so.setProperty('winner', 'abcdef');

// returns Application started. abcdef as expected
trace('Application started. '+application.so.getProperty('winner'));
}


Any ideas on how to solve this problem?
Not being able to use the SharedObject inspector is a big inconvenience.
Thanks is advance,

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] very easy question

2008-05-20 Thread Eduardo Omine
Try this:

var loader:URLLoader = new URLLoader();
loader.load(new
URLRequest(http://leftandrightsolutions.com/txt/whoweare.txt;));

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] getting value from a radiobutton adding to converted textfield to numbe

2008-05-18 Thread Eduardo Omine
Have you tried one of the following?

event.currentTarget.selection.name
or
RadioButtonGroup(event.currentTarget).selection.name


What error message (not warning message) do you get when compiling?

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] FP10 demo (w/ source code)

2008-05-17 Thread Eduardo Omine
This is a simple Cover Flow demo I made today for FP10:
http://blog.omine.net/2008/05/17/flash-player-10-cover-flow/

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Data merging problem

2008-05-09 Thread Eduardo Omine
Remove the entry from the array?
workData.splice(1, 1);

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders