[Flashcoders] XML File doesn't load on Flash Player9 in IE6, IE7

2007-07-19 Thread Sascha
Hi list,

I'm loading a XML file with the URLLoader class into a v9 SWF. On Firefox it
all works without problem but on IE 6 and 7 the XML file doesn't get loaded,
instead I get HTTPStatus 200.
I don't have much experience with all the new AS3 Security stuff yet so I'd
like to ask what I would have to do to make this work. I've read about
crossdomain.xml files and Security Domains but these all seem not to apply
to simple text/xml files. But I could be totally wrong. Would be great to
get some hints on this!

Thanks,
Sascha


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] XML File doesn't load on Flash Player9 in IE6, IE7

2007-07-19 Thread Sascha
Yes I thought that too. Strange is IE gives me a HTTPStatus Event while
Firefox does not.
I'm using my own written IO class framework which is quite complex so
unfortunately cutting out some code isn't done in a minute. I always thought
that everything Flash-internal should run the same on every browser, the
only thing that could be make trouble are some security features. Correct me
if I'm wrong but otherwise the problem must a security-related thing.

I'll try to post some code until tomorrow, it's getting late here.

Thanks,
Sascha



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of David Ngo
 Sent: Thursday, July 19, 2007 21:49
 To: flashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] XML File doesn't load on Flash Player9 in
 IE6, IE7
 
 An HTTP code of 200 usually means success. Do you have any sample code
 you
 can show?
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Sascha
 Sent: Thursday, July 19, 2007 8:04 AM
 To: flashcoders
 Subject: [Flashcoders] XML File doesn't load on Flash Player9 in IE6,
 IE7
 
 Hi list,
 
 I'm loading a XML file with the URLLoader class into a v9 SWF. On
 Firefox it
 all works without problem but on IE 6 and 7 the XML file doesn't get
 loaded,
 instead I get HTTPStatus 200.
 I don't have much experience with all the new AS3 Security stuff yet so
 I'd
 like to ask what I would have to do to make this work. I've read about
 crossdomain.xml files and Security Domains but these all seem not to
 apply
 to simple text/xml files. But I could be totally wrong. Would be great
 to
 get some hints on this!
 
 Thanks,
 Sascha
 
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Preloader in Flash CS3 with AS3?

2007-04-30 Thread Sascha
Hi folks,

 

How do you implement a preloader with AS3 in Flash CS3? I don't mean a
preloader that loads additional files but a preloader that preloads the SWF
that the preloader is part of.

I'm a bit puzzled about this right now as you cannot easily access
bytesLoaded/bytesTotal anymore without the Loader class.

 

As far as I can see it we still have to deal with the export-into-frame-1
problem so all exported assets have to go into frame 2 or beyond and the
preloader situation would be still similar like in AS2/AS1.

 

Any ideas?

 

 

-- 

[EMAIL PROTECTED]

http://hiddenresource.corewatch.net/

 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Developing Components with AS3 and CS3

2007-04-30 Thread Sascha
Hi list,

 

Now that we have AS 3.0 and Flash CS3 we can finally start to make some
decent Flash components, don't we?

Or so I thought but it's not exactly the same like making components with
AS2 and resources on how to develop them with CS3 and AS3 are sparse or
should I say non-existent so far?! So I was wondering if somebody knows of
any tutes that shed some light on this.

 

With AS3 we cannot use identifiers anymore when linking a symbol in the
library, we can only provide a class name. Also on the Component Definition
dialog are some settings that are left in the dark when looking into the
docs, for one there's another Class input field and stuff to obviously
create skinable components but a simple beginner guidance would be very
appreciated!

 

Sascha

 

 

-- 

http://hiddenresource.corewatch.net/

 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Static LocalConnection name not working?

2007-03-25 Thread Sascha
Hi,

 

Does somebody know why LocalConnection.connect() throws an error 'One of the
parameters is invalid' when using a static variable for the connection name?

 

static var lcName:String = _myConnection;

.

lc.connect(lcName);

 

A bug or even a security restriction??

 

 

-- 

http://hiddenresource.corewatch.net/

 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] AS3 embedded assets and preloading?

2007-01-18 Thread Sascha
Can somebody enlighten me?
How do you use AS3 embedded assets with a preloader (without the Flash IDE)?
In AS2/Flash8 and below we could put a preloader on frame1 of the main
timeline and put all the heavy assets from the library on frame2 or beyond.

In AS3 I wrote a custom Preloader class that extends MovieClip so if it's
done loading it can proceed to frame2 but how do I get the embedded assets
into frame2? I guess it doesn't work like that in AS3 anymore?!

But in Flex the preloader works and it seems it does it without using frames
(the Preloader class extends Sprite).

Are there any tricks to get this done in an AS3 project and without using
Flash IDE?

Thanks in advance,
Sascha


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] AS3 writing ByteArray hexadecimal data to a file(using Zinc)

2007-01-07 Thread Sascha
Yep you were right with the single digit hex chars! Thanks a lot Paul!
Here's the thread on the Zinc Forum where I posted some code in case you're
interested...
http://www.mdmforum.com/forum/index.php?showtopic=19351st=0gopid=86635#en
try86635

As it turned out this way is a lot faster that using pipe delimiters!

