Re: [Flashcoders] Re: Newbie AS3 question

2005-10-30 Thread Cedric Muller
I learned programming in Flash and I use this everyday, almost 
everyline ;)

because scope has always been one of the thoughest thing in Flash :-)

* cedric thanks ryanm


 In my opinion (and in the opinion of many much more competent 
developers than myself), it is always good to be explicit about scope, 
because it removes any ambiguity from the code, drastically reducing 
the possibility of expensive and time consuming breakage during 
maintenance.


   One more thing worth mentioning, and I don't say this to be rude or 
as a slight to anyone on this list, but the opinion that the this 
reference is bad and should be avoided seems to be unilaterally coming 
from people who learned programming in Flash, while the opinion that 
scope should be stated explicitly seems to be coming from people with 
more formal training in software development and experience in 
(non-Flash) real world development. Personally, I have to give more 
weight to the opinions of people with more formal training and more 
varied real-world experience, because there are some things you just 
can't learn in a year or two of using Flash for web development. There 
is a reason that experienced developers like to type those extra 5 
characters, and it is to save time, money, and the embarrasment of 
explaining to your boss that you deleted something without fully 
understanding the implications.


ryanm
___
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] Strict Datatyping Question

2005-10-30 Thread Liam Morley
Jester, that's actually in the documentation, that's not a bug. I don't
remember where I read it, but I found it somewhere when I was looking into
scope. You can search around in here:
http://livedocs.macromedia.com/flash/8/main/1200.html if you're
interested.

As to your original question, the answer depends on whether or not "myVar"
is already defined in clip1. If it is, then as others have said, you can't
declare something twice. You didn't mention in your question as to whether
or not you're trying to declare it in two places. It's my opinion that
declaring a variable in a different scope using strong typing is illegal
because AS enforces you to be consistent with the "spirit of the code". I'll
explain.

The following is an illegal declaration:

// llegal syntax error: Identifier expected
this.clip1.myVar:Number;

This is pretty similar to your statement, except that I cut out the
assignment, as it only clouds the issue. Before ActionScript introduced
strong typing, you could define variables in any scope at any time. While
this offers a greater range of possibilities, it also introduces a lot more
danger, and as such is appropriate for small-time scripting, not larger
software projects. Strong typing is useful because it helps keep you out of
danger- it makes sure that variables can not change type implicitly. It's
usually not appropriate for small scripting projects, as you're usually
dealing with tasks small enough that you never run into type-related issues.

AS2 supports the programmer working on a large project by offering strong
typing, and the scripter/designer who isn't doing much with AS by offering
dynamic variable declaration. AS2 however (at least in this case) does not
really support both at the same time. It makes sense that, if you're using
strong typing, you're working on a project where you don't want to support
shortcuts like dynamic declaration. If you want strong typing, then you
shouldn't be declaring myVar outside the scope of clip1; if you want dynamic
declaration, then why are you wasting time with strong typing?

I hope that made sense.
Liam


On 10/31/05, JesterXL <[EMAIL PROTECTED]> wrote:
>
> Finally, there is a bug in Flash MX 2004 & 8; you can't datatype like
> this:
>
> myVar:Number = 42;
>
> but you can do this:
>
> var myVar:Number = 42;
>
> - Original Message -
> From: "Chris Velevitch" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" 
> Sent: Monday, October 31, 2005 12:30 AM
> Subject: Re: [Flashcoders] Strict Datatyping Question
>
>
> On 10/31/05, Joseph Balderson <[EMAIL PROTECTED]> wrote:
> > Why it is illegal to combine both a path declaration and a datatype
> > declaration
> > in the same expression" i.e.:
> ...
> > // illegal syntax error
> > this.clip1.myVar:Number = 42;
>
> This illegal because myVar has already be declared in the definition
> of the type of clip1.
>
> Also, you have used the phase 'path declaration'. This is an oxymoron.
> Declarations only appear in a class definition, paths are references
> to the objects/types of interest.
>
>
> Chris
> --
> Chris Velevitch
> Manager - Sydney Flash Platform Developers Group
> www.flashdev.org.au 
> ___
> 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] Newbie AS3 question

2005-10-30 Thread Cedric Muller
in the end, using 'this' or leaving it does make a difference, doesn't 
it ?
I cannot decompile to test my sayings, but 'this' adds more bytecode to 
the file ??



I'm the opposite end of the spectrum.  This:

class Box extends UIObject
{
function doStuff()
{
move(x + 10, y + 10);
setSize(width + 100, height + 100);
visible = !visible;
}
}

looks more readable to me than:

class Box extends UIObject
{
function doStuff()
{
this.move(this.x + 10, this.y + 10);
this.setSize(this.width + 100, this.height + 100);
this.visible = !this.visible;
}
}

To each their own.  I can see it justified in extending intrinsic 
classes,
as the first parameter to setInterval, and the first parameter in 
Delegate.


AS3 and Flex both hammer the point that this really has little use 
other

than confirming for those programmers who are not familiar with
ActionScript.  Same goes for the Singleton.method vs.
Singleton.getInstance().method argument; the latter is for those 
programmers

who don't know ActionScript well.

If you do it every day, there is no point.

- Original Message -
From: "Muzak" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 5:37 PM
Subject: Re: [Flashcoders] Newbie AS3 question


Well, to me it's the other way around.
Code that doesn't use proper references looks messy to me.

Whe I'm lazy or in a hurry, I do skip them, but I usually find myself 
adding

them afterwards anyway.

So, I'm with ryanm on this one ;-)

regards,
Muzak

- Original Message -
From: "Martin Wood" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Friday, October 28, 2005 11:03 PM
Subject: Re: [Flashcoders] Newbie AS3 question





ryanm wrote:

What I don't get is why it needs "this.addChild" instead of just
addChild. I've been sick of the keyword "this" for a long time
and have since avoided it in AS2.

Any reason that it needs to be back in for AS3?


   Maybe because it's one of the most useful scope references ever
invented?

   The fundamental concept that you seem to miss is that "addChild" 
is

meaningless by itself, it is a method of an object (in
proper OOP development), and if you just say "addChild", who is 
adding

the child?


the context is the current class. Occasionally 'this' is useful if you
happen to name a method parameter or local variable the
same as a member variable and need to distinguish the two.

But, I dont agree that its bad form to leave it out, nor is it any 
more

difficult to maintain.

in my opinion putting 'this' in everywhere to me just makes things 
harder

to read.

thanks,

Martin



___
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] Strict Datatyping Question

2005-10-30 Thread Chris Velevitch
On 10/31/05, Joseph Balderson <[EMAIL PROTECTED]> wrote:
> So what you're saying is, when I declare a variable using a path reference, 
> I'm
> really creating a dynamic variable. Because the type of a dynamic variable is
> only determined at runtime when the variable is given a value, and type 
> checking
> is done at compile-time, you can't typecast an object as Number when it's
> already been typecast as dynamic at compile-time? Or is it the reverse? Still 
> a
> little confused...

I think the confusion occurs because you seem to be mixing up the
distinction between declaration and reference.

You declare variables like

  var x:Y;

you refer to variables like

  a = z.x;

or

 if (z.x == 42) ...


Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
www.flashdev.org.au
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Strict Datatyping Question

2005-10-30 Thread Joseph Balderson

Robert Tweed wrote:
When you specify a type, you are declaring an object to the compiler. 
Based on that, the compiler will check the code for any expressions that 
conflict with the known declaration. It can only do this at 
compile-time: there is no runtime type-checking.


