[Flashcoders] Flash 9 Full Screen Mode - Mac Player bugs?

2007-02-28 Thread Dan Rogers

Yo Flashcoders,

I am attempting to use the fullscreen feature in the Flash 9 player  
(Stage[displayState]), while keeping my publish version set to v8.   
Everything seems to work fine, but when I use the feature on Safari  
for the Mac, some of my button methods aren't working properly-   
namely onRollOver.   Has anyone else ran into this issue?


Any suggestions would be most appreciated.

-Danro
___
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 object called the function

2006-10-08 Thread Dan Rogers
Not sure if this is a solution in your case, but you could identify  
the calling function this way...


class Main {

function Main() {
runHello._id = Main told me to do it...;
runHello();
}

function runHello() {
var a = new A();
a.hello();
}

}

class A {

function A() {}

function hello() {
trace(hello);
trace(arguments.caller._id);
}

}


-Danro


On Oct 7, 2006, at 8:10 AM, Ramon Miguel M. Tayag wrote:


Hi everyone,

How do you find out which object calls a particular function?  Is it
even possible?

Let's say there are two classes:

class A
{
function A(){}

function hello()
{
trace (hello);
   //I want to know who called me, here
}
}

class Main
{   
var a = new A();

function Main()
{
a.hello();
}
}

=

How will A know that Main called the function?

Thank you,
--
Ramon Miguel M. Tayag
___
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] PNG sequence running slow the first time!

2006-10-08 Thread Dan Rogers
Something I've noticed that helps with this issue is on the first  
frame of the PNG sequence, place a copy of all of the PNGs on one  
frame (either masked or offstage), and it seems to load them all into  
memory for a faster run through.


Plus, I don't think using cacheAsBitmap will give you any performance  
boost in this case.


-Danro

On Oct 8, 2006, at 9:26 AM, Ellen Sundh wrote:


Hi!

I have a problem with some PNG-sequences that I put into Flash.  
They are quite heavy 3D films. I noticed that when I load them in  
the browser they play very slowly the first time. This is even if I  
check that the movie is finished loading. Any idea how to get  
around this problem? It is Flash 8 project and I use cacheAsBitmap  
= true; on the movie clip that loads in the PNG sequence.


Thanks in advance!

--
Ellen Sundh
Flash Developer

Great Works
. . . . . . . .  . . . . Mobile: +46 73 200 40 73
Office: +46 8 528 077 76
Sveavägen 66
111 34 Stockholm
 /|_
   ,'  .\
   ,--'_,'
  /   /
 (   -.  |
 | ) |
(`-.  '--.)
 `. )' Mjau..


___
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] Delegating Events and AS2

2006-09-27 Thread Dan Rogers
The problem is with this code-  the onRelease function is a method of  
the btn movieclip... so it doesn't have access to the dispatchEvent  
function.



btn.onRelease = function() {
trace('dispatching event');
			dispatchEvent({type:'click', target:this, message:btn+' was  
clicked'});

};


You could just do something like this instead if you want a quick  
local function:


var btnRelease = function () { dispatchEvent({type:'click',  
target:this, message:btn+' was clicked'}); }

btn.onRelease = Delegate.create(this, btnRelease);

Delegate saves the day again...

-Danro


On Sep 27, 2006, at 8:30 AM, vic wrote:

John, I think so but what I am trying to do it set up a BtnFunc  
Class that I can pass an argument to in order to set up the  
functionality of the button (argument bein the button instance  
name).  I am pretty close I have this so far:


FLA (with btnOnStage on stage):

import mx.utils.Delegate;
function handleEvent(eventObj) {
trace('handleConstruct')
trace(eventObj.target);
trace(eventObj.type);
trace(eventObj.message);
trace(eventObj.time);
}
var myBtnClass = new BtnFunc(0, btnOnStage);
myBtnClass.addEventListener('click', Delegate.create(this,  
handleEvent));


--


Class (BtnFunc.as):

import mx.events.EventDispatcher;
import mx.utils.Delegate;
class BtnFunc {
var addEventListener:Function;
var removeEventListener:Function;
var dispatchEvent:Function;
function BtnFunc(id, btn) {
EventDispatcher.initialize(this);
btn.onRelease = function() {
trace('dispatching event');
			dispatchEvent({type:'click', target:this, message:btn+' was  
clicked'});

};
}
}


It is firing off the event perfectly but my listener is not getting  
it and thus not running the handleEvent func.  What's the prob?



___
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] How do you manage your classes?

2006-09-26 Thread Dan Rogers
This is generally what I have been doing for my projects as well.  I  
am guessing that SVN users are doing something similar but instead of  
copying files manually, they are checking out a set of files and  
using that as their local snapshot.  During project A development,  
they would update, check-in, etc...  Then once it's time to move on  
to Project B, they would create a new module in subversion for the  
Project B files.


The problem I am trying to getting my head around is how to work with  
common shared classes throughout multiple projects...  BUT still keep  
copies of these classes in the local snapshot for archiving.  I am  
wondering if the SVN externals functionality would be the right  
solution?  Has anyone successfully used it for this purpose?


-Danro


On Sep 26, 2006, at 10:18 AM, Mike Keesey wrote:


Lately I actually copy all packages to a folder within my project's
folder. Why? Suppose you have a package and you use it on project A.
Later, you use it on project B, and realize there are some issues, so
you change some of the code. Project B finishes. Then, later on, you
find you have to go back to project A with some tweaks and  
republish it.

Because of changes in the package, there may be problems--at best you
will still have to spend time regression testing.

Copying your packages to a project-local folder means that you have a
secure snapshot of the package.
―
Mike Keesey


-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Dan Rogers
Sent: Monday, September 25, 2006 4:36 PM
To: Flashcoders mailing list
Subject: [Flashcoders] How do you manage your classes?

Flashcoders,

I've been wondering how other flash developers deal with AS2/AS3
class management on both a project-based and common library level,
while addressing the need to package up source code for a given
project to deliver to a team member or client.

I've used version control before, as well as doing the common
classpath thing for shared classes... but when it's time to deliver
the source code to someone, I would have to go in and hunt for all
the classes I used on a project and copy them to the FLA directory
(and recreate the com.package... structure as well).  Sometimes it
seems faster to simply create the AS files along with the FLA (in a
single package), and copy over utility files as needed.  But then you
get into duplicate classes scattered over multiple projects.

Can anyone provide any insight to a system that works well for them?
For example, does anyone run custom shell scripts (such as rsync)
that sync the current project with the main classpath directory?

Thanks,
-Danro
___
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] Delegating Events and AS2

2006-09-26 Thread Dan Rogers
I personally use an extremely simplified way of dealing with events.   
I've used EventDispatcher before, but it feels like overkill most of  
the time.  I realize my method has no ability to multicast events,  
but it's quick, easy to read and gets the job done.


Here's an example:

___
// WidgetManager.as

import mx.utils.Delegate;

class WidgetManager {
private var _widget1:Widget;
private var _widget2:Widget;

public function WidgetManager (timeline:MovieClip) {
_widget1 = new Widget(1, timeline.widget1_mc);
_widget1.clickEvent = Delegate.create(this, widgetClick); // 
add event

_widget2 = new Widget(2, timeline.widget2_mc);
_widget2.clickEvent = Delegate.create(this, widgetClick); // 
add event
}

private function widgetClick (eventObj:Object):Void {
trace(widget  + eventObj.id +  was clicked);
eventObj.target.clickEvent = null; // remove event
}
}

___
// Widget.as

import mx.utils.Delegate;

class Widget {
public var clickEvent:Function; // event method
private var _id:Number;
private var _buttonMC:MovieClip;

public function Widget (id:Number, mc:MovieClip) {
_id = id;
_buttonMC = mc;
_buttonMC.onPress = Delegate.create(this, buttonPress);
}

public function buttonPress ():Void {
clickEvent({target:this, id: _id});
}
}




On Sep 26, 2006, at 12:09 PM, Sean Scott wrote:


Hi All!,

wondering if someone can point me in the right direction.  I am trying
to find a ASBoradcast / Event Dispatcher light model for my app.

Basically i have a number of MCs that will have to either react to
events being broadcast or broadcast their own.

I have Essential AS2 by Colin Moock.  Trying to find something i can
import and maybe pass scope to it, vs have my main class extend it.

I've googled, searched the archived and exausted my more talented
flash developer friends.

Thanks,
Sean
___
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] Delegating Events and AS2

2006-09-26 Thread Dan Rogers
Vic, if you've ever used the XML or NetStream classes... it mimics  
those types of event updates.  For example...


var xmlData = new XML();
xmlData.onLoad = function () {
// gets invoked by the XML instance
}

So if you delegate the onLoad method, you get something like this:

xmlData.onLoad = Delegate.create(this, xmlDataLoad);

... which is essentially what I am trying to do with my own classes.   
Another reason I like delegating events this way, is that the  
compiler will catch typos in the names of the event functions, so I  
am not searching around trying to figure out why a certain event is  
not firing.


-Danro


On Sep 26, 2006, at 7:06 PM, vic wrote:

Hey Dan, I like the way you do it, its pretty simple.  But here is,  
what probably will be an incredibly stupid question:


How do I capture the event?  Thanks, V

I personally use an extremely simplified way of dealing with events.
I've used EventDispatcher before, but it feels like overkill most of
the time.  I realize my method has no ability to multicast events,
but it's quick, easy to read and gets the job done.

Here's an example:

___
// WidgetManager.as

import mx.utils.Delegate;

class WidgetManager {
private var _widget1:Widget;
private var _widget2:Widget;

public function WidgetManager (timeline:MovieClip) {
_widget1 = new Widget(1, timeline.widget1_mc);
_widget1.clickEvent = Delegate.create(this, widgetClick); // add event

_widget2 = new Widget(2, timeline.widget2_mc);
_widget2.clickEvent = Delegate.create(this, widgetClick); // add event
}

private function widgetClick (eventObj:Object):Void {
trace(widget  + eventObj.id +  was clicked);
eventObj.target.clickEvent = null; // remove event
}
}

___
// Widget.as

import mx.utils.Delegate;

class Widget {
public var clickEvent:Function; // event method
private var _id:Number;
private var _buttonMC:MovieClip;

public function Widget (id:Number, mc:MovieClip) {
_id = id;
_buttonMC = mc;
_buttonMC.onPress = Delegate.create(this, buttonPress);
}

public function buttonPress ():Void {
clickEvent({target:this, id: _id});
}
}




On Sep 26, 2006, at 12:09 PM, Sean Scott wrote:


Hi All!,

wondering if someone can point me in the right direction.  I am  
trying

to find a ASBoradcast / Event Dispatcher light model for my app.

Basically i have a number of MCs that will have to either react to
events being broadcast or broadcast their own.

I have Essential AS2 by Colin Moock.  Trying to find something i can
import and maybe pass scope to it, vs have my main class extend it.

I've googled, searched the archived and exausted my more talented
flash developer friends.

Thanks,
Sean
___
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@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] How do you manage your classes?

2006-09-25 Thread Dan Rogers

Flashcoders,

I've been wondering how other flash developers deal with AS2/AS3  
class management on both a project-based and common library level,  
while addressing the need to package up source code for a given  
project to deliver to a team member or client.


I've used version control before, as well as doing the common  
classpath thing for shared classes... but when it's time to deliver  
the source code to someone, I would have to go in and hunt for all  
the classes I used on a project and copy them to the FLA directory  
(and recreate the com.package... structure as well).  Sometimes it  
seems faster to simply create the AS files along with the FLA (in a  
single package), and copy over utility files as needed.  But then you  
get into duplicate classes scattered over multiple projects.


Can anyone provide any insight to a system that works well for them?   
For example, does anyone run custom shell scripts (such as rsync)  
that sync the current project with the main classpath directory?


Thanks,
-Danro
___
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] How do you manage your classes?

2006-09-25 Thread Dan Rogers
I'm not very familiar with subversion-  can it handle shared modules  
(or recursive modules I guess)?
I am curious how one would handle utility classes that get included  
in multiple projects...



On Sep 25, 2006, at 5:03 PM, eric dolecki wrote:

Using SVN, etc. make a repository on a shared server somewhere.  
Include
classes from there in your projects. Just make sure you update   
you're all

good to go.

On 9/25/06, Dan Rogers [EMAIL PROTECTED] wrote:


Flashcoders,

I've been wondering how other flash developers deal with AS2/AS3
class management on both a project-based and common library level,
while addressing the need to package up source code for a given
project to deliver to a team member or client.

I've used version control before, as well as doing the common
classpath thing for shared classes... but when it's time to deliver
the source code to someone, I would have to go in and hunt for all
the classes I used on a project and copy them to the FLA directory
(and recreate the com.package... structure as well).  Sometimes it
seems faster to simply create the AS files along with the FLA (in a
single package), and copy over utility files as needed.  But then you
get into duplicate classes scattered over multiple projects.

Can anyone provide any insight to a system that works well for them?
For example, does anyone run custom shell scripts (such as rsync)
that sync the current project with the main classpath directory?

Thanks,
-Danro
___
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] Tweening ColorTransform objects?

2006-09-23 Thread Dan Rogers

Hey Flashcoders,

Has anyone here attempted to tween the Flash 8 ColorTransform class?   
I am having some strange issues while trying to tween some  
ColorTransform objects using Grant Skinner's MultiTween class.  Seems  
that whenever I tween a ColorTransform object which contains yellow  
(?), I get a random spectrum of colors before the tween reaches it's  
target value.  I've posted the source and have included the AS  
below.  I realize there are other color-tweening scripts out there,  
but I was trying to use the ColorTransform class to see if it could  
be done.


Source:
http://download.danro.net/flashcoders/color_tween_test.zip

Thanks,
-Danro


code follows --

import com.gskinner.transitions.MultiTween;
import flash.geom.Transform;
import flash.geom.ColorTransform;
import mx.transitions.easing.*;
import mx.transitions.Tween;
import mx.utils.Delegate;

// color transform objects
var originColor:ColorTransform = new ColorTransform();
var currentColor:ColorTransform = new ColorTransform();
var rollOverColor:ColorTransform = new ColorTransform();
rollOverColor.rgb = 0xFFCC00;
var rollOutColor:ColorTransform = new ColorTransform();
rollOutColor.rgb = 0x0066CC;

// movieclip transform
var trans:Transform = new Transform(test_mc);

// update color function
function updateColor () {
trans.colorTransform = currentColor;
debug(DEBUG   + trans.colorTransform);
}

// set vars
var colorTween:Tween;
var mTween:MultiTween;

// rollover tween
function buttonRollOver () {
mTween = new MultiTween(currentColor, rollOverColor);
colorTween.stop();
colorTween = new Tween(mTween, position, Regular.easeOut, 0, 1, 20);
colorTween.onMotionChanged = Delegate.create(this, updateColor);
debug(DEBUG  - roll over ---);
}

// rollout tween
function buttonRollOut () {
mTween = new MultiTween(currentColor, rollOutColor);
colorTween.stop();
	colorTween = new Tween(mTween, position, Regular.easeInOut, 0, 1,  
20);

colorTween.onMotionChanged = Delegate.create(this, updateColor);
colorTween.onMotionFinished = Delegate.create(this, reset);
debug(DEBUG  - roll out ---);
}

// reset color to original
function reset () {
mTween = new MultiTween(currentColor, originColor);
colorTween.stop();
	colorTween = new Tween(mTween, position, Regular.easeInOut, 0, 1,  
30);

colorTween.onMotionChanged = Delegate.create(this, updateColor);
debug(DEBUG  - reset ---);
}

// button events
test_mc.onRollOut = Delegate.create(this, buttonRollOut);
test_mc.onRollOver = Delegate.create(this, buttonRollOver);

// debug function
function debug (txt:String) {
//trace(txt);
}

___
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] Tweening ColorTransform objects?

2006-09-23 Thread Dan Rogers
Thanks for the suggestion.  I took a look at their code, and it looks  
like they are still using the older Color object syntax.


I am simply looking to see if it's possible to tween using the  
ColorTransform class.


-Danro


On Sep 23, 2006, at 5:32 PM, Charles Parcell wrote:

I am going to point you to the API I was recently introduced to.  
Fuse Kit.


http://www.mosessupposes.com/Fuse/


Charles P.



On 9/23/06, Dan Rogers [EMAIL PROTECTED] wrote:


Hey Flashcoders,

Has anyone here attempted to tween the Flash 8 ColorTransform class?
I am having some strange issues while trying to tween some
ColorTransform objects using Grant Skinner's MultiTween class.  Seems
that whenever I tween a ColorTransform object which contains yellow
(?), I get a random spectrum of colors before the tween reaches it's
target value.  I've posted the source and have included the AS
below.  I realize there are other color-tweening scripts out there,
but I was trying to use the ColorTransform class to see if it could
be done.

Source:
http://download.danro.net/flashcoders/color_tween_test.zip

Thanks,
-Danro


code follows --

import com.gskinner.transitions.MultiTween;
import flash.geom.Transform;
import flash.geom.ColorTransform;
import mx.transitions.easing.*;
import mx.transitions.Tween;
import mx.utils.Delegate;

// color transform objects
var originColor:ColorTransform = new ColorTransform();
var currentColor:ColorTransform = new ColorTransform();
var rollOverColor:ColorTransform = new ColorTransform();
rollOverColor.rgb = 0xFFCC00;
var rollOutColor:ColorTransform = new ColorTransform();
rollOutColor.rgb = 0x0066CC;

// movieclip transform
var trans:Transform = new Transform(test_mc);

// update color function
function updateColor () {
trans.colorTransform = currentColor;
debug(DEBUG   + trans.colorTransform);
}

// set vars
var colorTween:Tween;
var mTween:MultiTween;

// rollover tween
function buttonRollOver () {
mTween = new MultiTween(currentColor, rollOverColor);
colorTween.stop();
colorTween = new Tween(mTween, position,  
Regular.easeOut, 0, 1,

20);
colorTween.onMotionChanged = Delegate.create(this,  
updateColor);

debug(DEBUG  - roll over ---);
}

// rollout tween
function buttonRollOut () {
mTween = new MultiTween(currentColor, rollOutColor);
colorTween.stop();
colorTween = new Tween(mTween, position,  
Regular.easeInOut, 0,

1,
20);
colorTween.onMotionChanged = Delegate.create(this,  
updateColor);

colorTween.onMotionFinished = Delegate.create(this, reset);
debug(DEBUG  - roll out ---);
}

// reset color to original
function reset () {
mTween = new MultiTween(currentColor, originColor);
colorTween.stop();
colorTween = new Tween(mTween, position,  
Regular.easeInOut, 0,

1,
30);
colorTween.onMotionChanged = Delegate.create(this,  
updateColor);

debug(DEBUG  - reset ---);
}

// button events
test_mc.onRollOut = Delegate.create(this, buttonRollOut);
test_mc.onRollOver = Delegate.create(this, buttonRollOver);

// debug function
function debug (txt:String) {
//trace(txt);
}

___
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] Tweening ColorTransform objects? [Solved]

2006-09-23 Thread Dan Rogers

Thank you for the replies.

My issue was due to the fact that I was overlooking the rgb  
property (doh), and inadvertently tweening it along with the other  
properties.  Below is the functional code which uses MultiTween and  
mx.transitions.Tween to tween a few ColorTransform objects.


-Danro


FLA Example:
http://download.danro.net/flashcoders/ColorTrans_Tween.zip

Code:
import com.gskinner.transitions.MultiTween;
import flash.geom.Transform;
import flash.geom.ColorTransform;
import mx.transitions.easing.*;
import mx.transitions.Tween;
import mx.utils.Delegate;

// color transform objects
var originColor:ColorTransform = new ColorTransform();
var currentColor:ColorTransform = new ColorTransform();
var rollOverColor:ColorTransform = new ColorTransform();
var rollOutColor:ColorTransform = new ColorTransform();
rollOverColor.rgb = 0xFFCC00;
rollOutColor.rgb = 0x0066CC;

// movieclip transform
var trans:Transform = new Transform(test_mc);

// update color function
function updateColor () { trans.colorTransform = currentColor; }

// tween vars
var colorTween:Tween;
var mTween:MultiTween;
var mTweenProps = [alphaMultiplier, alphaOffset,  
blueMultiplier, blueOffset, greenMultiplier, greenOffset,  
redMultiplier, redOffset]; 


// rollover tween
function buttonRollOver () {
mTween = new MultiTween(currentColor, rollOverColor, mTweenProps);
colorTween.stop();
colorTween = new Tween(mTween, position, Regular.easeOut, 0, 1, 20);
colorTween.onMotionChanged = Delegate.create(this, updateColor);
}

// rollout tween
function buttonRollOut () {
mTween = new MultiTween(currentColor, rollOutColor, mTweenProps);
colorTween.stop();
	colorTween = new Tween(mTween, position, Regular.easeInOut, 0, 1,  
20);

colorTween.onMotionChanged = Delegate.create(this, updateColor);
colorTween.onMotionFinished = Delegate.create(this, reset);
}

// reset color to original
function reset () {
mTween = new MultiTween(currentColor, originColor, mTweenProps);
colorTween.stop();
	colorTween = new Tween(mTween, position, Regular.easeInOut, 0, 1,  
30);

colorTween.onMotionChanged = Delegate.create(this, updateColor);
}

// button events
test_mc.onRollOut = Delegate.create(this, buttonRollOut);
test_mc.onRollOver = Delegate.create(this, buttonRollOver);



___
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] Reliable local FLV stop event

2006-09-06 Thread Dan Rogers
How are you creating the FLVs to begin with?  From what I can gather,  
the NetStream.Play.Stop issue seems to be related to how people  
create their FLV files.   For example, I recently created a bunch of  
FLVs via export from After Effects (using On2 VP6 codec), and the  
stop event works just fine- whether played locally or streamed from a  
server.


Does anyone have a solid answer as to why NetStream.Play.Stop fails  
under certain circumstances?


-Danro


On Sep 6, 2006, at 6:57 AM, Andreas R wrote:

I know this is an old question but i can't really seem to get a  
good grasp of it.


I have a client that loads FLVs locally off the machine it runs on.  
When movies stop, events get broadcasted. however sometimes the  
stop event i set up fails:


onStatus = function(info){
   switch(info.code){
   case NetStream.Play.Start:
   stopped = false;
   break;
   case NetStream.Buffer.Empty:
   if(stopped){
   broadcastMessage(onVideoComplete);
   }
   break;
   case NetStream.Play.Stop:
   stopped = true;
   break;
   }
}

On tracing out info.code onStatus, i see that buffer.empty and  
buffer.full flicker on and off during playback, and that gets me  
worried. Sometimes Play.stop is called before the buffer has played  
out, but buffer.flush and buffer.empty right now seem so unreliable  
in terms of actually firing at the end of the FLV that i'm confused  
as to how to even approach this.


Anyone got a solid, sound solution?

Thanks,

- Andreas SJ

___
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] Slow performance

2006-09-04 Thread Dan Rogers
If you're looking to improve performance and keep the speed of your  
animation, you could experiment with BitmapData.draw() and render a  
bitmap copy of a hidden text movieclip.  I think the bottleneck is  
mostly due to the heavy font vectors.  If your font movieclip was  
hidden and/or moved off-stage, you could probably get away with a  
single BitmapData object set to the size of the screen, redrawing  
each time the text changes.


-Danro


On Sep 3, 2006, at 1:19 PM, Marc Hoffman wrote:

I'm seeing a window full of text (Firefox, Win XP Pro) -- is this  
what you intended? If so, that's a HUGE number of vectors to redraw  
so rapidly. Furthermore, by using a serif font you're probably  
doubling or tripling the number of vectors, so try the simplest,  
non-serif, mono-stroke (consistent stroke thickness) font you can,  
such as Verdana. And of course lengthen the redraw interval.


Marc

At 12:24 PM 9/3/2006, you wrote:

Hi,
setInterval each 10ms might be a bit overkill.
grtz
JC


On 9/3/06, kariminal [EMAIL PROTECTED] wrote:


Hello All...

My flash movie fills the whole browser window. If the window is  
kept small
performance is great, however when I maximize the browser  
everything slows
down. This is a simple effect which I think should run at a good  
speed
regardless. I've uploaded a sample here: http://www.kurst.co.uk/ 
transfer/


And the animation code is as follows:

//CODE

   private function stopAnimation( ):Void{

   clearInterval( animationIID );

   }
   private function restartAnimation( ):Void{

   stopAnimation();
   animationIID = setInterval( this,  
animationLoop , 10 );


   }
   private function animationLoop( ):Void{


   // make sure we always keep the counter within the  
length

of
the array
   if ( lineCounter  code_lines.length ) lineCounter  
= 2


   // print the text
   if ( lineCounter == 0 ) {

   field_txt.text = code_lines[lineCounter]

   } else { field_txt.text = field_txt.text +
code_lines[lineCounter] }

   // ready counter for the next line

   lineCounter ++

   if (field_txt.maxscroll  1 ){


   pageCounter ++;
   field_txt.text = ;
   stopAnimation();
   clearInterval( clearIID );
   clearIID = setInterval( this,  
restartAnimation ,

clearIntervalTime );

   }


   }

//CODE


And I've also uploaded a copy of the whole class here
http://www.kurst.co.uk/transfer/textComponent.as
Any tips on optimizing this one are welcome...


Regards




Karim




___
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@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] Slow performance

2006-09-04 Thread Dan Rogers
That's a very good point to bring up- since you are only revealing a  
big block of text without extra effects, you could just use a mask.


On Sep 4, 2006, at 3:18 PM, Scott Hyndman wrote:


I would also try to avoid string concatenation. It's usually a big
performance issue, since strings are immutable (so a sequential block
of memory has to be allocated, and the strings you are joining are
copied to the new location).

I would draw an entire page up front, then just reveal as you go
through masking or an mc overlaying the text.

Scott

On 04/09/06, Scott Hyndman [EMAIL PROTECTED] wrote:

Are you ever calling dispose on the bitmap data? Because if not it
won't run for long.

Scott

On 04/09/06, kariminal [EMAIL PROTECTED] wrote:
 Thanks for the replies so far...

 I am now using BitmapData.draw() ( and source_mc._visible=false  
+ moved
 offstage ): it run a little faster than before. And only seems  
to choke when
 the browser is maximized at higher resolution ( around  
1280x1024 ), maybe I

 am knit picking?...

 But, I think something is not going right in my code and that  
the draw loop

 could be optimized. The code now looks something like this:

 // code

 private function animationLoop( ):Void{

 if ( lineCounter  code_lines.length )  
lineCounter = 2

 if ( lineCounter == 0 ) {
 field_txt.text = code_lines[lineCounter]
 } else { field_txt.text = field_txt.text +
 code_lines[lineCounter] }

 myBitmapData = new BitmapData(source_mc._width,
 source_mc._height , false, 0x );
 target_mc.attachBitmap(myBitmapData, 10);
 myBitmapData.draw(source_mc);

 lineCounter ++

 }
 // code

 I am finding it a little odd, that I am making a new BitMapData  
object every
 interval and tried moving it outside the loop but got strange  
results (due
 to my ignorance): every time 'attachBitmap' ran, it seemed the  
old bitmap

 was not being cleared.

 + also changed the font to Verdana, tried various interval  
times, but
 neither of these did much to improve the situation. Anyone think  
I can

 squeeze a little more FPS out of this one?..

 http://www.kurst.co.uk/transfer/2/ - Using BitmapData
 http://www.kurst.co.uk/transfer/1/ - and not







 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of  
Dan Rogers

 Sent: 04 September 2006 19:55
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Slow performance

 If you're looking to improve performance and keep the speed of your
 animation, you could experiment with BitmapData.draw() and  
render a bitmap
 copy of a hidden text movieclip.  I think the bottleneck is  
mostly due to
 the heavy font vectors.  If your font movieclip was hidden and/ 
or moved
 off-stage, you could probably get away with a single BitmapData  
object set

 to the size of the screen, redrawing each time the text changes.

 -Danro


 On Sep 3, 2006, at 1:19 PM, Marc Hoffman wrote:

  I'm seeing a window full of text (Firefox, Win XP Pro) -- is  
this what

  you intended? If so, that's a HUGE number of vectors to redraw so
  rapidly. Furthermore, by using a serif font you're probably  
doubling
  or tripling the number of vectors, so try the simplest, non- 
serif,

  mono-stroke (consistent stroke thickness) font you can, such as
  Verdana. And of course lengthen the redraw interval.
 
  Marc
 
  At 12:24 PM 9/3/2006, you wrote:
  Hi,
  setInterval each 10ms might be a bit overkill.
  grtz
  JC
 
 
  On 9/3/06, kariminal [EMAIL PROTECTED] wrote:
 
  Hello All...
 
  My flash movie fills the whole browser window. If the window  
is kept

  small performance is great, however when I maximize the browser
  everything slows down. This is a simple effect which I think  
should

  run at a good speed regardless. I've uploaded a sample here:
  http://www.kurst.co.uk/ transfer/
 
  And the animation code is as follows:
 
  //CODE
 
 private function stopAnimation( ):Void{
 
 clearInterval( animationIID );
 
 }
 private function restartAnimation( ):Void{
 
 stopAnimation();
 animationIID = setInterval( this,  
animationLoop ,

  10 );
 
 }
 private function animationLoop( ):Void{
 
 
 // make sure we always keep the counter  
within the

  length of the array
 if ( lineCounter  code_lines.length )  
lineCounter =

  2
 
 // print the text
 if ( lineCounter == 0 ) {
 
 field_txt.text = code_lines[lineCounter]
 
 } else { field_txt.text = field_txt.text +
  code_lines[lineCounter] }
 
 // ready counter for the next line
 
 lineCounter ++
 
 if (field_txt.maxscroll  1 ){
 
 
 pageCounter ++;
 field_txt.text

Re: [Flashcoders] oop question kind of...

2006-08-21 Thread Dan Rogers
I've also found a few quirks with removeMovieClip... however most of  
them seem to be related to depth.  I use this class whenever I remove  
a clip (dynamically attached or otherwise), and it seems to do the  
trick.


/**
The MovieClipRemover class is a static utility class which removes  
timeline movieclips


usage example:
MovieClipRemover.remove(test_mc);
*/

class MovieClipRemover {

// constructor
function MovieClipRemover () {}

// remove a timeline (or any depth) movieclip from the stage
static function remove (mc:MovieClip) {
var parent:MovieClip = mc._parent;
if (parent != null) {
var tempMC:MovieClip = parent.getInstanceAtDepth(0);
mc._visible = false;
mc.swapDepths(0);
mc.removeMovieClip();
if (tempMC != undefined) tempMC.swapDepths(0);
}
}
}

-Danro


On Aug 21, 2006, at 11:34 AM, [EMAIL PROTECTED] wrote:


Have you tried using some kind of factory type approach
to manage your deletion/creation?


yes, i use adts quite often...in fact i use the mvc pattern for  
quite a few apps i create.  So i have views that instantiate  
whatever movieclips it needs and deletes them when it doesn't need  
them.  the problem begins when a view needs to go away either  
because it is being replaced by another view or refreshed.  i  
noticed that the clips that were supposed to be deleted weren't  
really...futhermore, when being reinstantiated, they won't accept  
values...they exist, but they're undefined somehow...


b


___
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] fuse kit and events

2006-08-15 Thread Dan Rogers
I can't necessarily vouch for the Fuse part of the Fuse / Zigo  
engine, but I can say that in certain circumstances, the Zigo tween  
engine will perform more smoothly than the mx Tween class.  The mx  
Tween class is based entirely on frames to generate the animation,  
and will (at the expense of performance) render all of the frames as  
you specify them.The Zigo engine on the other hand uses a time- 
based system which will only play through as many frames necessary to  
complete your animation.  The benefit of Zigo is that you can change  
the framerate of your movie, and it will drop/add frames to play to  
your specified duration.  However in certain circumstances, you may  
want frame-level control over your animation, where the mx Tween  
class would be a better choice.


Hope that helps...

-Danro

On Aug 15, 2006, at 7:49 AM, [b) a d i [EMAIL PROTECTED] wrote:

since you're mentioning it, i'd like to know what benefits you  
sought by
using thisi've yet to find a reason to use this over the tween  
class but

i know several people who swear by it and i'm not convinced...
thanks





___
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] fuse kit and events

2006-08-15 Thread Dan Rogers
To clarify, the mx Tween package does allow you to set 'useSeconds'  
as an option to drop/add frames, however from what I understand, the  
Zigo engine has always been more optimized to handle time-based  
animation.   Performance aside, I think most people look to the  
Fuse / Zigo kit for all of the additional shortcut functions...



On Aug 15, 2006, at 9:13 AM, Dan Rogers wrote:

I can't necessarily vouch for the Fuse part of the Fuse / Zigo  
engine, but I can say that in certain circumstances, the Zigo tween  
engine will perform more smoothly than the mx Tween class.  The mx  
Tween class is based entirely on frames to generate the animation,  
and will (at the expense of performance) render all of the frames  
as you specify them.The Zigo engine on the other hand uses a  
time-based system which will only play through as many frames  
necessary to complete your animation.  The benefit of Zigo is that  
you can change the framerate of your movie, and it will drop/add  
frames to play to your specified duration.  However in certain  
circumstances, you may want frame-level control over your  
animation, where the mx Tween class would be a better choice.


Hope that helps...

-Danro

On Aug 15, 2006, at 7:49 AM, [b) a d i [EMAIL PROTECTED] wrote:

since you're mentioning it, i'd like to know what benefits you  
sought by
using thisi've yet to find a reason to use this over the tween  
class but

i know several people who swear by it and i'm not convinced...
thanks





___
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] fuse kit and events

2006-08-15 Thread Dan Rogers
I agree, I was a bigger fan of the Zigo project before it started  
getting so big in file size.


Tween is a great built-in tool, and Fuse is a nice toy with a 20k  
price tag.


-Danro


On Aug 15, 2006, at 10:56 AM, [b) a d i wrote:

Thanks for the explainations...i frequently create swfs that need  
to be
under 30k and by not using this component i've saved 20k...i also  
ran them
side by side and really didn't notice much difference in  
performance...since
then i've hacked the tween class, but i just wanted to hear other  
opinions

about it

so thanks

b
- Original Message -
From: Dan Rogers [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Tuesday, August 15, 2006 10:37 AM
Subject: Re: [Flashcoders] fuse kit and events



To clarify, the mx Tween package does allow you to set 'useSeconds'
as an option to drop/add frames, however from what I understand, the
Zigo engine has always been more optimized to handle time-based
animation.   Performance aside, I think most people look to the
Fuse / Zigo kit for all of the additional shortcut functions...


On Aug 15, 2006, at 9:13 AM, Dan Rogers wrote:


I can't necessarily vouch for the Fuse part of the Fuse / Zigo
engine, but I can say that in certain circumstances, the Zigo tween
engine will perform more smoothly than the mx Tween class.  The mx
Tween class is based entirely on frames to generate the animation,
and will (at the expense of performance) render all of the frames
as you specify them.The Zigo engine on the other hand uses a
time-based system which will only play through as many frames
necessary to complete your animation.  The benefit of Zigo is that
you can change the framerate of your movie, and it will drop/add
frames to play to your specified duration.  However in certain
circumstances, you may want frame-level control over your
animation, where the mx Tween class would be a better choice.

Hope that helps...

-Danro

On Aug 15, 2006, at 7:49 AM, [b) a d i [EMAIL PROTECTED]  
wrote:



since you're mentioning it, i'd like to know what benefits you
sought by
using thisi've yet to find a reason to use this over the tween
class but
i know several people who swear by it and i'm not convinced...
thanks





___
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] AS2 - (this) vs this

2006-08-12 Thread Dan Rogers
Thank you for the response...  although I am not sure if your answer  
contains some sort of hidden meaning.


Perhaps I should just stop thinking so much and get back to writing  
actionscript.


-Danro

On Aug 11, 2006, at 3:56 PM, Steven Sacks | BLITZ wrote:


Is there a reason to wrap this in parentheses?


(no)

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] AS2 - (this) vs this

2006-08-11 Thread Dan Rogers
This may be a simple question, but I just came across it and found it  
strange...

Is there a reason to wrap this in parentheses?

(this).foo

vs.

this.foo

Thanks,
-Danro

___
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] Trying not to loadMovie multiple times

2006-07-21 Thread Dan Rogers
If you are using loadMovie to load in static JPEGs or still images of  
some kind, you could initially load them into a hidden movieclip on  
stage... then when you're ready to duplicate them, you could use  
BitmapData.draw() to clone them into place.


 If you're loading in animated SWFs, then I think you may be out of  
luck.  I'm not aware of a workaround for duplicating loaded  
movies...  but I would also love to hear one! :)


-Danro


On Jul 21, 2006, at 9:01 AM, Danny Kodicek wrote:

The docs say that I can't use duplicateMovieClip on a movieClip  
brought in
with loadMovie or MovieClipLoader. Is there any other way to avoid  
running
loadMovie multiple times? I know the file will have been cached,  
but I'm
still seeing quite a long delay when loading in several copies (and  
this is

running locally, so it's not a bandwidth issue in any case).

Danny

___
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] BitmapData GlowFilter zebra effect?

2006-07-10 Thread Dan Rogers
I can assure you I was only applying the filter once.   I think there  
is a bug in the way that the knockout functionality is handled  
through the applyFilter method, when used in combination with the  
inner=false setting.   Whenever I switched the parameters to  
inner=true and knockout=true, the filter worked as expected.


Thanks,
-Danro

On Jul 10, 2006, at 4:30 AM, Yotam Laufer wrote:


Seems like you are applying the filter many times. That would be my
guess. Using the filters array makes sure that you apply it only once.

Best, Yotam.

On 09/07/06, Dan Rogers [EMAIL PROTECTED] wrote:

Thank you for the reply.

I tested it using your suggestion, and it seems to behave properly if
I use MovieClip.filters instead of using applyFilter.  However, since
I want the end result to be a bitmap (for animation purposes), I
wrote a little workaround code... as follows:

// draw bitmap 1
var glowFilterMC = parentMC.createEmptyMovieClip(glowfilter_mc,
parentMC.getNextHighestDepth());
var glowBmp = new BitmapData(targetMC._width, targetMC._height, true,
0x00);
glowFilterMC.attachBitmap(glowBmp, 1, auto, true);
glowBmp.draw(targetMC);
// apply glow filter with knockout
var filter = new GlowFilter(0xFF, 1, 5, 5, 5, 1, false, true);
glowFilterMC.filters = [filter];
// draw bitmap 2
var outlineMC = parentMC.createEmptyMovieClip(outline_mc,
parentMC.getNextHighestDepth());
var outlineBmp = new BitmapData(glowFilterMC._width,
glowFilterMC._height, true, 0x00);
outlineMC.attachBitmap(outlineBmp, 1, auto, true);
outlineBmp.draw(glowFilterMC);
// dispose of bitmap 1 and its holder
glowBmp.dispose();
glowFilterMC.removeMovieClip();


Quite a few more lines of code than the original method, but hey..
it works.

-Danro


On Jul 8, 2006, at 10:21 PM, John Grden wrote:

 Have you tried just applying the filter to the movieclip that the
 bitmapdata
 object is attached to rather than using applyFilter?

 On 7/8/06, Dan Rogers [EMAIL PROTECTED] wrote:

 Yesterday, I posted this topic regarding the inversion of a bitmap
 alpha channel, but the root of the problem is that I am trying to
 find a workaround for the GlowFilter knockout effect.

 For some reason, when I programatically apply a GlowFilter to a
 BitmapData object, and pass inner = false, with knockout = true, I
 get this bizarre zebra effect  I've provided code and a  
link to a

 side by side comparison screenshot.

 Here is an example of the code I am using:

 var filter = new GlowFilter(0xFF, 1, 5, 5, 5, 1, false, true);
 myBitmap.applyFilter(myBitmap, myBitmap.rectangle, new Point(0,  
0),

 filter);

 Following is a screen shot of the issue.  The left side is the  
result
 when simply using the GlowFilter without passing inner or  
knockout,
 and the right side is the strange zebra effect I get when I use  
the

 above code.

 http://download.danro.net/flashcoders/glowfilter_bug.jpg

 Has anyone else dealt with this?

 -Danro


 On Jul 7, 2006, at 3:29 PM, Dan Rogers wrote:

  Hi gang,
 
  I am trying to invert the alpha channel of a BitmapData  
object and

  destructively apply it to another bitmap using copyPixels.  Has
  anyone inverted an alpha channel on a bitmap?  I assume use
  applyFilter with ColorMatrixFilter, but I am not very swift in
  figuring out the correct color matrix settings to use.
 
  Thanks,
  -Danro
  ___
  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


___
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] BitmapData GlowFilter zebra effect?

2006-07-09 Thread Dan Rogers

Thank you for the reply.

I tested it using your suggestion, and it seems to behave properly if  
I use MovieClip.filters instead of using applyFilter.  However, since  
I want the end result to be a bitmap (for animation purposes), I  
wrote a little workaround code... as follows:


// draw bitmap 1
var glowFilterMC = parentMC.createEmptyMovieClip(glowfilter_mc,  
parentMC.getNextHighestDepth());
var glowBmp = new BitmapData(targetMC._width, targetMC._height, true,  
0x00);

glowFilterMC.attachBitmap(glowBmp, 1, auto, true);
glowBmp.draw(targetMC); 
// apply glow filter with knockout
var filter = new GlowFilter(0xFF, 1, 5, 5, 5, 1, false, true);
glowFilterMC.filters = [filter];
// draw bitmap 2
var outlineMC = parentMC.createEmptyMovieClip(outline_mc,  
parentMC.getNextHighestDepth());
var outlineBmp = new BitmapData(glowFilterMC._width,  
glowFilterMC._height, true, 0x00);

outlineMC.attachBitmap(outlineBmp, 1, auto, true);
outlineBmp.draw(glowFilterMC);
// dispose of bitmap 1 and its holder
glowBmp.dispose();
glowFilterMC.removeMovieClip();


Quite a few more lines of code than the original method, but hey..   
it works.


-Danro


On Jul 8, 2006, at 10:21 PM, John Grden wrote:

Have you tried just applying the filter to the movieclip that the  
bitmapdata

object is attached to rather than using applyFilter?

On 7/8/06, Dan Rogers [EMAIL PROTECTED] wrote:


Yesterday, I posted this topic regarding the inversion of a bitmap
alpha channel, but the root of the problem is that I am trying to
find a workaround for the GlowFilter knockout effect.

For some reason, when I programatically apply a GlowFilter to a
BitmapData object, and pass inner = false, with knockout = true, I
get this bizarre zebra effect  I've provided code and a link to a
side by side comparison screenshot.

Here is an example of the code I am using:

var filter = new GlowFilter(0xFF, 1, 5, 5, 5, 1, false, true);
myBitmap.applyFilter(myBitmap, myBitmap.rectangle, new Point(0, 0),
filter);

Following is a screen shot of the issue.  The left side is the result
when simply using the GlowFilter without passing inner or knockout,
and the right side is the strange zebra effect I get when I use the
above code.

http://download.danro.net/flashcoders/glowfilter_bug.jpg

Has anyone else dealt with this?

-Danro


On Jul 7, 2006, at 3:29 PM, Dan Rogers wrote:

 Hi gang,

 I am trying to invert the alpha channel of a BitmapData object and
 destructively apply it to another bitmap using copyPixels.  Has
 anyone inverted an alpha channel on a bitmap?  I assume use
 applyFilter with ColorMatrixFilter, but I am not very swift in
 figuring out the correct color matrix settings to use.

 Thanks,
 -Danro
 ___
 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] BitmapData GlowFilter zebra effect?

2006-07-08 Thread Dan Rogers
Yesterday, I posted this topic regarding the inversion of a bitmap  
alpha channel, but the root of the problem is that I am trying to  
find a workaround for the GlowFilter knockout effect.


For some reason, when I programatically apply a GlowFilter to a  
BitmapData object, and pass inner = false, with knockout = true, I  
get this bizarre zebra effect  I've provided code and a link to a  
side by side comparison screenshot.


Here is an example of the code I am using:

var filter = new GlowFilter(0xFF, 1, 5, 5, 5, 1, false, true);
myBitmap.applyFilter(myBitmap, myBitmap.rectangle, new Point(0, 0),  
filter);


Following is a screen shot of the issue.  The left side is the result  
when simply using the GlowFilter without passing inner or knockout,  
and the right side is the strange zebra effect I get when I use the  
above code.


http://download.danro.net/flashcoders/glowfilter_bug.jpg

Has anyone else dealt with this?

-Danro


On Jul 7, 2006, at 3:29 PM, Dan Rogers wrote:


Hi gang,

I am trying to invert the alpha channel of a BitmapData object and  
destructively apply it to another bitmap using copyPixels.  Has  
anyone inverted an alpha channel on a bitmap?  I assume use  
applyFilter with ColorMatrixFilter, but I am not very swift in  
figuring out the correct color matrix settings to use.


Thanks,
-Danro
___
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] BitmapData invert alpha channel

2006-07-07 Thread Dan Rogers

Hi gang,

I am trying to invert the alpha channel of a BitmapData object and  
destructively apply it to another bitmap using copyPixels.  Has  
anyone inverted an alpha channel on a bitmap?  I assume use  
applyFilter with ColorMatrixFilter, but I am not very swift in  
figuring out the correct color matrix settings to use.


Thanks,
-Danro
___
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] FLV or MP3 stops during tween

2006-06-30 Thread Dan Rogers
For the record... I think I finally figured out what the problem was  
with my FLV.


It turns out to have less to do with Tweening functions and more to  
do with the fact that the NetStream class hates to be instantiated  
into a local variable.


As a reference for anyone having trouble with NetStream, FLV and AS2,  
just remember a couple things:


1) NetConnection and NetStream instances should be stored as  
movieclip or object properties, not local variables.
2) If you instantiate NetConnection and NetStream in an AS2 class,  
make sure the class is not instantiated into a local variable, either.


This behavior seems strange to me, and I'm not sure if it's already a  
known bug.  If anyone can shed any further light on this topic, it  
would be appreciated :)


-Dan


On Jun 29, 2006, at 7:52 PM, Dan Rogers wrote:


Hi there, first time on the list...

I am working on a pretty intensive flash UI, which makes use of  
onEnterFrame events, Tween class animations, etc...  and whenever I  
try to stream in an FLV or MP3, the playback completely stops after  
about 5-10 seconds. I can usually make it stop by rolling my mouse  
over a movieclip that uses a Tween to do an alpha fade.


Has anyone had any experience troubleshooting this?  I'm using  
Flash 8 and AS2...  and am completely stumped at this point.   I've  
tried both the mx.transitions.Tween and the ZigoTween engine, and  
they both bring the FLV to a halt.


Thanks.
-Dan

___
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] FLV or MP3 stops during tween

2006-06-29 Thread Dan Rogers

Hi there, first time on the list...

I am working on a pretty intensive flash UI, which makes use of  
onEnterFrame events, Tween class animations, etc...  and whenever I  
try to stream in an FLV or MP3, the playback completely stops after  
about 5-10 seconds. I can usually make it stop by rolling my mouse  
over a movieclip that uses a Tween to do an alpha fade.


Has anyone had any experience troubleshooting this?  I'm using Flash  
8 and AS2...  and am completely stumped at this point.   I've tried  
both the mx.transitions.Tween and the ZigoTween engine, and they both  
bring the FLV to a halt.


Thanks.
-Dan

___
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