Cheers,
Sascha


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Paul Evans
 Sent: Sunday, 07 January, 2007 00:44
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] AS3 writing ByteArray hexadecimal data to a
file(using
 Zinc)
 
 On 5 Jan 2007, at 03:32, Sascha wrote:
 
  Obviously something is wrong with the way how I convert to hex data
 
 Additionally, I suspect your code is returning values less than 16 as
 a single digit of hex, whereas a byte should be represented by two
 hex digits - i.e. prefix a zero!
 
 Paul
 --
 [ http://www.creative-cognition.co.uk/ ]
 [ http://creacog.wordpress.com/ ]
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] AS3 writing ByteArray hexadecimal data to a file(using Zinc)

2007-01-06 Thread Sascha
Yes I've already posted it on the Zinc forum but so far without any
solution. I will prefix any non dual digit and see if it works! Thanks Paul!

Sascha


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Paul Evans
 Sent: Sunday, 07 January, 2007 00:44
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] AS3 writing ByteArray hexadecimal data to a
file(using
 Zinc)
 
 On 5 Jan 2007, at 03:32, Sascha wrote:
 
  Obviously something is wrong with the way how I convert to hex data
 
 Additionally, I suspect your code is returning values less than 16 as
 a single digit of hex, whereas a byte should be represented by two
 hex digits - i.e. prefix a zero!
 
 Paul
 --
 [ http://www.creative-cognition.co.uk/ ]
 [ http://creacog.wordpress.com/ ]
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] AS3 writing ByteArray hexadecimal data to a file (using Zinc)

2007-01-04 Thread Sascha
Hi,

 

I'm trying to encode binary data to hexadecimal values and then writing them
to a file using mdm.FileSystem.saveFileHEX(). I could also use the pipe
delimiter method but while it works correctly, it is very slow on larger
files.

So here is my problem: The binary data gets encoded to a hexadecimal values
string from a ByteArray like this:

 

   var data:String = ;

   var byte:int;

   while (true)

   {

  try

  {

 byte = byteArray.readUnsignedByte();

 data += byte.toString(16).toUpperCase();

  }

  catch (e:EOFError)

  {

 break;

  }

   }

 

But the file ends up always having a few bytes less then the original and
some bytes order is messed up. For example a 25,159 bytes file is only
24,209 bytes large after this and if doing a trace of the original byteArray
and the string data / 2, the values aren't equal .

 

   trace(byteArray.length); // 25159

   trace(data.length / 2); // 24208.5

 

Obviously something is wrong with the way how I convert to hex data but I
don't know what. Can somebody with more byteArray experience give me hint
how to get this working?

 

Cheers,

Sascha

 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Which Data Structure is good for this?

2006-12-12 Thread Sascha
Thanks Michael! You're right, E4X is sweet but in this case there are too
many things that hang onto it later so I want to create a custom data holder
that is more lightweight and fits the needs exactly. Using an object with
own API for every hierarchy would also be overkill. Thanks a lot for the
efforts though!

I might also try utilizing the Proxy class as there properties later that
are not known from the beginning.

Cheers,
Sascha


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of T. Michael Keesey
 Sent: Tuesday, 12 December, 2006 14:00
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Which Data Structure is good for this?
 
 On 12/11/06, Sascha [EMAIL PROTECTED] wrote:
  I would be interested in recommendations about what kind of data
structure
  is best used in the following situation.
  I'm loading in a XML file with a typical recursive structure, then the
data
  from it should be parsed into a data storage object and this data should
be
  accessible globally through the application. The XML file has a
structure
  like this:
 [snipped]
 
 The e4x functions make dealing with XML objects s nice that I
 don't see any particular reason to convert it to something else.
 
 But, if you insist, how about a data model package with classes like so:
 
 Model
   public function get xml():XML;
   public function set xml(value:XML):void
 
 ResourceList extends Model
   public function getDisplay(type:uint):Display;
   public function get data():Data;
   override public function set xml(value:XML):void
 
 Display extends Model
   public function get propertyCount():uint;
   public function get backgroundCount():uint;
   public function get objectCount():uint;
   public function getProperty(index:uint):Property;
   public function getBackground(index:uint):Background;
   public function getObject(index:uint):DisplayObject;
   override public function set xml(value:XML):void
 
 ... so on and so forth
 
 --
 T. Michael Keesey
 The Dinosauricon: http://dino.lm.com
 Parry  Carney: http://parryandcarney.com
 ISPN Forum: http://www.phylonames.org/forum/
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Which Data Structure is good for this?

2006-12-11 Thread Sascha
I would be interested in recommendations about what kind of data structure
is best used in the following situation.
I'm loading in a XML file with a typical recursive structure, then the data
from it should be parsed into a data storage object and this data should be
accessible globally through the application. The XML file has a structure
like this:

resourceList
display type=1
displayProperties
property name=foo value=doo/
property name=fee value=faa/
/displayProperties
displayObjects
object id=1 file=foo/etc/file.xml/
object id=2 file=foo/etc/file2.xml/
object id=3 file=foo/etc/file3.xml/
/displayObjects
backgrounds
 backgrounds id=125 file=foo/etc/bg.png/
/ backgrounds
/display
data
dataTypes
property name=foo value=doo/
property name=fee value=faa/
/dataTypes
/data
etc
somethingElse
property name=foo value=doo/
/ somethingElse 
/etc

... The XML is being extended by the time but it retains the shown
hierarchical structure. I want to be able to keep a similar structure in
memory but I don't want to keep it as an XML object. I was thinking about
using a custom object and populate it with HashMaps but then the hierarchy
would be too flat.
I would appreciate it if somebody could give me some suggestions what kind
of data structure is a good choice for this as I don't have much experience
with trees, lists and other more complex structures.

Thanks a lot,
Sascha


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Which Data Structure is good for this?

2006-12-11 Thread Sascha
Thanks Steven! Forgot to mention that I'm using AS3. I will try to write
your method in AS3 and see if it fits my needs.

Cheers,
Sascha


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Steven Sacks | BLITZ
 Sent: Tuesday, 12 December, 2006 13:05
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Which Data Structure is good for this?
 
 function XML2AS(n, r) {
   var a, d, k;
   if (r[k=n.nodeName] == null) r = ((a=r[k]=[{}]))[d=0];
   else r = (a=r[k])[d=r[k].push({})-1];
   if (n.hasChildNodes()) {
   if ((k=n.firstChild.nodeType) == 1) {
   r.attributes = n.attributes;
   for (var i in k=n.childNodes) XML2AS(k[i], r);
   } else if (k == 3) {
   a[d] = new String(n.firstChild.nodeValue);
   a[d].attributes = n.attributes;
   }
   }else r.attributes = n.attributes;
 }
 
 
 Usage example:
 
 var xmlObj:Object = {};
 XML2AS(xml.firstChild, xmlObj);
 
 var dType:String = xmlObj.resourceList[0].display[0].attributes.type;
 var pArray:Array =
 xmlObj.resourceList[0].display[0].displayProperties[0].property;
 
 var i:Number = pArray.length;
 while (i--) {
 trace(pArray[i].attributes.name + , + pArray[i].attributes.value);
 }
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Sascha
  Sent: Monday, December 11, 2006 7:54 PM
  To: 'Flashcoders mailing list'
  Subject: [Flashcoders] Which Data Structure is good for this?
 
  I would be interested in recommendations about what kind of
  data structure is best used in the following situation.
  I'm loading in a XML file with a typical recursive structure,
  then the data from it should be parsed into a data storage
  object and this data should be accessible globally through
  the application. The XML file has a structure like this:
 
  resourceList
  display type=1
  displayProperties
  property name=foo value=doo/
  property name=fee value=faa/
  /displayProperties
  displayObjects
  object id=1 file=foo/etc/file.xml/
  object id=2 file=foo/etc/file2.xml/
  object id=3 file=foo/etc/file3.xml/
  /displayObjects
  backgrounds
   backgrounds id=125 file=foo/etc/bg.png/
  / backgrounds
  /display
  data
  dataTypes
  property name=foo value=doo/
  property name=fee value=faa/
  /dataTypes
  /data
  etc
  somethingElse
  property name=foo value=doo/
  / somethingElse 
  /etc
 
  ... The XML is being extended by the time but it retains the
  shown hierarchical structure. I want to be able to keep a
  similar structure in memory but I don't want to keep it as an
  XML object. I was thinking about using a custom object and
  populate it with HashMaps but then the hierarchy would be too flat.
  I would appreciate it if somebody could give me some
  suggestions what kind of data structure is a good choice for
  this as I don't have much experience with trees, lists and
  other more complex structures.
 
  Thanks a lot,
  Sascha
 
 
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Running a Timer in more than one instance of the same DisplayObject?

2006-12-07 Thread Sascha
Hi List,

I have an advanced AS3 problem with that I'm stuck ...

I'm extending the Bitmap Class to create a custom bitmap object that uses a
Timer to trigger a function that scrolls the bitmap's BitmapData.
This works fine as long as there is only one instance of the custom bitmap
on the screen but as soon as there are two only one of them keeps playing
the timed scroll. If I add many more they even all disappear.
I guess that it is timer related trouble like as if all are using the same
timer (though every instance creates its own timer).

Does somebody have any clue how to get this working?

Thanks a lot,
Sascha


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Running a Timer in more than one instance of thesame DisplayObject?

2006-12-07 Thread Sascha
Thanks Michael but the timer is instantiated and started at runtime, not in
the constructor. I've tried it and both approaches don't work.

However I have located the source of the problem now (I believe):

I'm adding several of the Custom Bitmap Objects at runtime and as it is not
decided from start how many object are there, they are added in a for loop
like this (Tile is my custom Bitmap)...

for (var i:uint = 1; i = tileAmount; i++)
{
var tile:Tile = new Tile(i);
addChild(Bitmap(tile)); 
}

When I run it, only the last added tile exists, all others are removed from
the screen. So this is a DisplayList problem. My question would be now: How
do I add dynamic DisplayObject instances and don't have them removed if the
next comes in? This is probably totally trivial but I kind of have a
blackout about this now.



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of T. Michael Keesey
 Sent: Friday, 08 December, 2006 04:00
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Running a Timer in more than one instance of
thesame
 DisplayObject?
 
 Are you initializing the timer at compile-time or in the constructor?
 That is, are you doing this:
 
 protected var _timer:Timer = new Timer();
 
 ... or this?:
 
 public function MyBitmapClass() {
 super();
 _timer = new Timer();
 //...
 }
 //...
 protected var _timer:Timer;
 
 I've had some trouble with the former approach. It seems to set all
 instances' _timer fields to the same object. The latter approach
 ensures that each field is indeed different.
 
 On 12/7/06, Sascha [EMAIL PROTECTED] wrote:
  Hi List,
 
  I have an advanced AS3 problem with that I'm stuck ...
 
  I'm extending the Bitmap Class to create a custom bitmap object that
uses a
  Timer to trigger a function that scrolls the bitmap's BitmapData.
  This works fine as long as there is only one instance of the custom
bitmap
  on the screen but as soon as there are two only one of them keeps
playing
  the timed scroll. If I add many more they even all disappear.
  I guess that it is timer related trouble like as if all are using the
same
  timer (though every instance creates its own timer).
 
  Does somebody have any clue how to get this working?
 
  Thanks a lot,
  Sascha
 
 
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 
 
 
 --
 T. Michael Keesey
 Director of Technology
 Exopolis, Inc.
 2894 Rowena Avenue Ste. B
 Los Angeles, California 90039
 --
 The Dinosauricon: http://dino.lm.com
 Parry  Carney: http://parryandcarney.com
 ISPN Forum: http://www.phylonames.org/forum/
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Whats the deal with AS3 Math.random?

2006-11-27 Thread Sascha
Hi,

Why is it when I use Math.random to generate 10 random integers I get the
same pattern of numbers almost every time. Starting the SWF movie ten times
and I have 6-8 times the same pattern of numbers. What's going on there?
Almost looks as if the compiler sets pre-compiled numbers.

Using this ...

var str:String = ;

for (var i:int = 0; i  10; i++)
{
str += Math.floor(Math.random() * 100) + ,
;
}
trace(str);

... and running the SWF movie ten times, I get this ...

88, 87, 35, 69, 73, 11, 93, 40, 39, 19, 
43, 69, 70, 96, 39, 97, 8, 74, 29, 65, 
50, 32, 82, 45, 39, 74, 96, 5, 7, 9, 
50, 32, 82, 45, 39, 74, 96, 5, 7, 9, 
50, 32, 82, 45, 39, 74, 96, 5, 7, 9, 
50, 32, 82, 45, 39, 74, 96, 5, 7, 9, 
50, 32, 82, 45, 39, 74, 96, 5, 7, 9, 
88, 87, 35, 69, 73, 11, 93, 40, 39, 19, 
50, 32, 82, 45, 39, 74, 96, 5, 7, 9, 
88, 87, 35, 69, 73, 11, 93, 40, 39, 19, 
  
This is the first time I experience this.  Is there any solution to fix
this?

Thanks,
Sascha


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Whats the deal with AS3 Math.random?

2006-11-27 Thread Sascha
Thanks Ron and Danny!
I knew that the random numbers are not truly random and that the seed cannot
be changed but the random number patterns I get now are pretty hefty, I
think this wasn't like that in AS2 times.
I will try to fumble with the date object to get a better seed.

Sascha



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Ron Wheeler
 Sent: Monday, 27 November, 2006 23:45
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Whats the deal with AS3 Math.random?
 
 Math.random generates psuedo-random numbers. If you want to have
 something that looks more random, try calling Math.random a random
 number of times before using the numbers.
 Use a true random number to determine the number of times to call it in
 the initial run.
 Suggestion: the modulus 100 of the number of milli-seconds since
 midnight (or some arbitrary date/time).
 This should give you at least 100 different pseudo-ransom strings.
 increase the modulus to get more.
 
 I believe that you can get hardware devices that will give you truly
 random numbers, if that is really required.
 
 As John von Neumann said in 1961 Anyone who considers arithmetical
 methods of producing random digits is of course, in a state of sin.
 
 We are all forced to chose between lesser and greater sins by our need
 for economical solutions.
 
 Ron
 
 Sascha wrote:
  Hi,
 
  Why is it when I use Math.random to generate 10 random integers I get
the
  same pattern of numbers almost every time. Starting the SWF movie ten
times
  and I have 6-8 times the same pattern of numbers. What's going on there?
  Almost looks as if the compiler sets pre-compiled numbers.
 
  Using this ...
 
  var str:String = ;
 
  for (var i:int = 0; i  10; i++)
  {
  str += Math.floor(Math.random() * 100) + ,
  ;
  }
  trace(str);
 
  ... and running the SWF movie ten times, I get this ...
 
  88, 87, 35, 69, 73, 11, 93, 40, 39, 19,
  43, 69, 70, 96, 39, 97, 8, 74, 29, 65,
  50, 32, 82, 45, 39, 74, 96, 5, 7, 9,
  50, 32, 82, 45, 39, 74, 96, 5, 7, 9,
  50, 32, 82, 45, 39, 74, 96, 5, 7, 9,
  50, 32, 82, 45, 39, 74, 96, 5, 7, 9,
  50, 32, 82, 45, 39, 74, 96, 5, 7, 9,
  88, 87, 35, 69, 73, 11, 93, 40, 39, 19,
  50, 32, 82, 45, 39, 74, 96, 5, 7, 9,
  88, 87, 35, 69, 73, 11, 93, 40, 39, 19,
 
  This is the first time I experience this.  Is there any solution to fix
  this?
 
  Thanks,
  Sascha
 
 
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 
 
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Logging Flash-Internal User Access?

2006-10-11 Thread Sascha
Thanks a lot Steven, I will try your method! Thanks to all the others who
responded, I haven't thought about such easy approaches. I will see if this
method is ok with my client.

Sascha


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Steven Sacks | BLITZ
 Sent: Thursday, 12 October, 2006 02:48
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Logging Flash-Internal User Access?
 
 It's actually pretty straightforward and easy.  Here's a quick way to
 track page impressions with no back-end code whatsoever.
 
 Create empty (0 bytes) .txt (or .html) files and put them in a folder on
 the server.  Have Flash loadVars the txt files and append a noCache
 argument with the date in milliseconds so it doesn't cache.  So, your
 file URL would look something like this:
 
 tUrl = tracking/page1.txt?noCache= + new Date().getTime();
 
 Just loadVars a file every time they load in a different page.  They'll
 be able to check their weblogs to see traffic.  If they want something
 more like session data and such, then you'll have to write a back-end to
 support it.
 
 
 BLITZ | Steven Sacks - 310-551-0200 x209
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Logging Flash-Internal User Access?

2006-10-10 Thread Sascha
Hi,

My Client asked for a feature with that they can check how many users
accessed which sections in their Flash Movie so they can see how popular the
sections are. Their Flash is divided into 5 sub pages, all inside the same
SWF. I'm sure this is possible by utilizing PHP or similar server-side
language, I just haven't done such a thing yet and I'm on a tight deadline
with this job.
Could somebody lead me to any source on the web that does this task? A
PHP-Flash Example would be best!

Thanks a lot,
Sascha


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Flash 9 AS3 Class Export Frame?

2006-09-24 Thread Sascha
Hi,

how do I go about exporting classes to a different frame than frame 1 in
Flash 9 Public Alpha? As exporting them to frame 1 is bad for the preloader
I prefer to export all assets and classes to frame 2. In former Flash
versions you could set the export frame in the publish settings but it's
gone in v9.

Thanks for any advice!
Sascha


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] AS3 Preloader