When you use a path reference, you are doing one of three things:

1. Dereferencing a typed variable, which must be declared somewhere else.
2. Dereferencing an existing dynamic variable.
3. Creating a dynamic variable at runtime.

The reasons why none of these can legally have a type specifier:

1. You can't declare something twice - the compiler already knows the type.
2. By definition, you can't know what type it is, so trying to specify 
one here is a form of unsafe casting.


So what you're saying is, when I declare a variable using a path reference, I'm 
really creating a dynamic variable. Because the type of a dynamic variable is 
only determined at runtime when the variable is given a value, and type checking 
is done at compile-time, you can't typecast an object as Number when it's 
already been typecast as dynamic at compile-time? Or is it the reverse? Still a 
little confused...



3. In this case any declaration to the compiler is meaningless.

- Robert
___
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] Strict Datatyping Question

2005-10-30 Thread JesterXL
Finally, there is a bug in Flash MX 2004 & 8; you can't datatype like this:

myVar:Number = 42;

but you can do this:

var myVar:Number = 42;

- Original Message - 
From: "Chris Velevitch" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Monday, October 31, 2005 12:30 AM
Subject: Re: [Flashcoders] Strict Datatyping Question


On 10/31/05, Joseph Balderson <[EMAIL PROTECTED]> wrote:
> Why it is illegal to combine both a path declaration and a datatype 
> declaration
> in the same expression" i.e.:
...
> // illegal syntax error
> this.clip1.myVar:Number = 42;

This illegal because myVar has already be declared in the definition
of the type of clip1.

Also, you have used the phase 'path declaration'. This is an oxymoron.
Declarations only appear in a class definition, paths are references
to the objects/types of interest.


Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
www.flashdev.org.au
___
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] Mouse notification when leaving a swf...

2005-10-30 Thread David Rorex
On 10/30/05, Liu, Kai M <[EMAIL PROTECTED]> wrote:
> This is a simpler approach, copy and paste it into new FLA and try:
>
> [CODE]
>
> _root.createTextField("txt",10,10,10,200,30);
> onMouseMove = function(){
> if (_xmouse < 0 || _xmouse > Stage.width || _ymouse <0 ||
> _ymouse > Stage.height){
> txt.text = "Your cursor is off now.";
> }else{
> txt.text = "Welcome back, cursor.";
> }
> }
>
> [/CODE]
>
> Cheers :-)

This doesn't work for me. I stop getting onMouseMove events once my
mouse leaves the flash movie.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Strict Datatyping Question

2005-10-30 Thread Robert Tweed

Joseph Balderson wrote:
Why it is illegal to combine both a path declaration and a datatype 
declaration in the same expression" i.e.:

[snip]

// illegal syntax error
this.clip1.myVar:Number = 42;


When you specify a type, you are declaring an object to the compiler. 
Based on that, the compiler will check the code for any expressions that 
conflict with the known declaration. It can only do this at 
compile-time: there is no runtime type-checking.


When you use a path reference, you are doing one of three things:

1. Dereferencing a typed variable, which must be declared somewhere else.
2. Dereferencing an existing dynamic variable.
3. Creating a dynamic variable at runtime.

The reasons why none of these can legally have a type specifier:

1. You can't declare something twice - the compiler already knows the type.
2. By definition, you can't know what type it is, so trying to specify 
one here is a form of unsafe casting.

3. In this case any declaration to the compiler is meaningless.

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


Re: [Flashcoders] Strict Datatyping Question

2005-10-30 Thread Chris Velevitch
On 10/31/05, Joseph Balderson <[EMAIL PROTECTED]> wrote:
> Why it is illegal to combine both a path declaration and a datatype 
> declaration
> in the same expression" i.e.:
...
> // illegal syntax error
> this.clip1.myVar:Number = 42;

This illegal because myVar has already be declared in the definition
of the type of clip1.

Also, you have used the phase 'path declaration'. This is an oxymoron.
Declarations only appear in a class definition, paths are references
to the objects/types of interest.


Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
www.flashdev.org.au
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Mouse notification when leaving a swf...

2005-10-30 Thread Liu, Kai M
This is a simpler approach, copy and paste it into new FLA and try:

[CODE]

_root.createTextField("txt",10,10,10,200,30);
onMouseMove = function(){
if (_xmouse < 0 || _xmouse > Stage.width || _ymouse <0 ||
_ymouse > Stage.height){
txt.text = "Your cursor is off now.";
}else{
txt.text = "Welcome back, cursor.";
}
}

[/CODE]

Cheers :-)

[...]   Sam Liu
Flash Developer - Languages Online
Office of Learning and Teaching
Department of Education and Training
 

T:  (03) 9637 2102F:  (03) 9637 2060

 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Richard
Kilmer
Sent: Monday, 31 October 2005 1:21 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Mouse notification when leaving a swf...


In ActionStep Scott Hyndman has built a set of custom cursors.  This  
is VERY
cool when you are over the swf but is there a way we can hide the cursor
when the "real" cursor leaves the swf?  Is there any  
notification of mouse exit?  This must not rely on javascript, but be  
intrinsic to Flash itself.

Thanks,

-rich

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


Important - 
This email and any attachments may be confidential. If received in error, 
please contact us and delete all copies. Before opening or using attachments 
check them for viruses and defects. Regardless of any loss, damage or 
consequence, whether caused by the negligence of the sender or not, resulting 
directly or indirectly from the use of any attached files our liability is 
limited to resupplying any affected attachments. Any representations or 
opinions expressed are those of the individual sender, and not necessarily 
those of the Department of Education & Training.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Strict Datatyping Question

2005-10-30 Thread Liu, Kai M
Would it be that in AS2.0, variables are required to declare locally
(within Classes to avoid namespace conflict)? Imagine if I can create
dynamic variables in your class without your permission, that could be
risky.

?? Make sense?  :-)


[...]   Sam Liu
Flash Developer - Languages Online
Office of Learning and Teaching
Department of Education and Training
 

T:  (03) 9637 2102F:  (03) 9637 2060

 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Joseph
Balderson
Sent: Monday, 31 October 2005 3:24 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Strict Datatyping Question


So I'm teaching Actionscript 2.0 to second year college students, and
I've had 
to explain something very simple about datatyping. I've looked all
through 
Moock's Essential Actionscript 2.0, all the help files, all of the Flash
MX 04 
books I have plus a few in friends' and colleague's libraries, and I've
yet to 
find a satisfactory answer to this seemingly simple question:

Why it is illegal to combine both a path declaration and a datatype
declaration 
in the same expression" i.e.:

// legal - path declaration
this.clip1.myVar = 42;

// legal - datatype declaration
var myVar:Number = 42;

// illegal syntax error
this.clip1.myVar:Number = 42;


Does any one know the answer to this, it is really bugging me...



Joseph Balderson
Interactive Media Design & Development
http://www.joeflash.ca

Faculty Member, Flash Development,
Humber College School of Media Studies http://mediastudies.humber.ca

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


Important - 
This email and any attachments may be confidential. If received in error, 
please contact us and delete all copies. Before opening or using attachments 
check them for viruses and defects. Regardless of any loss, damage or 
consequence, whether caused by the negligence of the sender or not, resulting 
directly or indirectly from the use of any attached files our liability is 
limited to resupplying any affected attachments. Any representations or 
opinions expressed are those of the individual sender, and not necessarily 
those of the Department of Education & Training.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] RE: Multilanguage sites

