[Flashcoders] TextField with image...

2009-12-20 Thread Sander Schuurman

Hi cool list,

I'm encountering a problem with TextFields... I want to embed an image  
into a TextField, and position other content underneath the TextField.


The Image is loaded after a short while, and thus the height of the  
TextField increases. But no event is fired when the img is loaded.


How can I position something underneath the TextField after the img is  
placed inside the TextField?


I've tried first loading it so it is in cache, but no success... is  
there a way to insert the loaded Bitmap directly into the TextField?  
It can contain external images or linkage identifiers from the  
library. But can't get my head around getting a loaded Bitmap in...


Anyone?

Thanks!

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


[Flashcoders] Dancing characters...

2009-07-22 Thread Sander Schuurman

Hi list...

I'm trying to make some kind of Dock...

http://www.sentoplene.com/dock

But sometimes when I stop with the mouse, some characters keep on  
moving slightly... How can I get rid of that?


I'm simply doing on Event .ENTER_FRAME: scaleIcons and then  
positionIcons.
I'v tried to trigger the 2 functions only on MouseMove, but the  
responsiveness isn't accurate when you suddenly stop your mouse...


So anyone any idea with this?

thnx!

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


[Flashcoders] Variable naming conventions...

2009-06-29 Thread Sander Schuurman

Hi,

just wondering what you guys have for variable naming conventions...

I use:

ALL_CAPITALSfor constants
_underscore for private vars
this.thisPublicVar  for public vars
$dollarSignedParam  for method params
normalCamelCase for local method vars

Inside methods I can recognize all variable types...

What do you use?

Sander Schuurman
sentoplene.com
twitter: @sentoplene 
___

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


[Flashcoders] Sound Library/Libraries...

2009-06-27 Thread Sander Schuurman

Hi list,

I was just wondering... What do you guys use for Sound Fx?

Searching the internet for royalty free fx? Making your own? Bought a  
fancy spancy Sound Fx Library?


Do you guys know of some cool Sound Libs out there? Professional and  
well searchable?


Sorry for being curious :)

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


[Flashcoders] pixelbender - blurfilter

2009-06-15 Thread Sander Schuurman
When i make a blurfilter in PixelBender, will it be faster then the 
build-in flash blur?


Probably not right? Cause PixelBender only increases actionscript code 
when you have multiple cpu-cores, and the flash blur is native (C?) -code


Am I answering my own questions? Or can Pixel Bender produce a faster Blur?

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


[Flashcoders] Dynamicly created text-pages...

2009-04-23 Thread Sander Schuurman

Hi cool list,

Got myself a little optimazation challenge.

I'm getting HTML text from an XML file. The big text needs to be split 
into different pages, depending on the size of the text.

What's the best way to approach this?

I'm no counting words, en add words to a dynamic TextField (with 
css-style) en check with every word if it is still within the boundaries 
of the page. If it exceeds the height, then we will make another page 
and continue with adding the words. For really large texts this won't be 
the fastest way I guess.


Any thoughts on this subject?


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


Re: [Flashcoders] Dynamicly created text-pages...

2009-04-23 Thread Sander Schuurman
My first attempt was doing it with the scrollrect property. (wich ended 
up unfortunatly in seeing pixel-lines (of lines of text) sometime when 
using it to show different pages)


The problem isn't figuring out 'if' I need new pages (or how much), but 
it is where the last word/character/whatever of the big text is, to 
continue on a new page.


Joel Stransky wrote:

You can use the scrollV and maxScrollV properties to determine if you have
text outside of the field.

if(myTextField.scrollV != myTextField.maxScrollV){
  //scrollbars or pagination needed
}

On Thu, Apr 23, 2009 at 8:05 AM, Sander Schuurman b...@chello.nl wrote:

  

Hi cool list,

Got myself a little optimazation challenge.

I'm getting HTML text from an XML file. The big text needs to be split into
different pages, depending on the size of the text.
What's the best way to approach this?

I'm no counting words, en add words to a dynamic TextField (with css-style)
en check with every word if it is still within the boundaries of the page.
If it exceeds the height, then we will make another page and continue with
adding the words. For really large texts this won't be the fastest way I
guess.

Any thoughts on this subject?


___
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] Advanced Rollover Physics/Math...