2006-09-23 Thread Sascha
Hi list,
can somebody give me an example of how to create a Preloader for the main
timeline with AS3 (for use in the Flash IDE)? I've been trying to get a
working Preloader but I'm puzzled about it since the whole thing has changed
from AS2 to AS3.

Thanks for any hints!
Sascha


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] AS3 - From BitmapAsset to BitmapData?

2006-07-31 Thread Sascha Balkau
Thanks Charles!
However I didn't wanted to put a MovieClip into a BitmapData, I wanted to do
the opposite. But I think I have just found out how to do that ... by
putting the BitmapData into a new Bitmap object ...

img = new Bitmap(imageBitmapData);
mc.addChild(img);

Thanks for the help!


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Charles Parcell
 Sent: Monday, 31. July, 2006 15:37
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] AS3 - From BitmapAsset to BitmapData?
 
 You don't attach BitmapData, you draw it.  Look at the draw function in
the
 BitmapData class.
 
 Charles P.
 
 
 On 7/30/06, Sascha Balkau [EMAIL PROTECTED] wrote:
 
  Thanks a lot Jim! That was the link I was looking for!
 
  Maybe you can give me a hint on another BitmapData problem: How do I
  attach
  a BitmapData to a MovieClip in AS3? attachBitmap is no more and if I use
  addChild I get a Coercion failed again.
 
  Sascha
 
 
 
   When embedding the images like this I use a normal Bitmap class not a
   BitmapAsset. Then you can access the bitmapData property of the bitmap
   class.
  
   [Embed(source=image.png)] private var imageClass:Class;
  
   private var image:Bitmap = new imageClass();
   private var bitmapData:BitmapData = image.bitmapData;
  
   hth
   Jim
 
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] AS3 - From BitmapAsset to BitmapData?

