[Flashcoders] This list is acting up again?

2008-02-05 Thread Merrill, Jason
Something up with this list again? The reply below took 13 and 1/2 hours
to post, and when it did, the timestamp of when it was supposedly sent
was off by 8 hours.  He asked the question at 8:22am (at least according
to the timestamp), and I replied immediately around 8:30am but it didn't
post until 10pm Eastern. 


Jason Merrill
Bank of America  
GT&O L&LD Solutions Design & Development 
eTools & Multimedia 

Bank of America Flash Platform Developer Community



 

>>-Original Message-
>>From: [EMAIL PROTECTED] 
>>[mailto:[EMAIL PROTECTED] On Behalf 
>>Of Merrill, Jason
>>Sent: Tuesday, February 05, 2008 2:48 PM
>>To: Flash Coders List
>>Subject: RE: [Flashcoders] DataGrid and Button
>>
>>http://www.flash-db.com/Tutorials/cellrenderer/
>>
>>http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/h
>>tml/wwhelp
>>.htm?context=LiveDocs_Parts&file=3131.html
>>
>>
>>Jason Merrill
>>Bank of America
>>GT&O L&LD Solutions Design & Development eTools & Multimedia 
>>
>>Bank of America Flash Platform Developer Community
>>
>>
>>
>> 
>>
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On 
>>Behalf Of Lehr, 
Theodore M (N-SGIS)
Sent: Tuesday, February 05, 2008 8:22 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] DataGrid and Button

Anyone know of a good tutorial on how to incorporate a 
>>button into a 
datagrid?

 

Ted

___
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] Re: Odd Blend Mode Problem

2008-02-05 Thread Zeh Fernando
There's a series of different problems that could be causing this. It 
depends on a lot of parameters and vary from player to player, from 
system to system.


Basically you have to force the entire region to be drawn so those areas 
won't be erased. Having a transparent box (100% transparency is ok) on 
top of the offending area can help, as well as having an empty filter 
(like a blur of 0) added to the object or the parent object.


There's no magic solution, you just got to try different things to force 
rendering to take place on those areas.


Zeh


I've got an API-drawn rectangle with a hairline stroke, with a blend mode
of 3. (Multiply)

When the rectangle clip is tweened over a bitmap, occasionally there are
'flickers' of a lighter color right at the edges, where the stroke would be.
I've tried no stroke, a 1px stroke...everything I could think of to remove
this flicker. Anyone else experience this or have an idea why it's
happening?

Exported at Flash 8 in CS3.

-John Mark Hawley


___
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] AS3 receiving mouse event on overlap sibling sprite

2008-02-05 Thread Jason Van Cleave
this may help

http://www.tink.ws/blog/files/as3/IntersectionRectangle/

http://www.tink.ws/blog/as-30-hittest/

On Feb 5, 2008 3:37 PM, Martin Tremblay <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
>Trying to have two sibling sprite that overlap receive mouse
> event in the section that overlap. Is that possible?
>
> code:
>
> package
> {
>import flash.display.*
>import flash.events.*;
>
>public class MouseEventTwoMC extends MovieClip
>{
>public function MouseEventTwoMC ()
>{
>var sp1:Sprite = createCircle(100, 100);
>var sp2:Sprite = createCircle(150, 100);
>
>addChild(sp1);
>addChild(sp2);
>}
>
>
>public function createCircle (_nX:Number,
> _nY:Number):Sprite
>{
>var spriteCircle:Sprite = new Sprite();
>spriteCircle.addEventListener
> (MouseEvent.ROLL_OVER, onROver);
>spriteCircle.addEventListener
> (MouseEvent.ROLL_OUT, onROut);
>spriteCircle.x = _nX;
>spriteCircle.y = _nY;
>
>spriteCircle.graphics.lineStyle(2, 0x22, 1);
>spriteCircle.graphics.beginFill(0x3CC4C4, 1);
>spriteCircle.graphics.drawCircle(0,0, 75);
>spriteCircle.graphics.endFill();
>
>spriteCircle.alpha = 0.3;
>
>return spriteCircle;
>}
>
>
>public function onROver (_event:MouseEvent):void
>{
>
>_event.target.alpha = 0.1;
>}
>
>public function onROut (_event:MouseEvent):void
>{
>_event.target.alpha = 0.3;
>
>}
>
>}
> }
>
> Martin T.
> LVL
>
>
> ___
> 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] Re: Odd Blend Mode Problem

2008-02-05 Thread Mark Hawley
Forcing the width and height of the clip to remain an integer during the
tweens fixed the problem.

On Feb 5, 2008 11:57 AM, Mark Hawley <[EMAIL PROTECTED]> wrote:

> I've got an API-drawn rectangle with a hairline stroke, with a blend mode
> of 3. (Multiply)
>
> When the rectangle clip is tweened over a bitmap, occasionally there are
> 'flickers' of a lighter color right at the edges, where the stroke would be.
> I've tried no stroke, a 1px stroke...everything I could think of to remove
> this flicker. Anyone else experience this or have an idea why it's
> happening?
>
> Exported at Flash 8 in CS3.
>
> -John Mark Hawley
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Simple compression algo?

2008-02-05 Thread Juan Pablo Califano
>>>I don't think it's assigning the string that's slow. It's calling
sendAndLoad that is slow, because I think when you make the call the data is
urlencoded or something

Yes, you're probably right. I thought maybe the string was encoded as soon
as it assigned, but it makes more sense that the encoding is done when the
data is actually sent.

If you're code already works, great, go with it. I was just suggesting
another approach, but I understand what you mean. You've invested
a considerable time on it and already works pretty good for your actual
needs, so it makes no sense to try another method that could be worse
performance-wise.

I've taken a glimpse at your code, by the way. I like that it's simple and
neat, but I was thinking that maybe you could avoid the first loop, by just
adding an else to the main if in the second loop. Not sure if it'll make a
noticeable difference in performance, since assigning an empty string to an
array element is fast, but you'll be saving almost 100.000 iterations (on a
320 x 300 image).

Something like this:

  comp[0] = orig[0];
  var lastEqualIndex = 0;
  for(var i = 1; i < l; i++){
if(orig[i] != comp[lastEqualIndex]){
  //new color
  comp[i] = orig[i];
  lastEqualIndex = i;
} else {
  comp[i] = "";
}
  }
  return comp;
}

All in all, it's a good and simple solution!

Cheers
Juan Pablo Califano

2008/2/5, Dave Mennenoh <[EMAIL PROTECTED]>:
>
> Hi Juan - I don't think it's assigning the string that's slow. It's
> calling
> sendAndLoad that is slow, because I think when you make the call the data
> is
> urlencoded or something. I've already found that, and am not calling it. I
> was simply outputting the before and after string lengths to see how
> Base64
> and LZW worked. Could be the class I was using, but either way it was way
> too slow to be useful to me. My simple array compressor is nearly instant
> and on some images it's getting me an 80%+ reduction in the array size,
> which is more than enough for my needs. On average it's only around a 20%
> or
> so reduction, but that's still good enough as my images are not very big.
> I think you're idea is great, and for AS3 a definite, but in AS2 I fear
> it's
> just going to be too slow. Plus, I've already spent far too long on this
> little aside and should be moving on, though I do enjoy these kinds of
> things. If you want to see some of my test results, I posted a little
> article on my blog: www.dmennenoh.blogspot.com
>
> Thanks much!
>
>
> Dave -
> Head Developer
> http://www.blurredistinction.com
> Adobe Community Expert
> http://www.adobe.com/communities/experts/
>
> ___
> 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 receiving mouse event on overlap sibling sprite

2008-02-05 Thread Martin Tremblay

Hi,

Trying to have two sibling sprite that overlap receive mouse
event in the section that overlap. Is that possible?

code:

package
{
import flash.display.*
import flash.events.*;

public class MouseEventTwoMC extends MovieClip
{
public function MouseEventTwoMC ()
{
var sp1:Sprite = createCircle(100, 100);
var sp2:Sprite = createCircle(150, 100);

addChild(sp1);
addChild(sp2);  
}


public function createCircle (_nX:Number,
_nY:Number):Sprite
{
var spriteCircle:Sprite = new Sprite();
spriteCircle.addEventListener
(MouseEvent.ROLL_OVER, onROver);
spriteCircle.addEventListener
(MouseEvent.ROLL_OUT, onROut);
spriteCircle.x = _nX;
spriteCircle.y = _nY;

spriteCircle.graphics.lineStyle(2, 0x22, 1);
spriteCircle.graphics.beginFill(0x3CC4C4, 1);
spriteCircle.graphics.drawCircle(0,0, 75);
spriteCircle.graphics.endFill();

spriteCircle.alpha = 0.3;

return spriteCircle;
}


public function onROver (_event:MouseEvent):void
{

_event.target.alpha = 0.1;
}

public function onROut (_event:MouseEvent):void
{
_event.target.alpha = 0.3;

}

}
}

Martin T.
LVL


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


[Flashcoders] Fullscreen keyboard input

2008-02-05 Thread JulianG

Hi!

I did this pong game 
(http://www.pixeltoys.net/2008/01/29/actionscript-3-pong.html) just to 
try AS3.

The game can be controlled using the keyboard or the mouse.

then I tried the full-screen feature just to learn that:
"Users cannot enter text in text input fields while in full-screen mode. 
All keyboard input and key-related ActionScript is disabled while in 
full-screen mode, with the exception of the keyboard shortcuts that take 
the viewer out of full-screen mode." (source 
)


I can still have users play using the mouse, but is there a known 
workaround for this limitation?


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


RE: [Flashcoders] DataGrid and Button

2008-02-05 Thread Merrill, Jason
http://www.flash-db.com/Tutorials/cellrenderer/

http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp
.htm?context=LiveDocs_Parts&file=3131.html


Jason Merrill
Bank of America  
GT&O L&LD Solutions Design & Development 
eTools & Multimedia 

Bank of America Flash Platform Developer Community



 

>>-Original Message-
>>From: [EMAIL PROTECTED] 
>>[mailto:[EMAIL PROTECTED] On Behalf 
>>Of Lehr, Theodore M (N-SGIS)
>>Sent: Tuesday, February 05, 2008 8:22 AM
>>To: flashcoders@chattyfig.figleaf.com
>>Subject: [Flashcoders] DataGrid and Button
>>
>>Anyone know of a good tutorial on how to incorporate a button 
>>into a datagrid?
>>
>> 
>>
>>Ted
>>
>>___
>>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] urgent angle problem

2008-02-05 Thread Keith Reinfeld

frame = Math.ceil(((angle <  0)? -1*(angle): -1*(angle - 360))/40); 


Regards, 

-Keith 
http://keithreinfeld.home.comcast.net
 



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


Re: [Flashcoders] DataGrid: Extra Row

2008-02-05 Thread Andy Herrman
You say your loop is going the correct amount of times, but have you
checked the array?  Try looping over the array and tracing all the
elements (along with the length of the array).  Does what you get
match what you expect?

  -Andy

On Feb 5, 2008 11:45 AM, Lehr, Theodore M (N-SGIS)
<[EMAIL PROTECTED]> wrote:
> I am populating a datagrid via:
>
>
>
>   data_array = new Array();
>
>   for (j=0; j
> var lessonTitle:String =
> this.firstChild.childNodes[j].childNodes[0].firstChild.nodeValue;
>
> var desc:String =
> this.firstChild.childNodes[j].childNodes[1].firstChild.nodeValue;
>
> data_array.push({AvailableLessons:lessonTitle,
> Description:desc});
>
>   }
>
>   dg.dataProvider = data_array;
>
>
>
> The loop is looping the correct amount of times but my grid is ending up
> with an extra empty row. Any ideas why?
>
>
>
> Ted
>
> ___
> 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] urgent angle problem

2008-02-05 Thread Fumio Nonaka

angle = (angle%360+360)%360;

Then:
810 -> 90
-810 -> 270
_
Bob Leisle wrote:

if (angle < 0) {
  angle += 360;
}

--
Fumio Nonaka
mailto:[EMAIL PROTECTED]
http://www.FumioNonaka.com/
My books
Flash community
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Question about Arrays

2008-02-05 Thread Mark Lapasa

Wow, thx Erik. Great answer! I buy into that. -mL

EECOLOR wrote:

I believe it's type * so you should cast it.



This has nothing to do with that, hehe. There is a tiny difference beween
ClassToCastTo(value) and (value as ClassToCastTo). In the first case a
compiler error will be thrown. In the second case the cast will be tried. If
it fails the resulting value will be a null value.

  

why is -it- working



The pop method is typed as Object. Object is a dynamic class which means you
can add properties at
runtime. This in turn means that the compiler can not complain about
you calling a property that might not exist as you might be adding it
'dynamically' before you call it,


Greetz Erik


On 1/12/08, Mark Winterhalder <[EMAIL PROTECTED]> wrote:
  

On Jan 11, 2008 11:34 PM, Mark Lapasa <[EMAIL PROTECTED]> wrote:


I too would expect that it would need to be casted.
  

Yes, one would think so.

I can't answer your question, either, but can't help but note that in
haXe you would declare your array as Array. The compiler
wouldn't let you put anything else into it, and likewise, everything
you'd pull out would be of type MyClass. haXe has a great type system
(including implied types and type templates), so if you're the kind of
coder that wonders about issues like that, I recommend you have a llok
at .