2009-02-12 Thread Sander Schuurman
Hi cool list...

I'm trying to create a subtle/smooth rollover animation of elements that react 
(scale) to the mouse position, and are aware of each other, so they move out of 
the way for each other instead of overlapping.

I came across this subject a couple of times on the internet, but I can't find 
it with google anymore.

The following image explains the simple subject:
http://img209.imageshack.us/img209/7434/testuu7.gif

The following image explains more what I want design-wise:
http://img165.imageshack.us/img165/5407/test2ec9.gif

Somebody who can point me in the right direction?

Can I do this with a physics-engine? Without gravity, but with the awareness of 
the other elements?

How would you do it?

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


RE: [Flashcoders] Advanced Rollover Physics/Math...

2009-02-12 Thread Sander Schuurman
Do you know kinda where to start... I'm trying to figure out how I would 
program the awareness of the elements.

There must be some kind of idle position, and every element needs to know where 
the mouse cursor is and to know in wich direction to move, and know how big it 
needs to be according to the mouseposition, and how much space there is inside 
his 'zone', etc. etc.

pfoe

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steve Mathews
Sent: Thursday, 12 February 2009 16:50
To: Flash Coders List
Subject: Re: [Flashcoders] Advanced Rollover Physics/Math...

You could probably pull this off with a physics engine. You could probably
do it without also as a entire engine could be overkill.

On Thu, Feb 12, 2009 at 6:03 AM, Sander Schuurman 
sander.schuur...@oswaldandruby.com wrote:

 Hi cool list...

 I'm trying to create a subtle/smooth rollover animation of elements that
 react (scale) to the mouse position, and are aware of each other, so they
 move out of the way for each other instead of overlapping.

 I came across this subject a couple of times on the internet, but I can't
 find it with google anymore.

 The following image explains the simple subject:
 http://img209.imageshack.us/img209/7434/testuu7.gif

 The following image explains more what I want design-wise:
 http://img165.imageshack.us/img165/5407/test2ec9.gif

 Somebody who can point me in the right direction?

 Can I do this with a physics-engine? Without gravity, but with the
 awareness of the other elements?

 How would you do it?

 Thanks!
 ___
 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


RE: [Flashcoders] Garbage Collection difficulty

2009-01-29 Thread Sander Schuurman
Thnx! ran a few tests on a server; and indeed my code is doing great, and the 
GC occurs when some more memory is needed... thnx again...

I think the concept of this GC is key in AS3 development

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nate Beck
Sent: Wednesday, 28 January 2009 17:34
To: Flash Coders List
Subject: Re: [Flashcoders] Garbage Collection difficulty

Ah yes... I knew I read it somewhere... It's in that Grant Skinner article.


*Deferred GC and Indeterminacy*
A *very* important thing to understand about the Garbage Collector in FP9 is
that it's operations are deferred. Your objects will not be removed
immediately when all active references are deleted, instead they will be
removed at some indeterminate time in the future (from a developer
standpoint). The GC uses a set of heuristics that look at RAM allocation and
the size of the memory stack (among other things) to determine when to run.
As a developer, you must accept that fact that you will have no way of
knowing when (or even if) your inactive objects will get deallocated. You
must also be aware that inactive objects will continue to execute
indefinitely (until the GC deallocates it), so code will keep running (ex.
enterFrames), sounds will keep playing, loads will keep happening, events
will keep firing, etc.

It's very important to remember that you have no control over when your
objects will be deallocated, so you must make them as inert as possible when
you are finished with them. Strategies to manage this will be the focus for
a future article.