2006-07-30 Thread Sascha Balkau
Hi,

Can somebody tell me how I get an embedded image (BitmapAsset) to a useable
BitmapData? I'm a bit confused about this. I want to embed an image and then
use it as a BitmapData object. I got ...


[Embed(source=image.png)]
private var imageClass:Class;

private var image:BitmapAsset;

...

image = BitmapAsset(new imageClass());

... but how do I get the BitmapAsset to BitmapData to use the bitmap API on
it? If I try a simple casting I get a Coercion failed.
I would appreciate any help about it! Haven't really delved into this yet!

Thanks,
Sascha

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] AS3 - From BitmapAsset to BitmapData?

2006-07-30 Thread Sascha Balkau
Thanks a lot Jim! That was the link I was looking for!

Maybe you can give me a hint on another BitmapData problem: How do I attach
a BitmapData to a MovieClip in AS3? attachBitmap is no more and if I use
addChild I get a Coercion failed again.

Sascha



 When embedding the images like this I use a normal Bitmap class not a
 BitmapAsset. Then you can access the bitmapData property of the bitmap
 class.
 
 [Embed(source=image.png)] private var imageClass:Class;
 
 private var image:Bitmap = new imageClass();
 private var bitmapData:BitmapData = image.bitmapData;
 
 hth
 Jim

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] private constructors in AS3.0?