2005-10-30 Thread John Dowdell

Martin Klasson wrote:

The remaining question is how to know which character-sets different
alphabets does require -this is not easy.
I would like a site which shows ALL characters for every specific
variant:


The specific goal, or universal characters for each language, is 
difficult (Chinese characters?! ;-) and the closest resource might be 
the full Unicode documentation itself.


But omniglot.com is very helpful for info on varied writing scripts... 
doesn't discuss computer encodings, but has the scripts themselves. Is 
this close to what you need...?


jd





--
John Dowdell . Macromedia Developer Support . San Francisco CA USA
Weblog: http://www.macromedia.com/go/blog_jd
Aggregator: http://www.macromedia.com/go/weblogs
Technotes: http://www.macromedia.com/support/
Spam killed my private email -- public record is best, thanks.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] allowDomain() from a loading SWF

2005-10-30 Thread Fumio Nonaka
This might be an expected behavior.  But System.security.allowDomain()
call is needed from a loading SWF to set a mask to the MovieClip to
which an external JPEG is loaded even if the JPEG file is in a domain
containing a cross domain policy file.

http://www.fumiononaka.com/Temp/allowDomain/MovieClip_setMask2.html

When I did [Test Movie], "Security Sandbox Violation" alert was shown in
the [Output] panel.  Therefore this seems to be by design.  It tells
that a masked MovieClip needs some data from the timeline where it is
placed.  But I am not sure.

Any comments or suggestions would be very appreciated.

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


[Flashcoders] Strict Datatyping Question

2005-10-30 Thread Joseph Balderson
So I'm teaching Actionscript 2.0 to second year college students, and I've had 
to explain something very simple about datatyping. I've looked all through 
Moock's Essential Actionscript 2.0, all the help files, all of the Flash MX 04 
books I have plus a few in friends' and colleague's libraries, and I've yet to 
find a satisfactory answer to this seemingly simple question:


Why it is illegal to combine both a path declaration and a datatype declaration 
in the same expression" i.e.:


// legal - path declaration
this.clip1.myVar = 42;

// legal - datatype declaration
var myVar:Number = 42;

// illegal syntax error
this.clip1.myVar:Number = 42;


Does any one know the answer to this, it is really bugging me...



Joseph Balderson
Interactive Media Design & Development
http://www.joeflash.ca

Faculty Member, Flash Development,
Humber College School of Media Studies
http://mediastudies.humber.ca

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


Re: [Flashcoders] controlling sound on mouse moves

2005-10-30 Thread eric dolecki
Can you be more specific?

e.dolecki

On 10/30/05, Weyert de Boer <[EMAIL PROTECTED]> wrote:
> Does anyone know a flash movie/sample who creates sounds based on the
> mouse moves ?
>
> Yours,
> Weyert de Boer
> ___
> 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] Mouse notification when leaving a swf...

2005-10-30 Thread JOR

JOR wrote:

Richard Kilmer wrote:

In ActionStep Scott Hyndman has built a set of custom cursors.  This  
is VERY

cool when you are over the swf but is there a way we can hide the
cursor when the "real" cursor leaves the swf?  Is there any  
notification of mouse exit?  This must not rely on javascript, but be  
intrinsic to Flash itself.


Thanks,

-rich



Create a button the size of the movie and place it on the bottom most 
layer.  Add a mouseRolledIn() and mouseRolledOff() call to every button 
in your movie.


var userLeftID:Number;

function mouseRolledIn():Void {
  // Called from every button and will
  // cancel the userReallyLeft call.
  clearInterval(userLeftID);
}
function mouseRolledOff():Void {
  // Called from every button and will
  // inform the movie that the user left after
  // waiting 200 milliseconds.
  userLeftID = setInterval(userReallyLeft, 200);
}
function userReallyLeft():Void {
  // Whatever you want
}

Basically, it tries to call the userReallyLeft() function on every 
button rollOut.  However, if you rollout of one button and into another 
it cancels the userReallyLeft() call.  userReallyLeft() only ever gets 
called if you roll off your movie.


I've been using this in banner ads where the number of buttons the movie 
contains are minimal so this solution was pretty manageable.


I'd be interestedin knowing if anyone came up with any other solutions 
to this.



JOR





I meant to say... In every button in your movie add a rollOver and 
rollOut to call my mouseRolledIn() and mouseRolledOut() functions like this:


//
// In every button's actionscript
//
on (rollOver) {
  mouseRolledIn();
  // any other code you need here
}
on (rollOut) {
  mouseRolledOff();
  // any other code you need here
}

//
// In Frame 1 of your movie
//
var userLeftID:Number;
function mouseRolledIn():Void {
  // Called from every button and will
  // cancel the userReallyLeft call.
  clearInterval(userLeftID);
}
function mouseRolledOff():Void {
  // Called from every button and will
  // inform the movie that the user left after
  // waiting 200 milliseconds.
  userLeftID = setInterval(userReallyLeft, 200);
}
function userReallyLeft():Void {
  // Whatever you want
}



JOR


___
===  James O'Reilly
===
===  SynergyMedia, Inc.
===  www.synergymedia.net

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


Re: [Flashcoders] Mouse notification when leaving a swf...

2005-10-30 Thread JOR

Richard Kilmer wrote:
In ActionStep Scott Hyndman has built a set of custom cursors.  This  is 
VERY

cool when you are over the swf but is there a way we can hide the
cursor when the "real" cursor leaves the swf?  Is there any  
notification of mouse exit?  This must not rely on javascript, but be  
intrinsic to Flash itself.


Thanks,

-rich



Create a button the size of the movie and place it on the bottom most 
layer.  Add a mouseRolledIn() and mouseRolledOff() call to every button 
in your movie.


var userLeftID:Number;

function mouseRolledIn():Void {
  // Called from every button and will
  // cancel the userReallyLeft call.
  clearInterval(userLeftID);
}
function mouseRolledOff():Void {
  // Called from every button and will
  // inform the movie that the user left after
  // waiting 200 milliseconds.
  userLeftID = setInterval(userReallyLeft, 200);
}
function userReallyLeft():Void {
  // Whatever you want
}

Basically, it tries to call the userReallyLeft() function on every 
button rollOut.  However, if you rollout of one button and into another 
it cancels the userReallyLeft() call.  userReallyLeft() only ever gets 
called if you roll off your movie.


I've been using this in banner ads where the number of buttons the movie 
contains are minimal so this solution was pretty manageable.


I'd be interestedin knowing if anyone came up with any other solutions 
to this.



JOR


___
===  James O'Reilly
===
===  SynergyMedia, Inc.
===  www.synergymedia.net

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


Re: [Flashcoders] Flash and ASP/MSSQL

2005-10-30 Thread JOR

Amanda Kuek wrote:

Hello there,

On 31/10/05, JOR <[EMAIL PROTECTED]> wrote:


Well, since you're using ASP you can take advantage of the Session
object by storing the input from the flash movie in a session until the
user submits the form.


[snip]

This is certainly an idea that hadn't crossed my mind. Is there any
advantage to using the Session object? My only concern is that the
user would constantly be hitting the ASP server whenever they
position/reposition the marker (the marker for which the X,Y
coordinates are stored).

Thanks,

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




I wouldn't hit the server until the location was considered final by the 
user.  Maybe have a "lock hole" or "finalize hole" button in the flash 
movie that triggers the POST.  It wouldn't work to put the POST on 
something like a mouseMove event and I'd be hesitant about using mouseUp 
either for the exact reason you mention.  You don't want the user to 
keep hitting the server over and over for nothing.


The advantage to using the session object would be for two different ASP 
pages... A) The one your Flash movie POSTs to behind the scenes and B) 
the one your HTML form POSTs to when the form is complete.  In order for 
the two ASP pages to share data you need to store the X and Y locations 
somewhere they both can access.  Session seemed like a logical place but 
you have other options like a database or even cookies.  It's up to you 
what makes the most sense for your needs.


JOR



___
===  James O'Reilly
===
===  SynergyMedia, Inc.
===  www.synergymedia.net

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


Re: [Flashcoders] Flash and ASP/MSSQL

2005-10-30 Thread Amanda Kuek
Hello there,

On 31/10/05, JOR <[EMAIL PROTECTED]> wrote:
> Well, since you're using ASP you can take advantage of the Session
> object by storing the input from the flash movie in a session until the
> user submits the form.
[snip]

This is certainly an idea that hadn't crossed my mind. Is there any
advantage to using the Session object? My only concern is that the
user would constantly be hitting the ASP server whenever they
position/reposition the marker (the marker for which the X,Y
coordinates are stored).

Thanks,

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


Re: [Flashcoders] Flash and ASP/MSSQL

2005-10-30 Thread JOR
Well, since you're using ASP you can take advantage of the Session 
object by storing the input from the flash movie in a session until the 
user submits the form.


In your Flash movie you would POST your X,Y variables to an ASP script 
which in turn stores them as Session("X") and Session("Y") or however 
else you would like to name them.  The ASP then returns to Flash a 
response so that Flash knows the data was retrieved ok and can display 
some sort of success response.  I typically just do a 
Response.Write("OK") or "NOTOK" or in more complex scripts an actual 
error code.


Then on the HTML side your form submits it's data to your form handling 
ASP script as normal and the ASP uses the Session("X") and Session("Y") 
as normal.  If the session vars are empty you could return the user back 
to the form with a form incomplete message.  Or if everything is ok, 
processing the form, empty the session vars.


JOR


___
===  James O'Reilly
===
===  SynergyMedia, Inc.
===  www.synergymedia.net




Amanda Kuek wrote:

Hello everyone,

This is a question about Flash in an ASP form which communicates with an
MSSQL db. I'm not really sure how to phrase the question, so I'm afraid that
I'll just have to explain the story.

Imagine an ASP page about faulty garments. Let's just say that if you had a
hole in your T-shirt, you could visit this page to report it. The page would
have normal HTML fields for name and email, and it would also have a SWF
with a picture of a T-shirt. The disgruntled hole-y user clicks on the
T-shirt to leave an X representing where the hole is. The form information
(including that of the hole location, in the SWF) is then submitted using a
normal HTML submit button and stored in the MSSQL db.

I spose my question is, is this scenario possible? Is it only possible to
store user-submitted information (in this case, the X,Y coordinates of the
hole) by clicking on a "Send" button WITHIN flash, or is there another way?
I'd like to avoid making a user explicitly submit the SWF information AS
WELL AS the form information.

Any ideas and comments much appreciated,

Thanks muchly,

Amanda.
___
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] Flash and ASP/MSSQL

2005-10-30 Thread Amanda Kuek
On 31/10/05, Mick Gow <[EMAIL PROTECTED]> wrote:
> Have you thought about not using flash? You could create an imagemap (even
> though they're old hat) with about 15 pre-defined regions over an image (I'm
> guess that's as accurate as you need it). Clicking a region could run a
> javascript function that tells the form what region it is an submits it.
>

I have suggested imagemaps actually, seeing as I'll essentially be
creating an imagemap in Flash. Unfortunately, in this project, 'tis
not for me to question why...Thanks for the suggestion though!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash and ASP/MSSQL

2005-10-30 Thread Amanda Kuek
Thanks very much everyone. Not only has it been explained very well,
but I am now also armed with that highest of argument-stopping
qualifications: "People on Flashcoders said so!"

Cheers all!

On 31/10/05, Benjamin Herholz | [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
[snip]

> - you have a html form with a flash movie embedded.
>
> - the html form calls a server side script to submit the data of the
> form to a database.
>
> - the html form can only send variables which are in its scope.
>
> - as you have a flash movie embedded in your form you have to make the
> variables of the flash movie available to the html form.
>
> -to do so, you have to send the the variables in the flash movie to the
> html form, or as Michael Bedar said: "You would need to call a
> javascript function from AS when the user clicks the inside swf and set
> the value of a hidden form field".
>
> - you call a javascipt function from a flash movie like:
> getURL("javascript:processFlashData(" + xVal + "," + yVal + ")");
>
> - the js function needs to write the variables into hidden fiels in the
> html form.
>
> one more thing:
> "I've always thought you used loadVariables to call an (in my
> experience) ASP or PHP page that talked to the database."
> thats true, but you dont want to send the variables from the flash movie
> to the db, you want the html form to do that...
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Mouse notification when leaving a swf...

2005-10-30 Thread Richard Kilmer
In ActionStep Scott Hyndman has built a set of custom cursors.  This  
is VERY

cool when you are over the swf but is there a way we can hide the
cursor when the "real" cursor leaves the swf?  Is there any  
notification of mouse exit?  This must not rely on javascript, but be  
intrinsic to Flash itself.


Thanks,

-rich

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


[Flashcoders] embeding running flash content in flashpaper

2005-10-30 Thread chall3ng3r
hi,
 i've not done any big things with flashpaper yet. but in my next project, i
am willing to use flashpaper extensively. but i wanna make sure few points
before i finalize my decision of using flashpaper in my project.
 - can i embed flv in flashpaper?
- is it possible to embed a custom swf in flashpaper as a part of full print
document?
  i've also just sent MM a flashpaper feature request to embed running swf
movies in flashpaper when a html document wich contains swf movie is
printed, rather than embeding it as an image.
 i've also requested to put a compiler directives in flashpaper processor
which process them when flashpaper document is being printed. like if i want
to tell flashpaper driver to embed swf in current document as image or as
swfs. this can be implimented as special text tags which the processor
should parse and act upon. for example, EMBEDFLASH:IMAGE/SWF etc. i believe
this will open up a lot more functinalities to flashpaper. -- what you say?
 // chall3ng3r //
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Interview with Flash Artist Karin Christensen

2005-10-30 Thread Weyert de Boer
Hah! My brother is doing research with stem cells here in The 
Netherlands. You don't want to read his papers/articles -- crazy talk :)

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


[Flashcoders] Interview with Flash Artist Karin Christensen

2005-10-30 Thread Flashgrrl
Ever wanted to try your hand at cloning DNA?  Well
there's a Flash movie to help you try!  Flash Artist
Karin Christensen is featured in an interview with
FlasherDotOrg (www.flasherdot.org). 

Interview:
http://www.flasherdot.org/Articles/KarinChristensen.htm

Cloning DNA:
http://www.blackwellpublishing.com/trun/artwork/Animations/cloningexp/cloningexp.html
 
Excerpt:
"Herpes virus. Goat skeletons. Bacterial Genetics.
These are not the words that spring to mind when
thinking about Flash animation, but maybe they should.
Karin Christensen, who has been providing professional
scientific illustrations since 1978, has been using
Flash animation to help demystify the finer points of
Biology for a number of years."

Enjoy!

-Flashgrrl

Send instant messages to your online friends http://au.messenger.yahoo.com 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] using Array.sortOn with getter/setters

2005-10-30 Thread Nils Millahn

Hi,

I've been storing a few very simple Value Objects in an array and wanted 
to use Array.sortOn to sort them. However the value objects use 
getter/setters for member access - and the sorting simply didn't seem to 
take place.


I've now converted the ValueObjects to use public members instead of 
getter/setters - and everything is working nicely.


I don't see how this should make any difference to the way Flash 
accesses the values in the VO - does anybody have any idea?


Here's an example of the VO with getter/setters that I couldn't get 
Flash to sort:


class SimpleVO
{
   private var __year:Number;
   private var __clip:MovieClip;

   public function SimpleVO(n:Number, mc:MovieClip)
   {
  __year = n;
  __clip = mc;
   }

   // and normal set of getter/setters in here
   public function get year():Number
   {
  return __year;
   }
   // etc.
}

Thanks - Nils.

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


RE: [Flashcoders] setInterval() and the trouble

2005-10-30 Thread Liu, Kai M
Here is my sample code to demonstrate you the concept of setting
interval (reset automatically if user fail to answer quiz in given
time), interrupting interval and refreshing it (when user answer the
quiz within given time, represented by onMouseDown event).

Copy and paste all code into fresh FLA and test run it. If you don't
click on the stage, the movie will refresh to next round in 3 secs
unless you click on the stage to interrupt the timer, once you stop
clicking, timer will go back to it's normal routine.

[CODE]

var timeFrame = 3000;   // interval per question
var count = 0;  // counter

onLoad = function(){
_root.createTextField("txt",10,10,10,50,20);
setTimer();
}

function setTimer(){
clearInterval(intIdle);
intIdle = setInterval(nextRound, timeFrame);
}

// Kill timer permanently
function killTimer(){
clearInterval(intIdle);
}

function nextRound(){
// actions you want to perform when time's up
txt.text = "Round " + (count++);
txt._x += 15;
setTimer(); // reset new timer
}

onMouseDown=function(){
nextRound();
}

[/CODE]


[...]   Sam Liu
Flash Developer - Languages Online
Office of Learning and Teaching
Department of Education and Training
 

T:  (03) 9637 2102F:  (03) 9637 2060

 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Weyert
de Boer
Sent: Monday, 31 October 2005 9:36 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] setInterval() and the trouble


I got some stuff working now ;-=)
Looks like I had some infinite loop indeed. Pff.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Important - 
This email and any attachments may be confidential. If received in error, 
please contact us and delete all copies. Before opening or using attachments 
check them for viruses and defects. Regardless of any loss, damage or 
consequence, whether caused by the negligence of the sender or not, resulting 
directly or indirectly from the use of any attached files our liability is 
limited to resupplying any affected attachments. Any representations or 
opinions expressed are those of the individual sender, and not necessarily 
those of the Department of Education & Training.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] setInterval() and the trouble

2005-10-30 Thread Weyert de Boer

I got some stuff working now ;-=)
Looks like I had some infinite loop indeed. Pff.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] setInterval() and the trouble

2005-10-30 Thread Liu, Kai M
One trick to use setInterval is to clear the interval ID every time you
establish one regardless if the existence of the interval ID. This will
make sure you still controlling the interval. If you establish
setInterval more than one time to the sample Interval ID, the previous
established interval is still running and you hardly clear it.

Following codes only make minor change to yours. Whenever you want to
reset your watch, you only need to call doStopwatch() function at
anytime like what I did to your imaginary buildQuestion() function. But
I am not sure what you try to do with this IF statement " if ( id >=
questions.length ) " as it seems to create infinity looping when id >=
question.length, unless you have simplified your function for this post
to focus on setInterval thingies..

function doStopwatch() {
   // 1second = 1000ms
 clearInterval( _root.stopwatchIntervalId );  // **
_root.stopwatchIntervalId = setInterval( _root.stopwatchComplete, 
3000 );
}

function stopwatchComplete() {
clearInterval( _root.stopwatchIntervalId );
   
// trigger the question completed method
_root.questionComplete( _root.question.id, _root.question.type ); 
}

function questionComplete( questionId, questionType ) {
if ( id >= questions.length ) {
 // out of questions
 _root.stopwatchComplete();
} else {
  // next quesiton
  buildQuestion( questionId + 1 );
}
}

function buildQuestion( new_questionId ){
  doStopWatch(); // **
 // ... Your build question function code
}


If you need IDLE handling sample, I can sen you one



[...]   Sam Liu
Flash Developer - Languages Online
Office of Learning and Teaching
Department of Education and Training
 

T:  (03) 9637 2102F:  (03) 9637 2060

 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Weyert
de Boer
Sent: Saturday, 29 October 2005 9:46 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] setInterval() and the trouble


Hi Liam,

First of all I always have had trouble with those methods, never got it 
right. Always failed, I don't they dont like!

>I imagine you're calling clearInterval with the appropriate interval ID

>upon each quiz question submittal, and then afterwards recalling 
>setInterval for the new question? How does it fail the second time? 
>Does it just never call it again, or does it call the function at a 
>different interval?
>
Well, I happen to have a resource xml file which get loaded prioer of 
each group of questions, once this group is readed a
method in the root timeline gets triggered which will determine what to 
do. This method will also trigger the method buildQuestion() when
required, this method will create a new instance of 
"question"-movieclip. After this part is done the function doStopwatch()

is called:

function doStopwatch() {
   // 1second = 1000ms
_root.stopwatchIntervalId = setInterval( _root.stopwatchComplete, 
3000 );
}

function stopwatchComplete() {
clearInterval( _root.stopwatchIntervalId );
   
// trigger the question completed method
_root.questionComplete( _root.question.id, _root.question.type ); }

function questionComplete( questionId, questionType ) {
if ( id >= questions.length ) {
 // out of questions
 _root.stopwatchComplete();
} else {
  // next quesiton
  buildQuestion( questionId + 1 );
}
}

IF you have a better solution please let me know! I feel so stupid that 
I don't get thing timer stuff working.

Yours,
Weyert de Boer


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


Important - 
This email and any attachments may be confidential. If received in error, 
please contact us and delete all copies. Before opening or using attachments 
check them for viruses and defects. Regardless of any loss, damage or 
consequence, whether caused by the negligence of the sender or not, resulting 
directly or indirectly from the use of any attached files our liability is 
limited to resupplying any affected attachments. Any representations or 
opinions expressed are those of the individual sender, and not necessarily 
those of the Department of Education & Training.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] setInterval() and the trouble

2005-10-30 Thread Peter O'Brien

perhaps it's liable to change

On 30 Oct 2005, at 21:50, Derek Vadneau wrote:

Actually, it's not documented.  I remember reading about it at some  
point,
but the local docs and livedocs do not have setTimeout, and it does  
not

light-up for syntax highlighting.

It works, but why this would not be documented is beyond me.


Derek Vadneau


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve
Rankin
Sent: Sunday, October 30, 2005 4:37 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] setInterval() and the trouble


Not sure, but it's in the new ActionScript 2.0 Language Reference for
Flash
Player 8.


___
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] setInterval() and the trouble

2005-10-30 Thread Derek Vadneau
Actually, it's not documented.  I remember reading about it at some point, 
but the local docs and livedocs do not have setTimeout, and it does not 
light-up for syntax highlighting.

It works, but why this would not be documented is beyond me.


Derek Vadneau


-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Steve 
Rankin
Sent: Sunday, October 30, 2005 4:37 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] setInterval() and the trouble


Not sure, but it's in the new ActionScript 2.0 Language Reference for 
Flash
Player 8.


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


RE: [Flashcoders] setInterval() and the trouble

2005-10-30 Thread Steve Rankin
Not sure, but it's in the new ActionScript 2.0 Language Reference for Flash
Player 8.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tim Beynart
Sent: Sunday, October 30, 2005 2:59 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] setInterval() and the trouble

Why is something so useful undocumented? I have to bend over backwards
to create single-fire timers.
Thanks for the post. 


-Original Message-
Its undocumented, but it works in a fire once kind of situation & like
javascript:

foo = setTimeout( func, ms)
clearTimeout(foo)

but only if you need to stop the interval. Otherwise, just fire it and
forget it.

e.d.
___
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] setInterval() and the trouble

2005-10-30 Thread Tim Beynart
Why is something so useful undocumented? I have to bend over backwards
to create single-fire timers.
Thanks for the post. 


-Original Message-
Its undocumented, but it works in a fire once kind of situation & like
javascript:

foo = setTimeout( func, ms)
clearTimeout(foo)

but only if you need to stop the interval. Otherwise, just fire it and
forget it.

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


Re: [Flashcoders] Macromedia's poor documentation WAS Selecting an item off a List component withactionscript

2005-10-30 Thread John Dowdell
If you ever find an omission, could you make sure the documentation 
group finds it, by amending that page at livedocs.macromedia.com? Thanks!


jd




--
John Dowdell . Macromedia Developer Support . San Francisco CA USA
Weblog: http://www.macromedia.com/go/blog_jd
Aggregator: http://www.macromedia.com/go/weblogs
Technotes: http://www.macromedia.com/support/
Spam killed my private email -- public record is best, thanks.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Why does buttons auto-click when shift/ctrl is pressed?

2005-10-30 Thread David Skoglund
Hi, I'm new to this list, heard about it from DirGames.

I have a problem with button components that annoys me a lot, it seems lika 
buttons auto-activate whenever I move the cursor over them and have eithe 
shift, control or alt pressed..? I really need to use those keys while dragging 
objects around the scene

Is there anyway to disable this behavior, or do you think I should I write my 
own components/button MC:s instead of using the default?

Thanks for any suggestions!

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


[Flashcoders] FLV's dropping frames on import for timeline playback.

2005-10-30 Thread Matt Muller
Hi, I have a 360 of a car in 3d I'm importing for timeline playback, and yes
i have set 1 keyFrame for every frame,
but it seems to drop a few frames making playback a little jerky, Ive tried
with the same FLV output from Flix Pro and Flash Video Encoder,
frame rate matches the Flash doc (25fps) and Ive exported png seqs, there
are no irregular frames. Also done an export from AE as FLV with Sorenson
(will have to wait for AE7 forr ON2) and thats perfect, did sorenson from
Flash Video Encoder and it was dropping frames, so my conclusion is there
are bugs in the encoder, or in the import proceess, anyone else had similar
trouble?
 cheers
 MaTT
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Image based Tetris

2005-10-30 Thread lars
hi all. i'm trying to build a tetris where the blocks are images. that means
a the T or L brick for example do not consist of single squares, but of one
image in that block form. anyone has done that before? i was thinking of
having a "regular" tetris engine where i overlay the blocks with the image,
but it guess it ain't that easy to complete. any suggestions? thanks: lars



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


Re: [Flashcoders] setInterval() and the trouble

2005-10-30 Thread eric dolecki
Its undocumented, but it works in a fire once kind of situation & like
javascript:

foo = setTimeout( func, ms)
clearTimeout(foo)

but only if you need to stop the interval. Otherwise, just fire it and
forget it.

e.d.

On 10/30/05, Kent Humphrey <[EMAIL PROTECTED]> wrote:
> Eric E. Dolecki wrote:
> > use setTimeout now and you dont need to worry about interval ids.
> >
> > e.dolecki
> >
> >
>
> Have you found any documentation about setTimeout - because I haven't :<
> ___
> 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] controlling sound on mouse moves

2005-10-30 Thread Weyert de Boer
Does anyone know a flash movie/sample who creates sounds based on the 
mouse moves ?


Yours,
Weyert de Boer
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] how to build a user forum in Flash

2005-10-30 Thread Richard Carr
http://www.flash-db.com/Forum/


Richard

- Original Message - 
From: "Marc Hoffman" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Saturday, October 29, 2005 9:22 PM
Subject: [Flashcoders] how to build a user forum in Flash


> [sending this again -- can anyone help with this? thanks!]
> 
> I'm sure this has been covered, but can't seem to find it in any 
> search. Where can I find a script (free or by license) to create a 
> Flash-based, online user forum? It should have the ability to accept 
> messages by thread, archive them by thread, and search/display them 
> by message header or thread. This will be a low-traffic environment 
> (probably under a dozen visitors at any given time).
> 
> Thanks,
> Marc
> 
> 
> ___
> 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] Recursive Tween only firing once

2005-10-30 Thread Nick Weekes
Very useful link Helen, exactly what I needed to solve my problem (which was
I hadn't actually added the recursive call to the tween function...I blame
it on code blindness ;-).

Thanks,

Nick 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Helen Triolo
Sent: 30 October 2005 16:02
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Recursive Tween only firing once

Nick,

The subject sounds right, but I don't see a recursive call in your code.
Here's an example of a recursive call to startTween to produce sequential
alpha tweens on a series of objects: 
http://flash-creations.com/notes/sample_tweensequence.php#series

Helen

Nick Weekes wrote:

>Hi all,
> 
>I would like to create a series of textfield objects (using 
>CreateEmptyMovieClip/CreateTextField), and have each textfield tween, 
>and then remove itself.
> 
>This all works fine, I have 50 or so textfields on the stage, but 
>instead of each tween executing individually, the tweens for all 
>textifields occur at the end of the process.
> 
>My code looks like this:
> 
> 
> CODE START
> 
>  // ArrayHolder is an array object which holds the text strings I want 
>to convert into TextField objects
>   for (var i:Number = 0; ivar TempString:String = ArrayHolder[i];
>createText(i, TempString);
>   }
> 
>static function createText(QuoteIndex:Number, QuoteText:String)  {
>  
>  // my_obj[QuoteIndexStr] = dynamically created variable, acts as the 
>holding movieclip
>  // Create Holder movieclip and recursive textfield objects
>  QuoteIndexStr = String(QuoteIndex);
>  my_obj[QuoteIndexStr] =
>_root.createEmptyMovieClip("click_mc",_root.getNextHighestDepth());
>  my_obj[QuoteIndexStr]._visible = true;
>  var NewText:TextField = my_obj[QuoteIndex].createTextField("NewText",
>_root.getNextHighestDepth(), 100, 100, 10, 10);
>
>  // Create and configure TextFormat object  var my_fmt:TextFormat = 
> new TextFormat();  my_fmt.color = 0xFE912C;  my_fmt.font = 
> "HelveticaNeue MediumCond";  my_fmt.size = 18;
>
>  // Finish configuring TextField object ands apply TextFormat  
> NewText.multiline = false;  NewText.embedFonts = true;  NewText.text = 
> QuoteText;  NewText.setTextFormat(my_fmt);  NewText.autoSize = true;
> 
> // Position the TextField object randomly on the stage
>  var MaxX:Number = Stage.width - (my_obj[QuoteIndexStr]._width+50); 
>//make sure max poss random x is less than stage width
>  var MaxY:Number = Stage.height - (my_obj[QuoteIndexStr]._height+50);
>  var randomNumX:Number = Math.round(Math.floor(Math.random() * (MaxX - 
>0 +
>1)) + 0);
>  var randomNumY:Number = Math.round(Math.floor(Math.random() * (MaxY - 
>0 +
>1)) + 0);
>  my_obj[QuoteIndexStr]._x = randomNumX;
>  my_obj[QuoteIndexStr]._y = randomNumY;
> 
>  // Tween the Holder MovieClip object
>  var tween_handler:Object = new Tween(my_obj[QuoteIndexStr], "_alpha", 
>Strong.easeIn, 100, 0, 3, true);
>  tween_handler.onMotionFinished = function()
>  {
>  trace("onMotionFinished triggered");
>  }
> }
> 
> CODE END
> 
>I am clearly not understanding the mechanics of this, could someone 
>explain why the tweens do not occur before the function returns back to 
>the calling loop, but when the loop has completed?
> 
>Cheers,
> 
>Nick
>  
>

___
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] Recursive Tween only firing once

2005-10-30 Thread Helen Triolo

Nick,

The subject sounds right, but I don't see a recursive call in your 
code.  Here's an example of a recursive call to startTween to produce 
sequential alpha tweens on a series of objects: 
http://flash-creations.com/notes/sample_tweensequence.php#series


Helen

Nick Weekes wrote:


Hi all,

I would like to create a series of textfield objects (using
CreateEmptyMovieClip/CreateTextField), and have each textfield tween, and
then remove itself.

This all works fine, I have 50 or so textfields on the stage, but instead of
each tween executing individually, the tweens for all textifields occur at
the end of the process.

My code looks like this:


 CODE START

 // ArrayHolder is an array object which holds the text strings I want to
convert into TextField objects
  for (var i:Number = 0; istatic function createText(QuoteIndex:Number, QuoteText:String) 
{
 
 // my_obj[QuoteIndexStr] = dynamically created variable, acts as the

holding movieclip
 // Create Holder movieclip and recursive textfield objects
 QuoteIndexStr = String(QuoteIndex);
 my_obj[QuoteIndexStr] =
_root.createEmptyMovieClip("click_mc",_root.getNextHighestDepth());
 my_obj[QuoteIndexStr]._visible = true;
 var NewText:TextField = my_obj[QuoteIndex].createTextField("NewText",
_root.getNextHighestDepth(), 100, 100, 10, 10);

 // Create and configure TextFormat object
 var my_fmt:TextFormat = new TextFormat();
 my_fmt.color = 0xFE912C;
 my_fmt.font = "HelveticaNeue MediumCond";
 my_fmt.size = 18;

 // Finish configuring TextField object ands apply TextFormat
 NewText.multiline = false;
 NewText.embedFonts = true;
 NewText.text = QuoteText;
 NewText.setTextFormat(my_fmt);
 NewText.autoSize = true;

// Position the TextField object randomly on the stage
 var MaxX:Number = Stage.width - (my_obj[QuoteIndexStr]._width+50); //make
sure max poss random x is less than stage width 
 var MaxY:Number = Stage.height - (my_obj[QuoteIndexStr]._height+50);

 var randomNumX:Number = Math.round(Math.floor(Math.random() * (MaxX - 0 +
1)) + 0);
 var randomNumY:Number = Math.round(Math.floor(Math.random() * (MaxY - 0 +
1)) + 0);
 my_obj[QuoteIndexStr]._x = randomNumX;
 my_obj[QuoteIndexStr]._y = randomNumY;

 // Tween the Holder MovieClip object
 var tween_handler:Object = new Tween(my_obj[QuoteIndexStr], "_alpha",
Strong.easeIn, 100, 0, 3, true);
 tween_handler.onMotionFinished = function() 
 {

 trace("onMotionFinished triggered");
 }
}

 CODE END

I am clearly not understanding the mechanics of this, could someone explain
why the tweens do not occur before the function returns back to the calling
loop, but when the loop has completed?

Cheers,

Nick
 



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


Re: [Flashcoders] setInterval() and the trouble

2005-10-30 Thread Kent Humphrey

Eric E. Dolecki wrote:

use setTimeout now and you dont need to worry about interval ids.

e.dolecki




Have you found any documentation about setTimeout - because I haven't :<
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] how to build a user forum in Flash

2005-10-30 Thread Danger
http://dynamicflash.com/boardmx/

On 10/30/05, Marc Hoffman <[EMAIL PROTECTED]> wrote:
> [sending this again -- can anyone help with this? thanks!]
>
> I'm sure this has been covered, but can't seem to find it in any
> search. Where can I find a script (free or by license) to create a
> Flash-based, online user forum? It should have the ability to accept
> messages by thread, archive them by thread, and search/display them
> by message header or thread. This will be a low-traffic environment
> (probably under a dozen visitors at any given time).
>
> Thanks,
> Marc
>
>
> ___
> 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
>


--
Danger's Flash Blog
http://www.dengjie.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] how to build a user forum in Flash

2005-10-30 Thread JesterXL
Long time ago there was a forum being built in Flash; can't find it now on 
Google.

- Original Message - 
From: "Marc Hoffman" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Saturday, October 29, 2005 11:22 PM
Subject: [Flashcoders] how to build a user forum in Flash


[sending this again -- can anyone help with this? thanks!]

I'm sure this has been covered, but can't seem to find it in any
search. Where can I find a script (free or by license) to create a
Flash-based, online user forum? It should have the ability to accept
messages by thread, archive them by thread, and search/display them
by message header or thread. This will be a low-traffic environment
(probably under a dozen visitors at any given time).

Thanks,
Marc


___
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] Flash and ASP/MSSQL

2005-10-30 Thread Benjamin Herholz | [EMAIL PROTECTED]
"Sure Flash can talk straight to a database! All you need to do is set 
the connection string or something!"


-> shure it can not, it needs a server side language of your choice to 
do so.


to clear things up.

- you have a html form with a flash movie embedded.

- the html form calls a server side script to submit the data of the 
form to a database.


- the html form can only send variables which are in its scope.

- as you have a flash movie embedded in your form you have to make the 
variables of the flash movie available to the html form.


-to do so, you have to send the the variables in the flash movie to the 
html form, or as Michael Bedar said: "You would need to call a 
javascript function from AS when the user clicks the inside swf and set 
the value of a hidden form field".


- you call a javascipt function from a flash movie like: 
getURL("javascript:processFlashData(" + xVal + "," + yVal + ")");


- the js function needs to write the variables into hidden fiels in the 
html form.


one more thing:
"I've always thought you used loadVariables to call an (in my 
experience) ASP or PHP page that talked to the database."
thats true, but you dont want to send the variables from the flash movie 
to the db, you want the html form to do that...


gr,
~
Benjamin Herholz | Code

www.dawn2.com
Hamburg - Copenhagen
m: +49 (0) 160 96670732
~

Amanda Kuek wrote:

On 30/10/05, Michael Bedar <[EMAIL PROTECTED]> wrote:


You would need to call a javascript function from AS when the user
clicks the inside swf and set the value of a hidden form field.. then
the user can click the HTML send button and send everything.




Thank you very much. I haven't done this before, but from some quick
googling, I assume that one would use something like fscommand or getURL?

The person who gave me the brief said something along the lines of "Sure
Flash can talk straight to a database! All you need to do is set the
connection string or something!" I hitherto hadn't realised this was
possible - I've always thought you used loadVariables to call an (in my
experience) ASP or PHP page that talked to the database. Can anyone clear
this one up for me please?

Thanks very much,

Amanda.
___
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] Flash and ASP/MSSQL

2005-10-30 Thread Mick Gow
Have you thought about not using flash? You could create an imagemap (even
though they're old hat) with about 15 pre-defined regions over an image (I'm
guess that's as accurate as you need it). Clicking a region could run a
javascript function that tells the form what region it is an submits it.

 On 10/30/05, Martin Wood <[EMAIL PROTECTED]> wrote:
>
> > The person who gave me the brief said something along the lines of "Sure
> > Flash can talk straight to a database! All you need to do is set the
> > connection string or something!" I hitherto hadn't realised this was
> > possible - I've always thought you used loadVariables to call an (in my
> > experience) ASP or PHP page that talked to the database. Can anyone
> clear
> > this one up for me please?
>
> Im pretty sure that unless someone has done some magic ive not heard of,
> you will need to use some kind of middle layer to talk to the database.
>
> thanks,
>
> Martin
> ___
> 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] Flash and ASP/MSSQL

2005-10-30 Thread Martin Wood

The person who gave me the brief said something along the lines of "Sure
Flash can talk straight to a database! All you need to do is set the
connection string or something!" I hitherto hadn't realised this was
possible - I've always thought you used loadVariables to call an (in my
experience) ASP or PHP page that talked to the database. Can anyone clear
this one up for me please?


Im pretty sure that unless someone has done some magic ive not heard of, 
you will need to use some kind of middle layer to talk to the database.


thanks,

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


[Flashcoders] Flash and PHP to open a word doc

2005-10-30 Thread Paul Steven
Hi there

I have an online flash movie that I would like to include buttons to open
various word documents. I would like these word documents to open in a new
browser window. The word documents will be stored in the same location as
the flash and php file on the server.

I am aware that a word doc can be opened using
getURL(PathAndFileName,"_blank"); however this does not work on some systems
for some unknown reason so I would like to try a PHP and Flash solution.

Unfortunately I am not skilled in PHP so was hoping someone here could help
me out with the PHP code. I have searched the web and cannot find any
tutorials on opening a word doc using PHP.

Thanks in advance

Paul

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


[Flashcoders] Recursive Tween only firing once

2005-10-30 Thread Nick Weekes
Hi all,
 
I would like to create a series of textfield objects (using
CreateEmptyMovieClip/CreateTextField), and have each textfield tween, and
then remove itself.
 
This all works fine, I have 50 or so textfields on the stage, but instead of
each tween executing individually, the tweens for all textifields occur at
the end of the process.
 
My code looks like this:
 
 
 CODE START
 
  // ArrayHolder is an array object which holds the text strings I want to
convert into TextField objects
   for (var i:Number = 0; ihttp://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash and ASP/MSSQL

2005-10-30 Thread Amanda Kuek
On 30/10/05, Pascal FODOR <[EMAIL PROTECTED]> wrote:
>
> [snip] The whole thing would just be handled by flash. [/snip]
>
>
Alas, unfortunately I don't have the option of having the whole form done in
flash - but thanks for the suggestion!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash and ASP/MSSQL

2005-10-30 Thread Amanda Kuek
On 30/10/05, Michael Bedar <[EMAIL PROTECTED]> wrote:
>
> You would need to call a javascript function from AS when the user
> clicks the inside swf and set the value of a hidden form field.. then
> the user can click the HTML send button and send everything.
>
>
Thank you very much. I haven't done this before, but from some quick
googling, I assume that one would use something like fscommand or getURL?

The person who gave me the brief said something along the lines of "Sure
Flash can talk straight to a database! All you need to do is set the
connection string or something!" I hitherto hadn't realised this was
possible - I've always thought you used loadVariables to call an (in my
experience) ASP or PHP page that talked to the database. Can anyone clear
this one up for me please?

Thanks very much,

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


Re: [Flashcoders] Free and open source software

2005-10-30 Thread Spike
Here's a page listing all sorts of open source software. You might find some
stuff there:

http://en.wikipedia.org/wiki/List_of_open-source_software_packages

Spike

On 10/29/05, Liam Morley <[EMAIL PROTECTED]> wrote:
>
> Flash: http://flasm.sourceforge.net/
>
> On 10/29/05, Ian Thomas <[EMAIL PROTECTED]> wrote:
> >
> > Sound - Audacity: *http://audacity.sourceforge.net/*
> >
> > On 10/28/05, Patrick Matte <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi, I'm rounding up a list of free and open source software.
> > >
> > > For flash, I have found MTASC and swfmil.
> > >
> > > Does anyboby know of any other free software for editing sound, video,
> > > bitmap and vector images?
> > >
> > ___
> > 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
>



--

Stephen Milligan
Do you do the Badger?
http://www.yellowbadger.com

Do you cfeclipse? http://www.cfeclipse.org
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash and ASP/MSSQL

2005-10-30 Thread Pascal FODOR
You could just do a flash form that sends the values of your flash input
fields through a LoadVars object along WITH the value of a X,Y coordinate
corresponding to where some "hole-y" MC was drag above a T-shirt MC. The
whole thing would just be handled by flash.


On 30/10/05 6:49, "Michael Bedar" <[EMAIL PROTECTED]> wrote:

> You would need to call a javascript function from AS when the user
> clicks the inside swf and set the value of a hidden form field.. then
> the user can click the HTML send button and send everything.
> 
> 
> 
> 
> On Oct 30, 2005, at 12:38 AM, Amanda Kuek wrote:
> 
>> Hello everyone,
>> 
>> This is a question about Flash in an ASP form which communicates
>> with an
>> MSSQL db. I'm not really sure how to phrase the question, so I'm
>> afraid that
>> I'll just have to explain the story.
>> 
>> Imagine an ASP page about faulty garments. Let's just say that if
>> you had a
>> hole in your T-shirt, you could visit this page to report it. The
>> page would
>> have normal HTML fields for name and email, and it would also have
>> a SWF
>> with a picture of a T-shirt. The disgruntled hole-y user clicks on the
>> T-shirt to leave an X representing where the hole is. The form
>> information
>> (including that of the hole location, in the SWF) is then submitted
>> using a
>> normal HTML submit button and stored in the MSSQL db.
>> 
>> I spose my question is, is this scenario possible? Is it only
>> possible to
>> store user-submitted information (in this case, the X,Y coordinates
>> of the
>> hole) by clicking on a "Send" button WITHIN flash, or is there
>> another way?
>> I'd like to avoid making a user explicitly submit the SWF
>> information AS
>> WELL AS the form information.
>> 
>> Any ideas and comments much appreciated,
>> 
>> Thanks muchly,
>> 
>> Amanda.
>> ___
>> 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
> 

__
Pascal FODOR
http://www.flashavplayers.com
__















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