On Wed, Jan 28, 2009 at 8:31 AM, Nate Beck n...@tldstudio.com wrote:

 It was my understanding that Garbage Collection doesn't always occur right
 away.  When you have orphaned objects sitting on the heap, they are *
 eligible* for garbage collection.  That doesn't mean they will be removed
 from memory right away.  Especially if you're testing for JUST that to
 happen.  Usually GC occurs when more memory is needed.

 Someone else could probably speak to this topic much more intelligently
 than me.. but that was my understanding of how GC in general works.

 Cheers

   On Tue, Jan 27, 2009 at 6:04 AM, Sander Schuurman 
 sander.schuur...@oswaldandruby.com wrote:

 Thnx for the links... tried some, but still with no success... I now have
 the following:

 public class Image extends MovieClip
 {
  private var _thumbLoader:Loader;
  private var _largeLoader:Loader;

  private var _thumb:Bitmap;
  private var _large:Bitmap;

  public function loadThumb() :void
  {
  _thumbLoader = new Loader();
  _thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
thumbLoaded, false, 0, true);
  _thumbLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
errorOccured, false, 0, true);
  _thumbLoader.load(new URLRequest(_tu));
  }

  private function thumbLoaded( e :Event ) :void
  {
  _thumb = Bitmap(e.currentTarget.content);
  _thumb.smoothing = true;

  addChild(_thumb);

  _thumbLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE,

  thumbLoaded);
  _thumbLoader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR,

  errorOccured);
  _thumbLoader = null;

  dispatchEvent(new Event(Image.IMG_LOADED));
  }

  public function loadLarge() :void
  {
  _largeLoader = new Loader();
  _largeLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
largeLoaded, false, 0, true);
  _largeLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
errorOccured, false, 0, true);
  _largeLoader.load(new URLRequest(_lu));
  }

  private function largeLoaded( e :Event ) :void
  {
  _large = e.currentTarget.content;
  _large.smoothing = true;
  addChild(_large);

  _largeLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE,

  largeLoaded);
  _largeLoader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR,

  errorOccured);
  //_largeLoader.content.dispose();
  _largeLoader = null;

  dispatchEvent(new Event(Image.IMG_LOADED));
  }
  public function disposeLarge() :void
  {
  if (_large)
   {
removeChild(_large);
_large.bitmapData.dispose();
_large = null;
   }
  }

 public function dispose() :void
  {
  disposeLarge();

  removeChild(_thumb);
  _thumb.bitmapData.dispose();
  _thumb = null
  }

 }

 Anyone some tips? The large bitmap stays in memory...

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com [mailto:
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike
  Sent: Wednesday, 21 January 2009 21:18
 To: Flash Coders List
 Subject: Re: [Flashcoders] Garbage Collection difficulty

 Hi,

I think if you use it locally, you still have to dispose of it:

http://www.bartclaessens.com/tag/memory-management/


 http://labs.bigspaceship.com/2007/02/28/flash

RE: [Flashcoders] Garbage Collection difficulty

2009-01-27 Thread Sander Schuurman
Thnx for the links... tried some, but still with no success... I now have the 
following:

public class Image extends MovieClip
{
 private var _thumbLoader:Loader;
 private var _largeLoader:Loader;
 
 private var _thumb:Bitmap;
 private var _large:Bitmap;
 
 public function loadThumb() :void
 {
  _thumbLoader = new Loader();
  _thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, 
thumbLoaded, false, 0, true);
  _thumbLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, 
errorOccured, false, 0, true); 
  _thumbLoader.load(new URLRequest(_tu)); 
 }

 private function thumbLoaded( e :Event ) :void 
 {
  _thumb = Bitmap(e.currentTarget.content);
  _thumb.smoothing = true;

  addChild(_thumb);

  _thumbLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, 
thumbLoaded);
  _thumbLoader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, 
errorOccured);
  _thumbLoader = null;

  dispatchEvent(new Event(Image.IMG_LOADED));
 }

 public function loadLarge() :void
 {
  _largeLoader = new Loader();
  _largeLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, 
largeLoaded, false, 0, true);
  _largeLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, 
errorOccured, false, 0, true); 
  _largeLoader.load(new URLRequest(_lu));
 }

 private function largeLoaded( e :Event ) :void 
 {
  _large = e.currentTarget.content;
  _large.smoothing = true;
  addChild(_large);

  _largeLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, 
largeLoaded);
  _largeLoader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, 
errorOccured);
  //_largeLoader.content.dispose();
  _largeLoader = null;

  dispatchEvent(new Event(Image.IMG_LOADED));
 }
 public function disposeLarge() :void
 {
  if (_large)
   {
removeChild(_large);
_large.bitmapData.dispose();
_large = null;
   }
 }

public function dispose() :void
 {
  disposeLarge();  

  removeChild(_thumb);
  _thumb.bitmapData.dispose();
  _thumb = null
 }

}