2006-07-09 Thread Sascha Balkau
Hi,

This might be old stuff but I missed it completely ... I was wondering if
somebody can tell me the rationale about that constructors in AS3.0 must be
public and what happens to Singletons in AS3.0?

Thanks,
Sascha



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] AS3 - why no properties in interfaces?

2006-07-02 Thread Sascha Balkau
I've been writing interfaces several times now where I had wished
ActionScript would support not only methods but also properties for them. So
I'm wondering what's the reason that Adobe still hasn't added interface
support for properties. After all Java has them and even haXe supports them
too.
I know there is some workaround by using inheritance but that is rather
sub-optimal in my opinion. Does somebody know an answer for this and maybe
has a good solution?

Thanks a lot,
Sascha



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Alpha-blending two MC's with bitmaps?

2006-03-20 Thread Sascha Balkau

Weldon, thanks for trying to help!
Yes the images are all definately available when the blend happens. Maybe it 
has something to do with the fact that the images are loaded dynamically 
from external files into movieclips.

Either way I will see if I can locate the source of the problem!

Sascha



- Original Message - 
From: Weldon MacDonald [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, March 19, 2006 10:12 PM
Subject: Re: [Flashcoders] Alpha-blending two MC's with bitmaps?


I experimented and with the images as mc's, attached from library, and
your function on frame one, not as a class, the function works as you
wanted it too.
Are you sure the images are really where you expect them to be?
ie. is the image loaded when the call is made?
Maybe something about your class setup?

On 3/19/06, Sascha Balkau [EMAIL PROTECTED] wrote:

Weldon, here's the method I've wrote to handle the blending. It's very
simple and I cannot detect any bug in there ...



The blending works but strangely the fromImage is not shown, instead the
toImage fades in from the white background of my Flash movie. As I 
mentioned

before there are other image mc's in the holder movieclip but they are on
depths 0 to 20 and are invisible so I doubt they have any influence on 
this.


Sascha


Weldon Mac Donald

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Alpha-blending two MC's with bitmaps?

2006-03-18 Thread Sascha Balkau

Hi list,

I got a number of movieclips created with createEmptyMovieClip, into every 
MC I load a JPG image dynamically and then it's set it invisible.
Then I change the depth of two of these mc's, say one to depth 2000, the 
other to 2001, make them visible and then I try to blend over these two 
images with an alpha transparency by setting the _alpha of the upper image 
to 0 and increase it up to 100 in an onEnterFrame.
However it doesn't work, the upper image always fades in from 100% white and 
not the underlying image.

Did I missed something? Is that not possible with _alpha in Flash?

Thanks for any hints!
Sascha

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Alpha-blending two MC's with bitmaps?

2006-03-18 Thread Sascha Balkau

Hi Michael,

there are several mc's in one container mc but all are set to invisible 
except for two at a time. And I want to fade between these two but I haven't 
managed to do so. The top most mc always fades in from the white background 
as if the bottom mc would be invisible. But it isn't. Flash 8 is no choice 
as my client wants it in Flash 7.


Thanks,
Sascha


- Original Message - 
From: Michael Bedar [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, March 19, 2006 12:32 AM
Subject: Re: [Flashcoders] Alpha-blending two MC's with bitmaps?


There is a limit to how many alpha'd movieclips you can have  overlapping 
before Flash runs into display errors. If a movieclip is  supposed to be 
completely invisible, set _visible=false instead of  _alpha=0, so that 
Flash does not need to display it.


If for some reason you really need to display many images overlapped  with 
 0 alpha, look into drawing them into the same bitmap in Flash 8.




On Mar 18, 2006, at 7:05 AM, Sascha Balkau wrote:


Hi list,

I got a number of movieclips created with createEmptyMovieClip,  into 
every MC I load a JPG image dynamically and then it's set it  invisible.
Then I change the depth of two of these mc's, say one to depth  2000, the 
other to 2001, make them visible and then I try to blend  over these two 
images with an alpha transparency by setting the  _alpha of the upper 
image to 0 and increase it up to 100 in an  onEnterFrame.
However it doesn't work, the upper image always fades in from 100%  white 
and not the underlying image.

Did I missed something? Is that not possible with _alpha in Flash?

Thanks for any hints!
Sascha

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Alpha-blending two MC's with bitmaps?

2006-03-18 Thread Sascha Balkau
Weldon, here's the method I've wrote to handle the blending. It's very 
simple and I cannot detect any bug in there ...


public static function alphaBlend(fromImage:MovieClip, 
toImage:MovieClip):Void

{
 fromImage.swapDepths(100);
 fromImage._alpha = 100;
 fromImage._visible = true;

 toImage.swapDepths(101);
 toImage._alpha = 0;
 toImage._visible = true;

 toImage.onEnterFrame = function():Void
 {
  if (toImage._alpha  100)
  {
   toImage._alpha += 5;
  }
  else
  {
   toImage._alpha = 100;
   delete toImage.onEnterFrame;
  }
 };
}


The blending works but strangely the fromImage is not shown, instead the 
toImage fades in from the white background of my Flash movie. As I mentioned 
before there are other image mc's in the holder movieclip but they are on 
depths 0 to 20 and are invisible so I doubt they have any influence on this.


Sascha



- Original Message - 
From: Weldon MacDonald [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, March 19, 2006 4:55 AM
Subject: Re: [Flashcoders] Alpha-blending two MC's with bitmaps?


I've done what you seem to be discribing and it works. You probably
have a small bug in your code. Without seeing the code it's hard to
say what it is, but you could look for a depth duplication problem.
Have you made certain the lower one is loading at all or has been made
visible...etc... Your idea will work, you just need to do some
debugging

On 3/18/06, Sascha Balkau [EMAIL PROTECTED] wrote:

Hi Michael,

there are several mc's in one container mc but all are set to invisible
except for two at a time. And I want to fade between these two but I 
haven't
managed to do so. The top most mc always fades in from the white 
background

as if the bottom mc would be invisible. But it isn't. Flash 8 is no choice
as my client wants it in Flash 7.


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Loading several images with one progressbar?

2006-03-12 Thread Sascha Balkau

Hi Adrian,

thanks for the idea but this approach will not work in my case because the 
images are loaded sequencially. If one image is finished loading, my class 
starts loading the next and so on, one after one. And the amount of images 
varies (the image filenames are fetched from a XML file).
I'm now defining a segmentWidth by dividing the full progressbar width by 
the amount of images that are going to be loaded. That gives me the 100% for 
one image on the whol bar. I just haven't figured out yet how to make it 
work so that the bar doesn't start from 0 at every image. Any other idea?


Sascha





- Original Message - 
From: Adrian Park [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, March 12, 2006 3:24 AM
Subject: Re: [Flashcoders] Loading several images with one progressbar?


Say you have 3 images loading, use something like this:

var bytesLoaded:Number = 0;
var bytesTotal:Number = 0;

bytesLoaded += image1.getBytesLoaded();
bytesTotal += image1.getBytesTotal();
bytesLoaded += image2.getBytesLoaded();
bytesTotal += image2.getBytesTotal();
bytesLoaded += image3.getBytesLoaded();
bytesTotal += image3.getBytesTotal();

var percentageLoaded:Number = (bytesLoaded/bytesTotal) * 100;

There may be ways to optimise this code depending on your circumstances 
(e.g.

just calculate bytesTotal once and reuse it) but this shows the basic idea.

Adrian P.


On 3/11/06, Sascha Balkau [EMAIL PROTECTED] wrote:


Hi,
this is probably an old hat but I can't get it right. I want to display
the
load progress of several images with one progress bar. How do I calculate
the percentage of the bar?

Thanks alot,
Sascha

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Loading several images with one progressbar?

2006-03-11 Thread Sascha Balkau

Hi,
this is probably an old hat but I can't get it right. I want to display the 
load progress of several images with one progress bar. How do I calculate 
the percentage of the bar?


Thanks alot,
Sascha

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Zinc 2.5 making Components slow

2006-02-19 Thread Sascha Balkau
Is somebody using mdm Zinc v2.5 with v2 or similar components? I'm working 
on a standalone application for a client where I need to use Zinc to save 
data to harddisk and the application uses the Bit Components set because the 
tabpane is needed.
I have a screen that has a tabpane with 6 tabs and on every tab are 12 
comboboxes. To build this up takes long already in a normal SWF but it even 
gets slower in a Zinc published EXE. Plus the tabpanes and comboboxes are 
getting very sluggish after published with Zinc.
Does somebody know why this is happening? I would be interested in making it 
run faster or like to hear somebodies experience with using SWF 
Studio/mProjector for a similar situation.


Thanks,
Sascha


--
Flash Game Programming Wiki http://fgpwiki.corewatch.net/
H1DD3N.R350URC3 http://hiddenresource.corewatch.net/

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [FlashCoders] scrollRect

2006-02-14 Thread Sascha Balkau

JesterXL,

I'd be interested in see this engine running but the demos on your site seem 
not to work anymore with the latest Flash 8.5  alpha player.
If I import the project into Flex Builder and try to run it , it tells me 
that some errors exist but it doesn't show me where the errors are.
Would be cool to get a hint on this to compile it with the latest Flex beta 
to make it run.


Thanks,
Sascha





I oringally wrote this in Flash 8, and ported to Flash 8.5.  There is no
reason it couldn't go back.

http://www.jessewarden.com/archives/2006/01/diesel_battlefi.html

- Original Message - 
From: Dimitrios Bendilas [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Tuesday, February 14, 2006 4:55 PM
Subject: [FlashCoders] scrollRect


Hi all,

I'm trying to make a very basic prototype to test parallax movement with
Flash 8.

Is movieclip.scrollRect what I should be using? I tried this:

var bg:MovieClip = _root.attachMovie(bg, bg, 2);
var y:Number = 0;
_root.onEnterFrame = function():Void {
bg.scrollRect = {x:0, y:y--, width:635, height:540};
}

The movieclip bg contains only a jpg 635x540.
The movement is pretty jumpy. Should I be using BitmapData instead?

I'm a bit lost! I've been searching for code samples online for the past 2
hours and
I haven't found anything useful.

Does anyone have a useful link for parallax or tile-based games using 
Flash

8 features?
Performance is the key issue here, since this is going for a very big and
complex game
and I want to optimize it as much as possible.

Thanks a lot!

Dimitrios
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] getting the name of an object

2006-01-23 Thread Sascha Balkau

hi,

this might be obvious but how do I get the name of an object? If I got an 
object named fooObj how can I get Flash to for example trace out the name of 
the object, so that it traces fooObj? I know this works with movieclips 
but how about objects or arrays?


Sascha

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] getting the name of an object

2006-01-23 Thread Sascha Balkau
Ok but it there a way to get the name of the variable that is reffering to 
the object? First I thought eval() could be used for that but it seems not.


-Sascha


- Original Message - 
From: Danny Kodicek [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Monday, January 23, 2006 10:43 PM
Subject: Re: [Flashcoders] getting the name of an object





hi,

this might be obvious but how do I get the name of an object? If I got an 
object named fooObj how can I get Flash to for example trace out the name 
of the object, so that it traces fooObj? I know this works with 
movieclips but how about objects or arrays?


Objects or arrays don't have a name. That is: you could have a variable 
fooObj referring to some object O, and you could set another variable 
barObj to refer to the same object. The object O is completely independent 
of the variables referring to it. For that matter, an object held in an 
array doesn't even have a variable name referring to it. So unless you set 
up some kind of convention of your own, the request doesn't really make 
much sense.


Danny


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] getting the name of an object

2006-01-23 Thread Sascha Balkau

Looks useful! Thanks Julius I will try out this code later today!
-Sascha

- Original Message - 
From: Julius - XK [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Tuesday, January 24, 2006 5:07 AM
Subject: Re: [Flashcoders] getting the name of an object




Is this what your looking for?  It has it's limitations, would be nice if 
there was a myObj.toString() == myObj..  Or something

along those lines :)



var myObj:Object = new Object;
var s:String = ;

s = getMyObjectName(myObj);
trace(s);
this[s].anyName = text;
trace(myObj.anyName);

function getMyObjectName(obj):String {
   for (i in this) {
   if (this[i] == obj) return i;// Should it be ===?
   }
}



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Converting amp; in a URL?

2006-01-20 Thread Sascha Balkau

Hi list,

does ActionScript have any facilities to convert special characters like 
amp; into just ? I have one Flash movie that reads URLs from an RDF file 
where all URLs are written with amp; inside the adress. My client would 
like these special chars to be converted to ''. Does Flash has anything to 
do that automatically (haven't found anything so far) or do I have to write 
my own convert method?


Thanks for help,
Sascha


--
Flash Game Programming Wiki http://fgpwiki.corewatch.net/
H1DD3N.R350URC3 http://hiddenresource.corewatch.net/

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Converting amp; in a URL?

2006-01-20 Thread Sascha Balkau
It's used in getURL. Thanks Adrian! Your small function solved it and helped 
me a ton!


Sascha



Are you outputting these URLs or using them in getURL()?

That should work in getURL(). But if you're outputting them, one way to
convert them is to use HTML text fields.

Or, if you can't change the text fields, try this:

str = Sometext with an amp; in.;

function convert(str, from, to) {
return str.split(from).join(to);
}

trace(convert(str, amp;, ));

Adrian



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Maintaining HTML special char codes in a HTML textfield?

2006-01-20 Thread Sascha Balkau

Hi,

does somebody know if it's somehow possible to get HTML special characters 
like amp;, quot;, lt; and gt; to be outputted in a Flash HTML enabled 
textfield without turning them into their conversions?
I've tried various ways like using escape sequences with unicode etc. but 
the textfield still converts them. There is no way to turn this behavior off 
for a HTML textfield but I'm wondering if there is some magical method to 
preprocess the string so that the textfield wouldn't recognize the special 
char sequences.
Otherwise can somebody confirm that there is absolutely no way to do that? 
In that case a textfield property to turn the conversion off would be a 
welcome feature in 8.5.


Thanks for any hint!
Sascha


--
Flash Game Programming Wiki http://fgpwiki.corewatch.net/
H1DD3N.R350URC3 http://hiddenresource.corewatch.net/

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Maintaining HTML special char codes inaHTMLtextfield?

2006-01-20 Thread Sascha Balkau
Thanks alot Robert for pointing into the right direction! Haven't thought 
that it's actually so easy. Using just str1.split().join(amp;) would 
however also replace the  of all other special chars but the way how you 
described in the first answer works well. Finally to replace all special 
chars and HTML braces while keeping other chars untouched I came up with 
this method which seems to work well so far:


private function convertTags(txt:String):String
{
   return 
(txt.split(amp;).join(amp;amp;)).split(quot;).join(amp;quot;)).split(lt;).join(amp;lt;)).split(gt;).join(amp;gt;)).split().join(lt;)).split().join(gt;);

}