Mark
___
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
  




Notice of confidentiality:
The information contained in this e-mail is intended only for the use of the 
individual or entity named above and may be confidential. Should the reader of 
this message not be the intended recipient, you are hereby notified that any 
unauthorized dissemination, distribution or reproduction of this message is 
strictly prohibited. If you have received this message in error, please advise 
the sender immediately and destroy the e-mail.


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


RE: [Flashcoders] urgent angle problem

2008-02-05 Thread Dave Watts
> Oh, sorry Glen & List. This was the mail sent out from me. Is 
> the List dodgy again???

No, it's something on your end.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
http://training.figleaf.com/

WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
http://www.webmaniacsconference.com/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] urgent angle problem

2008-02-05 Thread Bob Leisle

er...make that

if (angle < 0) {
  angle += 360;
}


Bob Leisle wrote:

Hi Allandt,

How about something like this?
if (angle < 0) {
   angle += 180;
}

hth,
Bob


Allandt Bik-Elliott (Receptacle) wrote:

hi guys

i have a problem that i need to sort out - i have a script that 
checks to see where the mouse pointer is in relation to a point of 
origin and then selects which frame from a group of 9 to show


the problem i'm having is that if the angle is above 180 degrees, it 
swaps to negative numbers back down to 0 (go to 
http://www.19.5degs.com/element/215.php to see an example - in 
particular watch the text frame as you move) and i need to figure out 
how to make it a full 360


i've tried

if (angle<<0) {
angle = (-1*angle)+180;
}

but that's not right

here is my code

//image frame selector
function changeFrame(clip:MovieClip, angle:Number):Void {

// frame is receiving a wrong number above 180 degrees here
// there are 9 frames so i want each frame to have 40 degrees 
(hence angle/40)

var frame:Number = Math.round(angle/40);

// visibleClip is a variable set on all clips (set in the 
mousemove below) to tell my script which clip is visible to make it 
invisible without having to loop through the other clips when there's 
a change

clip[clip.visibleClip]._visible = false;
clip["p"+frame]._visible = true;
clip.visibleClip = ["p"+frame];

}

//mouse follower
var mouseListener:Object = new Object();
mouseListener.lookAt = function(clip:MovieClip, originX:Number, 
originY:Number, watchX:Number, watchY:Number):Void {


var adjside:Number = watchX - originX;
var oppside:Number = -1*(watchY - originY);
var angle:Number = Math.atan2(oppside, adjside); // in radians
var angle:Number = Math.round(angle/Math.PI*180); // convert to 
degrees

var angle:Number = -1*(angle); // invert
changeFrame(clip, angle);

}
mouseListener.onMouseMove = function () {

var watchX:Number = _xmouse;
var watchY:Number = _ymouse;
// there are 8 images that are trying to do this
for (var i:Number=1; i<9; i++) {
var thisPerson:MovieClip = content_mc["person"+i];
this.lookAt(thisPerson, thisPerson._x, thisPerson._y, 
_root._xmouse, _root._ymouse);

}
};
Mouse.addListener(mouseListener);


hope you can help
alz


Allandt Bik-Elliott
Receptacle
t  01920 413 947  |  m  07970 718 545
e [EMAIL PROTECTED]

This e-mail is confidential and may be privileged. It is for the use 
of the named recipient(s) only. If you have received it in error, 
please notify us immediately. Please do not copy or disclose its 
contents to anyone, and delete it from your computer systems. Please 
note that information sent by e-mail can be corrupted. This e-mail 
has been prepared using information believed by the author to be 
reliable and accurate, but the Company makes no warranty as to its 
contents. Any opinions expressed are those of the author and do not 
necessarily reflect the opinions of the Company.



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



--No virus found in this incoming message.
Checked by AVG Free Edition.Version: 7.5.516 / Virus Database: 
269.19.20/1260 - Release Date: 2/5/2008 9:44 AM







--
Thanks,
~
Bob Leisle 
Headsprout Software & Engineering

http://www.headsprout.com
Where kids learn to read! 


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


Re: [Flashcoders] urgent angle problem

2008-02-05 Thread Kenneth Kawamoto
Oh, sorry Glen & List. This was the mail sent out from me. Is the List 
dodgy again???


--

Try:

if (angle<0) {
   angle += 360;
}


Kenneth Kawamoto
http://www.materiaprima.co.uk/

Glen Pike wrote:

Dude, how come you keep sending empty emails to the list??

Kenneth Kawamoto wrote:

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


  


--

Glen Pike
01736 759321
www.glenpike.co.uk 


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


Re: [Flashcoders] urgent angle problem

2008-02-05 Thread Glen Pike

Dude, how come you keep sending empty emails to the list??

Kenneth Kawamoto wrote:

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


  


--

Glen Pike
01736 759321
www.glenpike.co.uk 

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


Re: [Flashcoders] multiple TextFormats in one TextField

2008-02-05 Thread Kenneth Kawamoto

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


Re: [Flashcoders] urgent angle problem

2008-02-05 Thread Bob Leisle

Hi Allandt,

How about something like this?
if (angle < 0) {
   angle += 180;
}

hth,
Bob


Allandt Bik-Elliott (Receptacle) wrote:

hi guys

i have a problem that i need to sort out - i have a script that checks 
to see where the mouse pointer is in relation to a point of origin and 
then selects which frame from a group of 9 to show


the problem i'm having is that if the angle is above 180 degrees, it 
swaps to negative numbers back down to 0 (go to 
http://www.19.5degs.com/element/215.php to see an example - in 
particular watch the text frame as you move) and i need to figure out 
how to make it a full 360


i've tried

if (angle<<0) {
angle = (-1*angle)+180;
}

but that's not right

here is my code

//image frame selector
function changeFrame(clip:MovieClip, angle:Number):Void {

// frame is receiving a wrong number above 180 degrees here
// there are 9 frames so i want each frame to have 40 degrees 
(hence angle/40)

var frame:Number = Math.round(angle/40);

// visibleClip is a variable set on all clips (set in the 
mousemove below) to tell my script which clip is visible to make it 
invisible without having to loop through the other clips when there's 
a change

clip[clip.visibleClip]._visible = false;
clip["p"+frame]._visible = true;
clip.visibleClip = ["p"+frame];

}

//mouse follower
var mouseListener:Object = new Object();
mouseListener.lookAt = function(clip:MovieClip, originX:Number, 
originY:Number, watchX:Number, watchY:Number):Void {


var adjside:Number = watchX - originX;
var oppside:Number = -1*(watchY - originY);
var angle:Number = Math.atan2(oppside, adjside); // in radians
var angle:Number = Math.round(angle/Math.PI*180); // convert to 
degrees

var angle:Number = -1*(angle); // invert
changeFrame(clip, angle);

}
mouseListener.onMouseMove = function () {

var watchX:Number = _xmouse;
var watchY:Number = _ymouse;

// there are 8 images that are trying to do this

for (var i:Number=1; i<9; i++) {
var thisPerson:MovieClip = content_mc["person"+i];
this.lookAt(thisPerson, thisPerson._x, thisPerson._y, 
_root._xmouse, _root._ymouse);

}
};
Mouse.addListener(mouseListener);


hope you can help
alz


Allandt Bik-Elliott
Receptacle
t  01920 413 947  |  m  07970 718 545
e [EMAIL PROTECTED]

This e-mail is confidential and may be privileged. It is for the use 
of the named recipient(s) only. If you have received it in error, 
please notify us immediately. Please do not copy or disclose its 
contents to anyone, and delete it from your computer systems. Please 
note that information sent by e-mail can be corrupted. This e-mail has 
been prepared using information believed by the author to be reliable 
and accurate, but the Company makes no warranty as to its contents. 
Any opinions expressed are those of the author and do not necessarily 
reflect the opinions of the Company.



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



--No virus found in this incoming message.
Checked by AVG Free Edition.Version: 7.5.516 / Virus Database: 
269.19.20/1260 - Release Date: 2/5/2008 9:44 AM





--
Thanks,
~
Bob Leisle 
Headsprout Software & Engineering

http://www.headsprout.com
Where kids learn to read! 


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


Re: [Flashcoders] fullscreen

2008-02-05 Thread Jason Van Cleave
http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html

On Feb 5, 2008 12:09 PM, Pedro Kostelec <[EMAIL PROTECTED]> wrote:

> Hi list
>
> Does enyone know how to make this fullscreen function like this one here:
> http://bb.amctv.com/main.html  ?
> (Press the fullscreen button on the bottom right)Looks the same think like
> in youtube.
>
>
> --
> Pedro D.K.
> ___
> 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] fullscreen

2008-02-05 Thread Glen Pike

http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html

Pedro Kostelec wrote:

Hi list

Does enyone know how to make this fullscreen function like this one here:
http://bb.amctv.com/main.html  ?
(Press the fullscreen button on the bottom right)Looks the same think like
in youtube.


  


--

Glen Pike
01736 759321
www.glenpike.co.uk 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] urgent angle problem

2008-02-05 Thread Glen Pike

Hi,

You make both values absolute and calculate your angle, then 
subtract 90 from the degrees.


   You have to detect whether adj  is negative and if so, add 180 to 
your angle or something similar if I remember...


var adjside:Number = watchX - originX;
   var oppside:Number = -1*(watchY - originY);
   var angle:Number = Math.atan2(Math.abs(oppside), Math.abs(adjside)); 
// in radians
   var angle:Number = Math.round(angle/Math.PI*180) - 90; // convert to 
degrees
  
   if(0 > adside) {

  angle += 180;
   }

   var angle:Number = -1*(angle); // invert

Allandt Bik-Elliott (Receptacle) wrote:

hi guys

i have a problem that i need to sort out - i have a script that checks 
to see where the mouse pointer is in relation to a point of origin and 
then selects which frame from a group of 9 to show


the problem i'm having is that if the angle is above 180 degrees, it 
swaps to negative numbers back down to 0 (go to 
http://www.19.5degs.com/element/215.php to see an example - in 
particular watch the text frame as you move) and i need to figure out 
how to make it a full 360


i've tried

if (angle<<0) {
angle = (-1*angle)+180;
}

but that's not right

here is my code

//image frame selector
function changeFrame(clip:MovieClip, angle:Number):Void {

// frame is receiving a wrong number above 180 degrees here
// there are 9 frames so i want each frame to have 40 degrees 
(hence angle/40)

var frame:Number = Math.round(angle/40);

// visibleClip is a variable set on all clips (set in the 
mousemove below) to tell my script which clip is visible to make it 
invisible without having to loop through the other clips when there's 
a change

clip[clip.visibleClip]._visible = false;
clip["p"+frame]._visible = true;
clip.visibleClip = ["p"+frame];

}

//mouse follower
var mouseListener:Object = new Object();
mouseListener.lookAt = function(clip:MovieClip, originX:Number, 
originY:Number, watchX:Number, watchY:Number):Void {


var adjside:Number = watchX - originX;
var oppside:Number = -1*(watchY - originY);
var angle:Number = Math.atan2(oppside, adjside); // in radians
var angle:Number = Math.round(angle/Math.PI*180); // convert to 
degrees

var angle:Number = -1*(angle); // invert
changeFrame(clip, angle);

}
mouseListener.onMouseMove = function () {

var watchX:Number = _xmouse;
var watchY:Number = _ymouse;

// there are 8 images that are trying to do this

for (var i:Number=1; i<9; i++) {
var thisPerson:MovieClip = content_mc["person"+i];
this.lookAt(thisPerson, thisPerson._x, thisPerson._y, 
_root._xmouse, _root._ymouse);

}
};
Mouse.addListener(mouseListener);


hope you can help
alz


Allandt Bik-Elliott
Receptacle
t  01920 413 947  |  m  07970 718 545
e [EMAIL PROTECTED]

This e-mail is confidential and may be privileged. It is for the use 
of the named recipient(s) only. If you have received it in error, 
please notify us immediately. Please do not copy or disclose its 
contents to anyone, and delete it from your computer systems. Please 
note that information sent by e-mail can be corrupted. This e-mail has 
been prepared using information believed by the author to be reliable 
and accurate, but the Company makes no warranty as to its contents. 
Any opinions expressed are those of the author and do not necessarily 
reflect the opinions of the Company.



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




--

Glen Pike
01736 759321
www.glenpike.co.uk 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] urgent angle problem

2008-02-05 Thread Kenneth Kawamoto

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


RE: [Flashcoders] urgent angle problem

2008-02-05 Thread Steve Abaffy
Just add 360 that should do it. But I wander if in your code you have if
(angle << 0) shouldn't that be if (angle < 0)???

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Allandt
Bik-Elliott (Receptacle)
Sent: Tuesday, February 05, 2008 11:11 AM
To: flashcoders
Subject: [Flashcoders] urgent angle problem

hi guys

i have a problem that i need to sort out - i have a script that  
checks to see where the mouse pointer is in relation to a point of  
origin and then selects which frame from a group of 9 to show

the problem i'm having is that if the angle is above 180 degrees, it  
swaps to negative numbers back down to 0 (go to http://www. 
19.5degs.com/element/215.php to see an example - in particular watch  
the text frame as you move) and i need to figure out how to make it a  
full 360

i've tried

if (angle<<0) {
angle = (-1*angle)+180;
}

but that's not right

here is my code

//image frame selector
function changeFrame(clip:MovieClip, angle:Number):Void {

// frame is receiving a wrong number above 180 degrees here
// there are 9 frames so i want each frame to have 40 degrees (hence

angle/40)
var frame:Number = Math.round(angle/40);

// visibleClip is a variable set on all clips (set in the mousemove

below) to tell my script which clip is visible to make it invisible  
without having to loop through the other clips when there's a change
clip[clip.visibleClip]._visible = false;
clip["p"+frame]._visible = true;
clip.visibleClip = ["p"+frame];

}

//mouse follower
var mouseListener:Object = new Object();
mouseListener.lookAt = function(clip:MovieClip, originX:Number,  
originY:Number, watchX:Number, watchY:Number):Void {

var adjside:Number = watchX - originX;
var oppside:Number = -1*(watchY - originY);
var angle:Number = Math.atan2(oppside, adjside); // in radians
var angle:Number = Math.round(angle/Math.PI*180); // convert to
degrees
var angle:Number = -1*(angle); // invert
changeFrame(clip, angle);

}
mouseListener.onMouseMove = function () {

var watchX:Number = _xmouse;
var watchY:Number = _ymouse;

// there are 8 images that are trying to do this
for (var i:Number=1; i<9; i++) {
var thisPerson:MovieClip = content_mc["person"+i];
this.lookAt(thisPerson, thisPerson._x, thisPerson._y,  
_root._xmouse, _root._ymouse);
}
};
Mouse.addListener(mouseListener);


hope you can help
alz


Allandt Bik-Elliott
Receptacle
t  01920 413 947  |  m  07970 718 545
e [EMAIL PROTECTED]

This e-mail is confidential and may be privileged. It is for the use  
of the named recipient(s) only. If you have received it in error,  
please notify us immediately. Please do not copy or disclose its  
contents to anyone, and delete it from your computer systems. Please  
note that information sent by e-mail can be corrupted. This e-mail  
has been prepared using information believed by the author to be  
reliable and accurate, but the Company makes no warranty as to its  
contents. Any opinions expressed are those of the author and do not  
necessarily reflect the opinions of the Company.


___
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

2008-02-05 Thread Pedro Kostelec
Hi list

Does enyone know how to make this fullscreen function like this one here:
http://bb.amctv.com/main.html  ?
(Press the fullscreen button on the bottom right)Looks the same think like
in youtube.


-- 
Pedro D.K.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] urgent angle problem

2008-02-05 Thread Allandt Bik-Elliott (Receptacle)

hi guys

i have a problem that i need to sort out - i have a script that  
checks to see where the mouse pointer is in relation to a point of  
origin and then selects which frame from a group of 9 to show


the problem i'm having is that if the angle is above 180 degrees, it  
swaps to negative numbers back down to 0 (go to http://www. 
19.5degs.com/element/215.php to see an example - in particular watch  
the text frame as you move) and i need to figure out how to make it a  
full 360


i've tried

if (angle<<0) {
angle = (-1*angle)+180;
}

but that's not right

here is my code

//image frame selector
function changeFrame(clip:MovieClip, angle:Number):Void {

// frame is receiving a wrong number above 180 degrees here
	// there are 9 frames so i want each frame to have 40 degrees (hence  
angle/40)

var frame:Number = Math.round(angle/40);

	// visibleClip is a variable set on all clips (set in the mousemove  
below) to tell my script which clip is visible to make it invisible  
without having to loop through the other clips when there's a change

clip[clip.visibleClip]._visible = false;
clip["p"+frame]._visible = true;
clip.visibleClip = ["p"+frame];

}

//mouse follower
var mouseListener:Object = new Object();
mouseListener.lookAt = function(clip:MovieClip, originX:Number,  
originY:Number, watchX:Number, watchY:Number):Void {


var adjside:Number = watchX - originX;
var oppside:Number = -1*(watchY - originY);
var angle:Number = Math.atan2(oppside, adjside); // in radians
var angle:Number = Math.round(angle/Math.PI*180); // convert to degrees
var angle:Number = -1*(angle); // invert
changeFrame(clip, angle);

}
mouseListener.onMouseMove = function () {

var watchX:Number = _xmouse;
var watchY:Number = _ymouse;

// there are 8 images that are trying to do this
for (var i:Number=1; i<9; i++) {
var thisPerson:MovieClip = content_mc["person"+i];
		this.lookAt(thisPerson, thisPerson._x, thisPerson._y,  
_root._xmouse, _root._ymouse);

}
};
Mouse.addListener(mouseListener);


hope you can help
alz


Allandt Bik-Elliott
Receptacle
t  01920 413 947  |  m  07970 718 545
e [EMAIL PROTECTED]

This e-mail is confidential and may be privileged. It is for the use  
of the named recipient(s) only. If you have received it in error,  
please notify us immediately. Please do not copy or disclose its  
contents to anyone, and delete it from your computer systems. Please  
note that information sent by e-mail can be corrupted. This e-mail  
has been prepared using information believed by the author to be  
reliable and accurate, but the Company makes no warranty as to its  
contents. Any opinions expressed are those of the author and do not  
necessarily reflect the opinions of the Company.



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


[Flashcoders] Odd Blend Mode Problem

2008-02-05 Thread Mark Hawley
I've got an API-drawn rectangle with a hairline stroke, with a blend mode of
3. (Multiply)

When the rectangle clip is tweened over a bitmap, occasionally there are
'flickers' of a lighter color right at the edges, where the stroke would be.
I've tried no stroke, a 1px stroke...everything I could think of to remove
this flicker. Anyone else experience this or have an idea why it's
happening?

Exported at Flash 8 in CS3.

-John Mark Hawley
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Insert new symbol

2008-02-05 Thread Sidney de Koning
if you load your image in with a MovieClipLoader (prolly the best way to 
go), you can position the image, only with the onLoadInit handler.
Only then will you know the dimensions of the loaded in image. the you 
can shift it x of image = width of image * 0.5


something like this (AS2 example):

var containerClip:MovieClip = this.attachMovieClip("emptyClipFromLib", 
"emptyClipFromLib" this.getNextHighestDepth());

var mclListener:Object = new Object();
var imageMcl:MovieClipLoader = new MovieClipLoader();
imageMcl.addListener(mclListener);
imageMcl.loadClip("images/image1.jpg", containerClip);

trace("the clip width: " + containerClip._width);

mclListener.onLoadInit = function(targetClip:MovieClip) {
   trace("the clip width: " + targetClip._width);
};

Hope this helps,

Sid

[p e r c e p t i c o n] wrote:

because i load an image into it and animate from the middle of the
image...so if i can't control the registration point it animates from top
left...

On Feb 4, 2008 9:12 AM, Kenneth Kawamoto <[EMAIL PROTECTED]> wrote:

  

Do you mean an empty MovieClip? It's empty - why do you need to worry
about the registration point?

Kenneth Kawamoto
http://www.materiaprima.co.uk/

[p e r c e p t i c o n] wrote:


Hi all,
Can anyone explain why when you insert a new movieclip symbol using the
insert>new symbol from the menu can't choose a registration point?  very
annoying...
that's my rant for the day...
happy monday
p

  

___
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] DataGrid: Extra Row

2008-02-05 Thread Lehr, Theodore M (N-SGIS)
I am populating a datagrid via:

 

  data_array = new Array();

  for (j=0; jhttp://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] DataGrid and Button

2008-02-05 Thread Glen Pike

Look for CellRenderer tutorials.

Lehr, Theodore M (N-SGIS) wrote:

Anyone know of a good tutorial on how to incorporate a button into a
datagrid?

 


Ted

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


  


--

Glen Pike
01736 759321
www.glenpike.co.uk 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] DataGrid and Button

2008-02-05 Thread Lehr, Theodore M (N-SGIS)
Anyone know of a good tutorial on how to incorporate a button into a
datagrid?

 

Ted

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


Re: [Flashcoders] Simple compression algo?

2008-02-05 Thread Dave Mennenoh
Hi Juan - I don't think it's assigning the string that's slow. It's calling 
sendAndLoad that is slow, because I think when you make the call the data is 
urlencoded or something. I've already found that, and am not calling it. I 
was simply outputting the before and after string lengths to see how Base64 
and LZW worked. Could be the class I was using, but either way it was way 
too slow to be useful to me. My simple array compressor is nearly instant 
and on some images it's getting me an 80%+ reduction in the array size, 
which is more than enough for my needs. On average it's only around a 20% or 
so reduction, but that's still good enough as my images are not very big.
I think you're idea is great, and for AS3 a definite, but in AS2 I fear it's 
just going to be too slow. Plus, I've already spent far too long on this 
little aside and should be moving on, though I do enjoy these kinds of 
things. If you want to see some of my test results, I posted a little 
article on my blog: www.dmennenoh.blogspot.com


Thanks much!


Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ 


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