Anyone some tips? The large bitmap stays in memory...

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike
Sent: Wednesday, 21 January 2009 21:18
To: Flash Coders List
Subject: Re: [Flashcoders] Garbage Collection difficulty

Hi,

I think if you use it locally, you still have to dispose of it:

http://www.bartclaessens.com/tag/memory-management/

http://labs.bigspaceship.com/2007/02/28/flash-performance-tips-part-ii/

http://www.gskinner.com/blog/archives/2006/06/as3_resource_ma.html

Search for dispose in some of these - also, one of the comments in 
Grant's article mentions testing in the IDE vs testing in the browser 
gives different results for loaded images.

HTH

Glen

Sander Schuurman wrote:
 That's a local variable right? Doesn't it happen automatic?
 I must concentrate on the _large Sprite, isn't it?


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com 
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike
 Sent: Wednesday, 21 January 2009 12:20
 To: Flash Coders List
 Subject: Re: [Flashcoders] Garbage Collection difficulty

 Hi,
   
 Do you have to destroy the Bitmap you create in the largeLoaded 
 function???

 Glen

 Sander Schuurman wrote:
   
 Hi cool list,

 I'm struggling with my Image class. It's supposed to load and unload 
 different sized images dynamicly; but I can't seem to get it to work 
 properly. The loading works fine, but the unloading not for the full 100%. 
 It visually unloads the image, but it remains in the memory. I have tried 
 several different things; I'm a bit stuck now.

 Here is a stripped class:

 public class Image extends MovieClip
 {
 ...
 private var _largeLoader:Loader;
 private var _large:Sprite;
 ...
 public function Image( thumbUrl   :String,
 normalUrl  :String,
 largeUrl :String   )
 {
 _tu = thumbUrl;
 _nu = normalUrl;
 _lu = largeUrl;
 }
 ...
 public function loadLarge() :void
 {
 _largeLoader = new Loader();
 
 _largeLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, largeLoaded, 
 false, 0, true

[Flashcoders] Garbage Collection difficulty

2009-01-21 Thread Sander Schuurman
Hi cool list,

I'm struggling with my Image class. It's supposed to load and unload different 
sized images dynamicly; but I can't seem to get it to work properly. The 
loading works fine, but the unloading not for the full 100%. It visually 
unloads the image, but it remains in the memory. I have tried several different 
things; I'm a bit stuck now.

Here is a stripped class:

public class Image extends MovieClip
{
...
private var _largeLoader:Loader;
private var _large:Sprite;
...
public function Image( thumbUrl   :String,
normalUrl  :String,
largeUrl :String   )
{
_tu = thumbUrl;
_nu = normalUrl;
_lu = largeUrl;
}
...
public function loadLarge() :void
{
_largeLoader = new Loader();

_largeLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, largeLoaded, 
false, 0, true);

_largeLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, 
errorOccured, false, 0, true);
_largeLoader.load(new URLRequest(_lu));
}

private function largeLoaded( e :Event ) :void
{
var b:Bitmap = Bitmap(largeLoader.content);


_largeLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, largeLoaded);

_largeLoader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, 
errorOccured);
_largeLoader = null;

_large = new Sprite();
_large.addChild(b);
addChild(_large);

dispatchEvent(new Event(Image.IMG_LOADED));
}
...
public function clear( full :Boolean = false ) :void
{
// clear normal img and large img
... ?

// tried things like:

//_normal.removeChildAt(0);
//_normal = null;
//removeChild(_normal);
//_large.removeChildAt(0);
//_large = null;
//removeChild(_large);
//delete(_normal.removeChildAt(0));
//delete(_large.removeChildAt(0));

// removes the images visually, but they won't get GC'ed

if (full)
{
// clear thumb and itself
}
}
}

Thanks in advance!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Garbage Collection difficulty

2009-01-21 Thread Sander Schuurman
That's a local variable right? Doesn't it happen automatic?
I must concentrate on the _large Sprite, isn't it?


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike
Sent: Wednesday, 21 January 2009 12:20
To: Flash Coders List
Subject: Re: [Flashcoders] Garbage Collection difficulty

Hi,
  
Do you have to destroy the Bitmap you create in the largeLoaded 
function???

Glen

Sander Schuurman wrote:
 Hi cool list,

 I'm struggling with my Image class. It's supposed to load and unload 
 different sized images dynamicly; but I can't seem to get it to work 
 properly. The loading works fine, but the unloading not for the full 100%. It 
 visually unloads the image, but it remains in the memory. I have tried 
 several different things; I'm a bit stuck now.

 Here is a stripped class:

 public class Image extends MovieClip
 {
 ...
 private var _largeLoader:Loader;
 private var _large:Sprite;
 ...
 public function Image( thumbUrl   :String,
 normalUrl  :String,
 largeUrl :String   )
 {
 _tu = thumbUrl;
 _nu = normalUrl;
 _lu = largeUrl;
 }
 ...
 public function loadLarge() :void
 {
 _largeLoader = new Loader();
 
 _largeLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, largeLoaded, 
 false, 0, true);
 
 _largeLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, 
 errorOccured, false, 0, true);
 _largeLoader.load(new URLRequest(_lu));
 }

 private function largeLoaded( e :Event ) :void
 {
 var b:Bitmap = Bitmap(largeLoader.content);

 
 _largeLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, 
 largeLoaded);
 
 _largeLoader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, 
 errorOccured);
 _largeLoader = null;

 _large = new Sprite();
 _large.addChild(b);
 addChild(_large);

 dispatchEvent(new Event(Image.IMG_LOADED));
 }
 ...
 public function clear( full :Boolean = false ) :void
 {
 // clear normal img and large img
 ... ?

 // tried things like:

 //_normal.removeChildAt(0);
 //_normal = null;
 //removeChild(_normal);
 //_large.removeChildAt(0);
 //_large = null;
 //removeChild(_large);
 //delete(_normal.removeChildAt(0));
 //delete(_large.removeChildAt(0));

 // removes the images visually, but they won't get 
 GC'ed

 if (full)
 {
 // clear thumb and itself
 }
 }
 }

 Thanks in advance!
 ___
 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] AS3 Shoutcast Stream Player...

2009-01-14 Thread Sander Schuurman
Hi cool list,

I made a shoutcast streaming mp3-player and I'm having some little problems 
with it.

When the stream is playing, the memory slowly builds up (really slowly), and 
sometimes jumps up with 6 MB or something. I've read that you can't overcome 
this, unless you close the stream and re-open it. Fair enoug; but what is a 
suitable memory amount to re-open the stream? Is it when bigger than 50MB, 
100MB, or 250MB, or...?

And sometimes the player has weird things, like playing the music really slow, 
or not playing a stream at all from a server. I've read that streaming mp3 from 
shoutcast always stays a little buggy? Other people believe/read this? And 
shoutcast doesn't need crossdomain.xml things right? Anyone know why it's not 
playing from the server? (player and stream are on different servers)

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


[Flashcoders] Class syntax question...

2009-01-07 Thread Sander Schuurman
Hi cool list,

I want to make a Class that contains MotionBlur methods that I can call like 
this: MotionBlur.coordBlur(mc, 1.5);

I have other classes wich I don't initiate and just call static methods from. 
The MotionBlur class looks like this:
public class MotionBlur
{

public function MotionBlur()
{
// empty, never initiated
}

public static function coordBlur(   mc :MovieClip, blurFactor 
:Number = 1.5 ) :void
{
// calculate blur and apply blur setting to mc
}

public static function clearBlur(mc :MovieClip ) :void
{
// clear blur setting on mc
}
}

Ideally I want to use this through TweenMax like this:
TweenMax.from(mc, .4, {
alpha: 0, x: 1500, delay: 2, ease: Back.easeOut,
onUpdate: MotionBlur.coordBlur, 
onUpdateParams: [mc, 1.5],
onComplete: 
MotionBlur.clearBlur, onCompleteParams: [mc], overwrite: false
} );

But I get the following error: (even if I just call the method outside tweenmax 
like this MotionBlur.coordBlur(chick, 2);)
1120: Access of undefined property MotionBlur.

I'm not quit sure what is going wrong here... does anyone see something strange 
that I'm totally missing?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Type of reference to parent?

2008-12-03 Thread Sander Schuurman
Hi cool list.

In the following piece of code, I cannot make the type of the parent reference 
to DisplayObject. If I set the reference-type to *, all works fine. But there 
must be a more sophisticated way that produces cleaner code.

Anyone?

Code:
public class Test extends Sprite
{
public var o:DisplayObject;
public var r:DisplayObject; // produces error see below
// public var r:*; // works like a charm

public function Test( obj :DisplayObject )
{
r = obj.parent;
o = obj;
r.addChild(this); // this line produces the error
}
}

Error:
1061: Call to a possibly undefined method addChild through a reference with 
static type flash.display:DisplayObject.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Drawing BitmapData - thinner lines?

2008-11-13 Thread Sander Schuurman
Hi cool list,

I am trying out some dynamic drawing to bitmapData. It works well, only my 
drawn lines are a bit chunky and thick. ( see 
http://img227.imageshack.us/img227/118/exampleyu5.jpg )
How can I make the lines a bit thinner and more 'organic'?

I know it's possible... I checked out some other drawing examples on:
http://www.lessrain.com/projects/luis/algorithm/liverender/
http://blog.andre-michelle.com/2008/fur-like-renderings/#comments

I'm copying a drawn line from the library by the way, and then draw it to a 
bitmapdata (bitmap smoothing = true)

thnx in advance!


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


[Flashcoders] Defenition of a Motion Designer...

2008-10-28 Thread Sander Schuurman
Just to check other people's definition of a Motion Designer.

What do you think a motion designer should be doing?

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


[Flashcoders] FW: External flv security issue...

2008-09-23 Thread Sander Schuurman
Does anyone have some knowledge to share? Concerning this issue?


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sander Schuurman
Sent: Thursday, 18 September 2008 11:04
To: Flash Coders List
Subject: [Flashcoders] External flv security issue...

hi cool list,

I'm trying to load external swf into my flashapp.
crossdomain.xml is in the correct place... the root of the server wich hosts 
the flv's...
checkPolicyFile is giving positive results...
inside the the swf is a flash video... don't know if this is external or 
internal...

I keep getting this error:
SecurityError: Error #2121: Security sandbox violation: Loader.content: 
http://sitem/adtest.swf cannot access 
http://www.bladiebla.tv/flashcommercials/banner_320x240.swf?pid=test. This may 
be worked around by calling Security.allowDomain.

Inside the policylog all policy stuff is accepted. AllowDomain doesn't do the 
trick also...

On the papervision mailing list I came accross a 'new' security thingie from 
Flashplayer 9.0.115 I believe... and someone said something about a 
(policy)flag that needs to be in the video? I read it really quick so I'm not 
sure what I read ;) But google isn't telling much on the subject...

Does anyone know something about this issue?
___
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] External flv security issue...

2008-09-18 Thread Sander Schuurman
hi cool list,

I'm trying to load external swf into my flashapp.
crossdomain.xml is in the correct place... the root of the server wich hosts 
the flv's...
checkPolicyFile is giving positive results...
inside the the swf is a flash video... don't know if this is external or 
internal...

I keep getting this error:
SecurityError: Error #2121: Security sandbox violation: Loader.content: 
http://sitem/adtest.swf cannot access 
http://www.bladiebla.tv/flashcommercials/banner_320x240.swf?pid=test. This may 
be worked around by calling Security.allowDomain.

Inside the policylog all policy stuff is accepted. AllowDomain doesn't do the 
trick also...

On the papervision mailing list I came accross a 'new' security thingie from 
Flashplayer 9.0.115 I believe... and someone said something about a 
(policy)flag that needs to be in the video? I read it really quick so I'm not 
sure what I read ;) But google isn't telling much on the subject...

Does anyone know something about this issue?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] removeChild madness

2008-09-09 Thread Sander Schuurman
I know there's a lot written about the Garbage Collection, and removing assets 
in AS3...
I'm trying to get my hands around it, but I'm still strugling ;)

A simple example:

I'm adding a MovieClip from the library, and I'm removing it as well, like a 
toggle.
The MovieClip contains the System.totalMemory property.
If I keep toggling the MC on and of... the memory keeps going up...
I'm destroying the MC and removing it from the displayList...
But it's not cleared from the memory. What Am I missing?

ToggleCode:

private function toggleDebug() :void
{
var dw:debugWindow_lib = getChildByName('debugWindow') as 
debugWindow_lib;
if (dw == null )
{
var debugWindow:MovieClip = new debugWindow_lib();
debugWindow.name = debugWindow;
addChild(debugWindow);
}
else
{
dw.destroy();
removeChild(dw);
}
}

Class

public class debugWindow_lib extends MovieClip
{
public function debugWindow_lib()
{
addEventListener(Event.ENTER_FRAME, onEnterFrame, 
false, 0, true);
}

private function onEnterFrame( e :Event ) :void
{
var tM:Number = System.totalMemory / 1024;
totalMemory.text = tM.toString();
}
public function destroy()
{
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
}
}

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


[Flashcoders] Removing loaded swf...

2008-08-15 Thread Sander Schuurman
Hi cool list!

I'm trying do build a generic structure of pages (swf's) loaded in a main swf, 
and unloading as well ofcourse.
Now I'm trying to unload a loaded swf, with the famous Garbage Collection. But 
I'm not sure I'm doing it the right way. Hope you could point me in the right 
direction.

My code:

private function loadPage( qUrl :String ) :void
{
var mLoader:Loader= new Loader();
var mRequest:URLRequest = new URLRequest( qUrl );

mLoader.contentLoaderInfo.addEventListener( Event.COMPLETE, 
pageComplete );
mLoader.load( mRequest );
}
private function pageComplete( e :Event ) :void
{
currentPage = e.currentTarget.content;

currentPage.addEventListener( Page.PAGE_INIT, initPage );
currentPage.addEventListener( Page.GOTO_PAGE, gotoPage );

addChild(currentPage);
}
private function gotoPage( e :Event ) :void
{
var nextPage = currentPage.gotoPage;

currentPage.removeEventListener( Page.PAGE_INIT, initPage );
currentPage.removeEventListener( Page.GOTO_PAGE, gotoPage );

var loader:Loader = Loader( e.target );
loader.unload();

loadPage( nextPage );
}

I'm not sure about the gotoPage method, if I can make a Loader object of the 
currentPage and unload it. Is it totally ready for the GC to be deleted?
Thnx in advance.

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


[Flashcoders] Microphone capture and saving with PHP or ASP

2008-08-07 Thread Sander Schuurman
Hi cool list,

Is it possible to capture the microphone of a computer and save/send it to a 
serverside language (PHP/ASP) without Flash Media Server?

Convert it to a ByteArray and sending raw data?
Quick searches tell me that it isn't possible without Flash Media Server...

Anyone has experience with this?

thnx!

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


RE: [Flashcoders] Masking Effect

2008-07-30 Thread Sander Schuurman
thnx!

this.cachAsBitmap = true; did the trick! Without converting to a bitmap, just 
the lines as the mask.

thnx again.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of allandt 
bik-elliott (thefieldcomic.com)
Sent: Tuesday, 29 July 2008 15:27
To: Flash Coders List
Subject: Re: [Flashcoders] Masking Effect

you could convert the lines to fills (under object i believe) or you could
use a bitmap (remember to use runtime bitmap caching)

On Tue, Jul 29, 2008 at 1:37 PM, Sander Schuurman 
[EMAIL PROTECTED] wrote:

 Hi cool list,

 I'm working on a masking effect and set it up with a mask MovieClip wich
 provide animated lines.

 Other masking effects work great when applied in the same way I am trying
 with this one. Only the other masking effects use Fills together with the
 lines.

 So my logic is saying me that lines don't trigger the mask of a
 DisplayObject and fills do. Am I correct?

 Is it possible otherwise to draw the lines to a bitmap object and have that
 as a mask? Or is a bitmap object always square when used as a mask?

 Thnx in advance,

 Sander
 ___
 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] Masking Effect

2008-07-29 Thread Sander Schuurman
Hi cool list,

I'm working on a masking effect and set it up with a mask MovieClip wich 
provide animated lines.

Other masking effects work great when applied in the same way I am trying with 
this one. Only the other masking effects use Fills together with the lines.

So my logic is saying me that lines don't trigger the mask of a DisplayObject 
and fills do. Am I correct?

Is it possible otherwise to draw the lines to a bitmap object and have that as 
a mask? Or is a bitmap object always square when used as a mask?

Thnx in advance,

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


[Flashcoders] Animating with big output in for example PNG

2008-07-09 Thread Sander Schuurman
Hi,

I'm really inspired by guys like Erik Natzke and Jared Tarbell, and I'm trying 
some of my drawing and animation-skills wich I want to be a png of large 
resolution in the end.

I have the famous png encoding class. 
(http://www.kaourantin.net/2005/10/png-encoder-in-as3.html)
I know of the technique to draw the animation to a bitmap during the animation.
The only thing I don't know yet how to accomplish is the fact that Natzke for 
example outputs 10.000px by 10.000px files.

Does anyone have experience in doing things like this?
Any tips?

Thnx in advance.

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


[Flashcoders] NetStream's working locally, but not on a network-address

2008-07-08 Thread Sander Schuurman
Hi list,

I have a Video playing in a custom player, and I encounter a strange problem.
I made lots of video players allready, but now it wont playback the video off 
of a network-address.

Variables are passed to the player, and are in the player correctly received.
Tried it first in as3, and then quickly ported it to as2, but both versions 
encounter the same problem.

flv and swf and html are in the same folder... first tried it in swfobject, 
then normal embedding, but both the same problem... I don't know where to look 
now.
Local playback security: play local files only I don't need to put this on 
network right? If everything is on the same domain?

Code is minimal/simple like this:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.onStatus = function(infoObject:Object) {
switch(infoObject.code)
{
case 'NetStream.Play.Stop':
playBtn._visible = 
vidT._visible = true;
}
};

homeVid.attachVideo(ns);

vidT.text= (_root.vidTitle != null)? _root.vidTitle: 'no 
addVariable content.';
var vidU:String= (_root.vidUrl!= null)? _root.vidUrl: 
'test.flv';

playBtn.onRelease = function()
{
playBtn._visible = vidT._visible = false;
ns.play(vidU);
}


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


[Flashcoders] Flash banner / layer on top - clickthrough?

2008-05-29 Thread Sander Schuurman
Hi all,

 

What's the latest status on transparent flash banners/layers? Can you
click through them to the underlaying HTML?

 

Thought it wasn't possible, but came across an example that worked in
IE7. On Firefox it wasn't possible, although I thought sometimes it
showed some kind of behaviour that would suggest clickthroughs.

 

So what's the status?

And how does the Flash layer needs to be embedded... I thought wmode was
a key element...

 

Sorry for me being lost here...

 

Regards,

 

Sander

 

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


RE: [Flashcoders] Flash banner / layer on top - clickthrough?

2008-05-29 Thread Sander Schuurman
This is the example.

http://www.bandbreed.nl/client/clubmed/

takes quit a while to load!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Helmut
Granda
Sent: Thursday, 29 May 2008 16:39
To: Flash Coders List
Subject: Re: [Flashcoders] Flash banner / layer on top - clickthrough?

Could you show us the example you came across? You can always set up
your
SWF to talk to JS and then to the underlying HTML.

On Thu, May 29, 2008 at 5:49 AM, Sander Schuurman
[EMAIL PROTECTED]
wrote:

 Hi all,



 What's the latest status on transparent flash banners/layers? Can you
 click through them to the underlaying HTML?



 Thought it wasn't possible, but came across an example that worked in
 IE7. On Firefox it wasn't possible, although I thought sometimes it
 showed some kind of behaviour that would suggest clickthroughs.



 So what's the status?

 And how does the Flash layer needs to be embedded... I thought wmode
was
 a key element...



 Sorry for me being lost here...



 Regards,



 Sander



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




-- 
...helmut
___
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] Fullscreen Flash Video

2008-05-20 Thread Sander Schuurman
Hi people,

 

On some sites I do see some really smooth fullscreen video action...

 

What's the best way of doing this. What are the points to look out
for...

 

-  encodingwise?

-  Using netstream? 

-  Using bitmap(data) objects?

 

Like for example http://www.blackbeltmonkey.com/ 

 

What's the best way performance-wise...?

 

Thnx in advance!

 

Regards,

 

Sander

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


[Flashcoders] FPS limit of flash player inside browser?

2008-05-07 Thread Sander Schuurman
Hi,

 

Just came across some limitations on the fps of a flash movie inside a
browser.

I've read on the internet some messages about the limit to be at around
60? 

But my tests got stuck at around 33 fps, it begins at around 57, but
drops within a few seconds to around 33...

 

Anyone can shine a light on this subject?

 

Thnx in advance,

 

Sander Schuurman

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