-Sascha


- Original Message - 
From: Robert Chyko [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Saturday, January 21, 2006 4:39 AM
Subject: RE: [Flashcoders] Maintaining HTML special char codes 
inaHTMLtextfield?



Yeah, just tried it real quick... This looks like it gives you the
output you want (I think):

function convertAmp(str1){
newStr = str1.split().join(amp;)
return newStr;
}

var strOriginal = This - amp; - represents an ampersand.;
var strConverted = convertAmp(strOriginal);

ta1.text = strConverted;




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Chyko
Sent: Friday, January 20, 2006 2:23 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Maintaining HTML special char codes in
aHTMLtextfield?


If you wanted it to actually output amp; I'm assuming you could
capture the amp; in the string and replace it with amp;amp; - which
would theoretically output amp; - haven't actually tried this though.

Which I guess more generically would boil down to you replacing all your
 with amp; - that would take care of it for all the cases (amp;,
quot;, lt; etc).


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sascha
Balkau
Sent: Friday, January 20, 2006 1:22 PM
To: flashcoders
Subject: [Flashcoders] Maintaining HTML special char codes in a
HTMLtextfield?


Hi,

does somebody know if it's somehow possible to get HTML special
characters
like amp;, quot;, lt; and gt; to be outputted in a Flash HTML
enabled
textfield without turning them into their conversions?
I've tried various ways like using escape sequences with unicode etc.
but
the textfield still converts them. There is no way to turn this behavior
off
for a HTML textfield but I'm wondering if there is some magical method
to
preprocess the string so that the textfield wouldn't recognize the
special
char sequences.
Otherwise can somebody confirm that there is absolutely no way to do
that?
In that case a textfield property to turn the conversion off would be a
welcome feature in 8.5.

Thanks for any hint!
Sascha


--
Flash Game Programming Wiki http://fgpwiki.corewatch.net/
H1DD3N.R350URC3 http://hiddenresource.corewatch.net/

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Flash buttons in Firefox don't work?

2005-12-11 Thread Sascha Balkau

Hi list,

are there any known issues with buttons inside a flash movie doesn't work in 
the newest Firefox and Netscape versions?
I've developed a Flash RSS ticker for a client where I have a dynamic 
textfield (which uses CSS) and over the textfield mc I have a movieclip 
which acts as a mask for the textfield mc and as a button. When the user 
clicks, the URL from the newsfeed opens.
It all works flawless in IE/Win and Safari/Mac but the button doesn't work 
in the latest Firefox 1.5 and Netscape 7 and up. Any ideas why this could 
be?


Thanks,
Sascha

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 and duplicateMovieClip

2005-12-08 Thread Sascha Balkau
Thanks for pointing me to the migration section! I see now theres all kinds 
of methods replaced by OOP structuring. And I guess that means that 
movieclips can be duplicated to anywhere beyond it's own container in AS3! 
Correct me if I'm wrong!


Sascha



- Original Message - 
From: Troy Rollins [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Thursday, December 08, 2005 1:03 PM
Subject: Re: [Flashcoders] AS3 and duplicateMovieClip




On Dec 7, 2005, at 10:53 PM, Sascha Balkau wrote:

I'm not very familiar with AS3 yet but is there no duplicateMovieClip 
anymore? At least I couldn't find anything about it on the AS3 reference 
(http://livedocs.macromedia.com/labs/1/flex/langref/index.html). Or does 
some of these methods completely have been replaced by something else?
With Flash 8 AS2 nothing has been changed about duplicateMovieClip, so 
it's still not possible to duplicate a clip from one container into 
another. I was hoping it will be possible with AS3.

Anyone knows more about it?


duplicateMovieClip() -
flash.display.MovieClip.MovieClip()

(Replaced by new MovieClip class constructor function.)


Found under the AS2 to AS3 migration section.
--
Troy
RPSystems, Ltd.
http://www.rpsystems.net

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] AS3 and duplicateMovieClip

2005-12-07 Thread Sascha Balkau

Hi list,

I'm not very familiar with AS3 yet but is there no duplicateMovieClip 
anymore? At least I couldn't find anything about it on the AS3 reference 
(http://livedocs.macromedia.com/labs/1/flex/langref/index.html). Or does 
some of these methods completely have been replaced by something else?
With Flash 8 AS2 nothing has been changed about duplicateMovieClip, so it's 
still not possible to duplicate a clip from one container into another. I 
was hoping it will be possible with AS3.

Anyone knows more about it?

Thanks,
Sascha

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders