Re: [Flashcoders] ComboBoxV2 Preloader problem

2007-07-24 Thread Hans Wichman

Hi,
this was recently discussed on the list, search for :
 Andy Herrman [EMAIL PROTECTED]to Flashcoders
*[Flashcoders] Strange ComboBox issues when loaded in a child SWF*

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

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


RE: [Flashcoders] Options for generating pdf files

2007-07-24 Thread Mendelsohn, Michael
So do you think it would be possible to take a fairly complex array, run
it through some function in AS2 that describes the document page by
page, send it to CF and out pops a pdf?  Would it be possible to have
templates using the drawing API, and add data?  I'm understanding that
CF could take all that and render the pdf?  (I'd rather not go the java
route.)



 Yes, there's very nice PDF generation in CF 7, and even better PDF
generation in the upcoming CF 8. Now that Adobe owns it, the sky's the
limit!
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


RE: [Flashcoders] ComboBoxV2 Preloader problem

2007-07-24 Thread Holth, Daniel C.

Perfect!  Solved my problem!   Thanks.


Daniel Holth
I.S. Programmer
x5217   ||  J401

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hans
Wichman
Sent: Tuesday, July 24, 2007 4:02 AM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] ComboBoxV2  Preloader problem

Hi,
this was recently discussed on the list, search for :
  Andy Herrman [EMAIL PROTECTED]to Flashcoders
*[Flashcoders] Strange ComboBox issues when loaded in a child SWF*

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

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

This e-mail and its attachments are intended only for the use of the 
addressee(s) and may contain privileged, confidential or proprietary 
information. If you are not the intended recipient, or the employee or agent 
responsible for delivering the message to the intended recipient, you are 
hereby notified that any dissemination, distribution, displaying, copying, or 
use of this information is strictly prohibited. If you have received this 
communication in error, please inform the sender immediately and delete and 
destroy any record of this message. Thank you.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


RE: [Flashcoders] How to determine when an externally loaded swf hasended playing.

2007-07-24 Thread Holth, Daniel C.

Are these timeline based swfs, or single frame, or movieclips within
movieclips?  Or won't you know?

You could create an onEnterFrame event that continually checks the swf's
_currentframe compared to _totalframes.  When they are equal, it has
reached the end. 

If it's a single frame or MovieClips within MovieClips situation, it
becomes more difficult...

DC Holth


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christopher Whiteford
Sent: Monday, July 23, 2007 3:54 PM
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] How to determine when an externally loaded swf
hasended playing.

I have a situation where I don't have control of the external swf files
that
my prog is using.

I have created a movieClip that uses a movieClipLoader and loads an
external
swf into it, I am trying to detect when the end of that external swf has
been reached.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

This e-mail and its attachments are intended only for the use of the 
addressee(s) and may contain privileged, confidential or proprietary 
information. If you are not the intended recipient, or the employee or agent 
responsible for delivering the message to the intended recipient, you are 
hereby notified that any dissemination, distribution, displaying, copying, or 
use of this information is strictly prohibited. If you have received this 
communication in error, please inform the sender immediately and delete and 
destroy any record of this message. Thank you.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] How to determine when an externally loaded swf hasended playing.

2007-07-24 Thread Mike

Here is how I determine when a movie completes. The key section is this:

myListener.complete = function(eventObject:Object):Void {

   trace(My video has been viewed);

   getURL(javascript:setCookie('mycookienameOK','My Video
Title','365');void(0););

};

In the above I set a cookie that is good for 365 days if and only if the
movie completes. This does not prevent the user from scrubbing the play head
to the end of the movie if you make the controls available. If the user
cancels before it completes the cookie object does not get set and the video
does not show up in their list of Viewed Videos. I am not sure how you
would implement this from externally loaded videos but maybe this is a
start.

Good luck!
Mike Ickes



// Create a NetConnection object

var my_nc:NetConnection = new NetConnection();

// Create a local streaming connection

my_nc.connect(null);

// Create a NetStream object and define an onStatus() function

var my_ns:NetStream = new NetStream(my_nc);

my_ns.onStatus = function(infoObject:Object):Void {

   status_txt.text += status ( + this.time +  seconds)\n;

   status_txt.text += \t Level:  + infoObject.level + \n;

   status_txt.text += \t Code:  + infoObject.code + \n\n;

};

// Attach the NetStream video feed to the Video object

my_video.attachVideo(my_ns);

// Set the buffer time

my_ns.setBufferTime(15);

// Begin playing the FLV file

my_ns.play(http://yourpathtoyourvideohere.com/myVideo.swfhttp://pilots.flightoptions.com/traininig/be400_EP_Drill/aircraft_fire.swf
);



var myListener:Object = new Object();

myListener.complete = function(eventObject:Object):Void {

   trace(My video has been viewed);

   getURL(javascript:setCookie('mycookienameOK','My Video
Title','365');void(0););

};

myMedia.addEventListener(complete, myListener);


On 7/24/07, Holth, Daniel C. [EMAIL PROTECTED] wrote:



Are these timeline based swfs, or single frame, or movieclips within
movieclips?  Or won't you know?

You could create an onEnterFrame event that continually checks the swf's
_currentframe compared to _totalframes.  When they are equal, it has
reached the end.

If it's a single frame or MovieClips within MovieClips situation, it
becomes more difficult...

DC Holth


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christopher Whiteford
Sent: Monday, July 23, 2007 3:54 PM
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] How to determine when an externally loaded swf
hasended playing.

I have a situation where I don't have control of the external swf files
that
my prog is using.

I have created a movieClip that uses a movieClipLoader and loads an
external
swf into it, I am trying to detect when the end of that external swf has
been reached.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

This e-mail and its attachments are intended only for the use of the
addressee(s) and may contain privileged, confidential or proprietary
information. If you are not the intended recipient, or the employee or agent
responsible for delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution, displaying, copying,
or use of this information is strictly prohibited. If you have received this
communication in error, please inform the sender immediately and delete and
destroy any record of this message. Thank you.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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





--
Kind Regards,
Mike Ickes
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


RE: [Flashcoders] ComboBoxV2 Preloader problem

2007-07-24 Thread Juan Solano

Hi Daniel

Big issue, he,,

try with this.

When you load the movie you have to block the root, like this.

item = this.createEmptyMovieClip(movieName,2);
item._lockroot = true;

item.loadMovie(movieToLoad.swf);

Cool

JB - CostaRica



From: Holth, Daniel C. [EMAIL PROTECTED]
Reply-To: flashcoders@chattyfig.figleaf.com
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] ComboBoxV2  Preloader problem
Date: Mon, 23 Jul 2007 12:38:41 -0500


Hello,

We have a main_preloader.swf that loads our main_app.swf.  The
main_app.swf has a ComboBox V2 component.  When main_app.swf is run by
itself, it works beautifully, but when its loaded into the
main_preloader.swf the ComboBox is broken.  It highlights when clicked,
but won't open or do anything else.

When I drop the combo box in the main_preloader.swf, it works fine, but
that jumps the size of the main_preloader.swf to 58kb - much too big to
be a good preloader.  Anyone have thoughts on how to solve this?

Thanks!

Daniel Holth
I.S. Programmer
x5217   ||  J401



This e-mail and its attachments are intended only for the use of the 
addressee(s) and may contain privileged, confidential or proprietary 
information. If you are not the intended recipient, or the employee or 
agent responsible for delivering the message to the intended recipient, you 
are hereby notified that any dissemination, distribution, displaying, 
copying, or use of this information is strictly prohibited. If you have 
received this communication in error, please inform the sender immediately 
and delete and destroy any record of this message. Thank you.

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

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


_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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

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


[Flashcoders] How to remove a datagrid

2007-07-24 Thread Paul Steven
Probably a really dumb question but how do I remove a datagrid?

I create the datagrid as follows and I want the function 'Click_Datagrid' to
delete / remove the datagrid.

var myDataGrid:DataGrid = new DataGrid();
myDataGrid.addColumn(Type);
myDataGrid.addColumn(Qualification);
myDataGrid.addColumn(Code);
myDataGrid.addColumn(Students);
myDataGrid.addColumn(Marked);
myDataGrid.addColumn(Submitted);
myDataGrid.addColumn(Series);
myDataGrid.addColumn(DaysLeft);


myDataGrid.columns[0].width = 60;
myDataGrid.columns[1].width = 140;
myDataGrid.columns[2].width = 140;
myDataGrid.columns[3].width = 70;
myDataGrid.columns[4].width = 70;
myDataGrid.columns[5].width = 90;
myDataGrid.columns[6].width = 70;

myDataGrid.addItem({Type:GCE, Qualification: Extended Project,
Code:EPQ-W-SP-06-08, Students:8,
Marked:0,Submitted:0,Series:November, DaysLeft:15});
myDataGrid.width = 720;
myDataGrid.move(20, 160);
myDataGrid.columns[7].headerText = Days Left;
myDataGrid.rowCount = myDataGrid.length;
addChild(myDataGrid);

myDataGrid.addEventListener(ListEvent.ITEM_CLICK, Click_Datagrid);

function Click_Datagrid(evt_obj:Object) {

var vDG = evt_obj.target;   

// Code to remove / delete the datagrid here

gotoAndStop(qualificationSummary);

}

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

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


[Flashcoders] CDATA Html Text not working

2007-07-24 Thread Chris W. Paterson
So I'm working on a project... I'm reading xml nodes and placing each node into 
dynamic text
fields...

XML:
content![CDATA[Blah blah a href=somelink.comsomeLink/a b some bold 
text
/b]]/content

The problem is the XML Node is not reading as a string and the html text field 
reads the node as a
literal string instead of html text. I mean it prints something like Blah blah 
a
href=somelink.comsomeLink/a b some bold text /b in my text field.

AS:
var tt:TextField = m.createTextField(txt,m.getNextHighestDepth(),0,0,0,0);
tt.autoSize = true;
tt.selectable = false;
tt.embedFonts = true;
tt.antiAliasType = advanced;
tt.html = true;
tt.htmlText = local.ob.content; // myXml value
tt.setTextFormat(local.tTextFormat);

Does anyone have a solution for this? I think it's because the text is not 
reading as a String...
I've tried toString() and it doesn't work...  If I try and perform any other 
simple String
function like substr() or anything it doesn't work either!  

I'm sorta new at XML and Flash, I've been doing Flash for a while but I usually 
don't use XML.

Any help would be very much appreciated

Thanks!
Chris


   

Be a better Heartthrob. Get better relationship answers from someone who knows. 
Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=listsid=396545433
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


RE: [Flashcoders] CDATA Html Text not working

2007-07-24 Thread Chris W. Paterson
here is the snipit of code:

local.obCredits[this.firstChild.childNodes[i].firstChild.childNodes[j].nodeName]
 =
this.firstChild.childNodes[i].firstChild.childNodes[j].childNodes;

local.obCredits  --- This is passed as an object later to a Class.

[this.firstChild.childNodes[i].firstChild.childNodes[j].nodeName]  --- this 
loops the node names
and places them as properties of the local.obCredits object, one of them being 
the content

this.firstChild.childNodes[i].firstChild.childNodes[j].childNodes;--- this is 
how I am trying to
access the content of that node.

First off, I'm guessing I should use .nodeValue?  Will that give me the entire 
node with
![CDATA[]]?  Is it even possible to read the html value for html text?

Thanks so much!
-Chris

--- Danny Kodicek [EMAIL PROTECTED] wrote:

   XML:
  content![CDATA[Blah blah a 
  href=somelink.comsomeLink/a b some bold text /b]]/content
  
  The problem is the XML Node is not reading as a string and 
  the html text field reads the node as a literal string 
  instead of html text. I mean it prints something like Blah 
  blah a href=somelink.comsomeLink/a b some bold text 
  /b in my text field.
  
  AS:
  var tt:TextField = 
  m.createTextField(txt,m.getNextHighestDepth(),0,0,0,0);
  tt.autoSize = true;
  tt.selectable = false;
  tt.embedFonts = true;
  tt.antiAliasType = advanced;
  tt.html = true;
  tt.htmlText = local.ob.content; // myXml value 
 
 How are you getting this local.ob.content?  That's the key issue, really.
 Have you tried a trace() of this value?
 
 My guess is that you're including the [CDATA bit of the field, which means
 you're telling the field to render the text literally, which is exactly what
 it's doing.
 
 Danny
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com
 



 



   

Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


[Flashcoders] AS3 Events

2007-07-24 Thread Ian Thomas

Hi all,
 I'm in the process of converting a quite extensive code framework
from AS2 to AS3, and I've got a 'how do you cope with this situation?'
question.

 I understand events, event listeners, EventDispatcher etc., but I'm
missing a trick somewhere (probably from my historical use of Delegate
with additional params).

Say we have object A, which supports the following:

A.addEventListener(type:String,handler:Function);
A.loadSomething(url:String); // Dispatches Event.COMPLETE when done

and object B wraps it and wants to do something context specific once
A has finished loading:

(pseudo-AS3!)

class B
{
:
  function addEventListener(/as per usual/);

  // Dispatches MyEvent.ITSOVERWITH when done
  function loadSomethingAndProcessIt(url:String,contextInfo:Object):void
  {
 var a:A=new A();
 a.addEventListener(Event.COMPLETE,onALoaded);
 a.loadSomething(url);
  }

  function onALoaded(event:Event):void
  {
 var a:A=A(event.target);
  // Process the results of A being loaded
  // : blah
  // then:
 dispatchEvent(new MyEvent(MyEvent.ITSOVERWITH,someDataIGotFromA));
  }
}

It doesn't really matter what events either are firing; what does matter is that
calling loadSomethingAndProcessIt() is both asynchronous and atomic
i.e. multiple loadSomethingAndProcessIt() calls could be running at
the same time on the same B.

What I'm trying to do is to find a sane, 'generally accepted' way to
get information from loadSomethingAndProcessIt() to onALoaded()
without A being aware of it at all. So to access the contextInfo
variable from within onALoaded().

What I'd have done in AS2 is to use an extended Delegate (or Proxy) -
the listener would have been:

a.addEventListener(Event.COMPLETE,Delegate.create(this,onALoaded,contextInfo));

Which works fine.

Now, I've written the equivalent of that sort of Delegate/Proxy for
AS3, and it works perfectly well and does the trick. However, that
method appears to be Frowned Upon by the community, for reasons which
escape me. So I guess my question is:

- Why, in AS3, is my equivalent of using Delegate Not The Done Thing?
(Someone mentioned type-safety; and yes, at compile time, you'll lose
type safety)
- How else would you do it? What's the 'standard' approach?

This situation comes up a lot - really, a huge number of times - in
our code frameworks. This may be because they take the wrong approach
- perhaps I can't see the wood for the trees.

For clarity, we can't just store contextInfo inside B, as there may be
multiple requests. We could conceivably store a look up table in B
with various contextInfos tied to varies requests to A, but that's
just overkill.

Thoughts?

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

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


RE: [Flashcoders] Options for generating pdf files

2007-07-24 Thread Palmer, Jim
Michael,

I've used Coldfusion7 and PHP + PDFLib lite on several projects before. I've 
also used HTMLDOC for html-pdf conversion but Coldfusion has them all beat 
with the simplicity of html-pdf conversion. You literally output your inline 
html and using the CFDOCUMENT tag. The only problem is that there the 
Coldfusion7 PDF implementation is riddled with problems.

There are several PHP projects to help create PDFs. There are even PHP classes 
that convert HTML to a PDF without using PDFlib (which does require a bit of 
web server hackery).

Coldfusion8 (Scorpio) promises to fix literally all the issues with coldfusion 
pdf generation from previous versions, so that might be your best bet. I think 
flash + cf would be the easiest to get working, and will probably do exactly 
what you want so I would suggest starting there! Maybe even look into using 
CFDOCUMENT to output flash paper instead of pdf!

Here's the Coldfusion7 documentation on the CFDOCUMENT tag
http://livedocs.adobe.com/coldfusion/7/htmldocs/0236.htm

--
Jim Palmer ! Mammoth Web Operations

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of
 Mendelsohn, Michael
 Sent: Monday, July 23, 2007 1:38 PM
 To: flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] Options for generating pdf files
 
 
 Hi list...
 
 I'm working on an app that generates a pdf based on user settings.  It
 will be about 20 pages in length, with some graphics but mostly
 formatted text.  I had been planning to embed this swf in Director and
 use the pdf xtra.  However, I'm wondering what other options are out
 there.
 
 I've never used Cold Fusion before, but I hear there's pdf generation
 capability in it.  Would Flash + CF work best, or are there 
 other routes
 to take?
 
 Thanks,
 - Michael M.
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com
 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] How to use media server alongwith webserver for video streaming

2007-07-24 Thread greg h

Hi Abhishek,

Bob's summary is 100% correct.

For more detail, you might want to check out the heading About streaming
video here on the Delivery options for Flash video page of the Flash
video learning guide:
http://www.adobe.com/devnet/flash/articles/video_guide_02.html

Also this page may help too:
Streaming Video (FLV) -- Delivering Flash Video: Understanding the
Difference Between Progressive Download and Streaming Video
http://www.adobe.com/devnet/flash/articles/flv_download_04.html

Following is a basic sequence of events at runtime:
1) browser requests a SWF from the web server via HTTP
2) browser receives SWF, SWF contains logic for RTMP call to FMS
3) SWF requests FLV stream from FMS
4) FMS starts stream to the SWF
5) SWF receives FLV stream and displays it.

So, basically, there is no direct interaction between the FMS and web
server.

Please post back if you have any further questions.

hth,

g

On 7/23/07, creativity [EMAIL PROTECTED] wrote:


Hi,

Can anyone guide me on how to use flash media server with a web server for
streaming media asses like videos and audios.
I wish to know how to set up this service and how web application running
on
webserver handles media related requests using flash media server.
--
Abhishek Kumar


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

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


Re: [Flashcoders] How to determine when an externally loaded swf hasended playing.

2007-07-24 Thread Christopher Whiteford

Yeah it is a movieClip in movieClip situation, which I tried of course using
the onEnterFrame and currentframe = totalframes route but as it was an
external swf which I have no control of so it wasn't able to detect the
frames.

Thanks though.

On 7/24/07, Holth, Daniel C. [EMAIL PROTECTED] wrote:



Are these timeline based swfs, or single frame, or movieclips within
movieclips?  Or won't you know?

You could create an onEnterFrame event that continually checks the swf's
_currentframe compared to _totalframes.  When they are equal, it has
reached the end.

If it's a single frame or MovieClips within MovieClips situation, it
becomes more difficult...

DC Holth


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christopher Whiteford
Sent: Monday, July 23, 2007 3:54 PM
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] How to determine when an externally loaded swf
hasended playing.

I have a situation where I don't have control of the external swf files
that
my prog is using.

I have created a movieClip that uses a movieClipLoader and loads an
external
swf into it, I am trying to detect when the end of that external swf has
been reached.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

This e-mail and its attachments are intended only for the use of the
addressee(s) and may contain privileged, confidential or proprietary
information. If you are not the intended recipient, or the employee or agent
responsible for delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution, displaying, copying,
or use of this information is strictly prohibited. If you have received this
communication in error, please inform the sender immediately and delete and
destroy any record of this message. Thank you.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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

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


Re: [Flashcoders] How to determine when an externally loaded swf hasended playing.

2007-07-24 Thread Christopher Whiteford

I didn't think of trying to use the netstream object, I will definitely try
this.

Thanks,

Chris

On 7/24/07, Mike [EMAIL PROTECTED] wrote:


Here is how I determine when a movie completes. The key section is this:

myListener.complete = function(eventObject:Object):Void {

trace(My video has been viewed);

getURL(javascript:setCookie('mycookienameOK','My Video
Title','365');void(0););

};

In the above I set a cookie that is good for 365 days if and only if the
movie completes. This does not prevent the user from scrubbing the play
head
to the end of the movie if you make the controls available. If the user
cancels before it completes the cookie object does not get set and the
video
does not show up in their list of Viewed Videos. I am not sure how you
would implement this from externally loaded videos but maybe this is a
start.

Good luck!
Mike Ickes



// Create a NetConnection object

var my_nc:NetConnection = new NetConnection();

// Create a local streaming connection

my_nc.connect(null);

// Create a NetStream object and define an onStatus() function

var my_ns:NetStream = new NetStream(my_nc);

my_ns.onStatus = function(infoObject:Object):Void {

status_txt.text += status ( + this.time +  seconds)\n;

status_txt.text += \t Level:  + infoObject.level + \n;

status_txt.text += \t Code:  + infoObject.code + \n\n;

};

// Attach the NetStream video feed to the Video object

my_video.attachVideo(my_ns);

// Set the buffer time

my_ns.setBufferTime(15);

// Begin playing the FLV file

my_ns.play(http://yourpathtoyourvideohere.com/myVideo.swf
http://pilots.flightoptions.com/traininig/be400_EP_Drill/aircraft_fire.swf

);



var myListener:Object = new Object();

myListener.complete = function(eventObject:Object):Void {

trace(My video has been viewed);

getURL(javascript:setCookie('mycookienameOK','My Video
Title','365');void(0););

};

myMedia.addEventListener(complete, myListener);


On 7/24/07, Holth, Daniel C. [EMAIL PROTECTED] wrote:


 Are these timeline based swfs, or single frame, or movieclips within
 movieclips?  Or won't you know?

 You could create an onEnterFrame event that continually checks the swf's
 _currentframe compared to _totalframes.  When they are equal, it has
 reached the end.

 If it's a single frame or MovieClips within MovieClips situation, it
 becomes more difficult...

 DC Holth


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 Christopher Whiteford
 Sent: Monday, July 23, 2007 3:54 PM
 To: Flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] How to determine when an externally loaded swf
 hasended playing.

 I have a situation where I don't have control of the external swf files
 that
 my prog is using.

 I have created a movieClip that uses a movieClipLoader and loads an
 external
 swf into it, I am trying to detect when the end of that external swf has
 been reached.
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

 This e-mail and its attachments are intended only for the use of the
 addressee(s) and may contain privileged, confidential or proprietary
 information. If you are not the intended recipient, or the employee or
agent
 responsible for delivering the message to the intended recipient, you
are
 hereby notified that any dissemination, distribution, displaying,
copying,
 or use of this information is strictly prohibited. If you have received
this
 communication in error, please inform the sender immediately and delete
and
 destroy any record of this message. Thank you.
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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




--
Kind Regards,
Mike Ickes
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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

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


RE: [Flashcoders] CDATA Html Text not working

2007-07-24 Thread Joshua Sera
Flash doesn't actuall support the CDATA tag. It sort
of does, but all 's and 's get replaced with lt;'s
and gt;'s.

When you stick it in a text field, it correctly
interprets the HTML entities, which leads to you
getting HTML tags where they shouldn't be.

--- Chris W. Paterson [EMAIL PROTECTED] wrote:

 here is the snipit of code:
 

local.obCredits[this.firstChild.childNodes[i].firstChild.childNodes[j].nodeName]
 =

this.firstChild.childNodes[i].firstChild.childNodes[j].childNodes;
 
 local.obCredits  --- This is passed as an object
 later to a Class.
 

[this.firstChild.childNodes[i].firstChild.childNodes[j].nodeName]
  --- this loops the node names
 and places them as properties of the local.obCredits
 object, one of them being the content
 

this.firstChild.childNodes[i].firstChild.childNodes[j].childNodes;---
 this is how I am trying to
 access the content of that node.
 
 First off, I'm guessing I should use .nodeValue? 
 Will that give me the entire node with
 ![CDATA[]]?  Is it even possible to read the
 html value for html text?
 
 Thanks so much!
 -Chris
 
 --- Danny Kodicek [EMAIL PROTECTED] wrote:
 
XML:
   content![CDATA[Blah blah a 
   href=somelink.comsomeLink/a b some bold
 text /b]]/content
   
   The problem is the XML Node is not reading as a
 string and 
   the html text field reads the node as a literal
 string 
   instead of html text. I mean it prints something
 like Blah 
   blah a href=somelink.comsomeLink/a b
 some bold text 
   /b in my text field.
   
   AS:
   var tt:TextField = 
  

m.createTextField(txt,m.getNextHighestDepth(),0,0,0,0);
   tt.autoSize = true;
   tt.selectable = false;
   tt.embedFonts = true;
   tt.antiAliasType = advanced;
   tt.html = true;
   tt.htmlText = local.ob.content; // myXml value 
  
  How are you getting this local.ob.content?  That's
 the key issue, really.
  Have you tried a trace() of this value?
  
  My guess is that you're including the [CDATA bit
 of the field, which means
  you're telling the field to render the text
 literally, which is exactly what
  it's doing.
  
  Danny
  
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the
 archive:
 

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



 Looking for a deal? Find great prices on flights and
 hotels with Yahoo! FareChase.
 http://farechase.yahoo.com/
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the
 archive:

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



   

Be a better Heartthrob. Get better relationship answers from someone who knows. 
Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=listsid=396545433
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


[Flashcoders] Lots of compiler errors after copying custom component

2007-07-24 Thread gluedanny
Hi there, I've made a compiled component with custom actions (a scrollbar). I 
have beeen using it fine in one movie but then found when I loaded this movie 
into another movie which had  the old version of the component in it's library, 
the custom component wouldn't work in the other movie. 
To rectify this problem I copied the new component to the main movie and now I 
am getting lots and lots of compiler errors for the Tween class, BroadcasterMX 
class and onEnterFrame class saying 'Attribute outside of class' or 'The 
staement is not permitted in a class definition'.
I'm not really sure what I've done wrong as the targetting of my classes seems 
correct and I haven't altered any of the class files that contain the  errors.
If anyone could guide me on this I would be really really grateful I am stumped!
Thanks,
Danny 

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

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


[Flashcoders] flash comm process in windows 2003

2007-07-24 Thread Tony Trapp
Hey guys just wondering about something.

I have a client that will have video on-demand for their site.

I noticed as I played the video the flashcomm process in windows just kept 
climbing and once the video was stopped or the page unloaded the process never 
went down.

Then I tried playing the video again and the process stayed where it was at and 
then climbed again.

I want to know if there is a way to release flash comm from memory when not 
needed like one would when using a com object in asp.

Thanks guys.

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

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


Re: [Flashcoders] CDATA Html Text not working

2007-07-24 Thread Alan MacDougall

Chris W. Paterson wrote:

this.firstChild.childNodes[i].firstChild.childNodes[j].childNodes;--- this is 
how I am trying to
access the content of that node.

First off, I'm guessing I should use .nodeValue?  Will that give me the entire 
node with
![CDATA[]]?  Is it even possible to read the html value for html text?
  


Yep, there's the problem. The content of an XML node is a node in itself 
-- it's just a text node. It looks like this:


foomy text/foo

foo -- part of node A
my text -- node B
/foo -- part of node A


So to get the text inside that foo tag, let's say we have:

var fooNode:XMLNode;
var textNode:XMLNode = fooNode.firstChild;
var myText:String = textNode.nodeValue;
myTextField.htmlText = myText; // now it should look right

As you can see, the child node of foo is an XMLNode which contains the 
text -- it's not the string itself. I've used CDATA in XML plenty of 
times, and your HTML text fields will interpret the HTML as long as 
you're getting the string value of the text node.


As for all that confusing child.firstChild.childNodes[n].child business, 
may I suggest XFactorStudios' excellent XPath implementation? 
www.xfactorstudio.com -- and then you can specify your XML with simple 
syntax like this:


// gets an Array of XMLNodes; specifically, all bar inside a foo, 
starting from rootNode

var nodes:Array = XPath.selectNodes(rootNode, foo/bar);

It's a less confusing than manually walking the XML tree, and allows 
some pretty complex searches once you really get into it. ( 
http://www.w3.org/TR/xpath is very dense, but section 2 may give you an 
example of XPath's power.)


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

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


RE: [Flashcoders] How to remove a datagrid

2007-07-24 Thread Paul Steven
Thanks Paul - that worked a treat!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Andrews
Sent: 24 July 2007 17:56
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] How to remove a datagrid


- Original Message - 
From: Paul Steven [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Tuesday, July 24, 2007 3:37 PM
Subject: [Flashcoders] How to remove a datagrid


 Probably a really dumb question but how do I remove a datagrid?

 I create the datagrid as follows and I want the function 'Click_Datagrid' 
 to
 delete / remove the datagrid.

 var myDataGrid:DataGrid = new DataGrid();
 myDataGrid.addColumn(Type);
 myDataGrid.addColumn(Qualification);
 myDataGrid.addColumn(Code);
 myDataGrid.addColumn(Students);
 myDataGrid.addColumn(Marked);
 myDataGrid.addColumn(Submitted);
 myDataGrid.addColumn(Series);
 myDataGrid.addColumn(DaysLeft);


 myDataGrid.columns[0].width = 60;
 myDataGrid.columns[1].width = 140;
 myDataGrid.columns[2].width = 140;
 myDataGrid.columns[3].width = 70;
 myDataGrid.columns[4].width = 70;
 myDataGrid.columns[5].width = 90;
 myDataGrid.columns[6].width = 70;

 myDataGrid.addItem({Type:GCE, Qualification: Extended Project,
 Code:EPQ-W-SP-06-08, Students:8,
 Marked:0,Submitted:0,Series:November, DaysLeft:15});
 myDataGrid.width = 720;
 myDataGrid.move(20, 160);
 myDataGrid.columns[7].headerText = Days Left;
 myDataGrid.rowCount = myDataGrid.length;
 addChild(myDataGrid);

 myDataGrid.addEventListener(ListEvent.ITEM_CLICK, Click_Datagrid);

 function Click_Datagrid(evt_obj:Object) {

 var vDG = evt_obj.target;

// Code to remove / delete the datagrid here

Probably something like this..

evt_obj.currentTarget.parent.removeChild(evt_obj.currentTarget);

Paul

 gotoAndStop(qualificationSummary);

 }

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

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

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

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

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

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


RE: [Flashcoders] CDATA Html Text not working

2007-07-24 Thread David Ngo
If you're using Flash 8, XPath was already integrated into its library/API.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chris W.
Paterson
Sent: Tuesday, July 24, 2007 1:44 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] CDATA Html Text not working

Great!  That works!  Thanks so much!!

I'll look into that XPath... Maybe not for this project since it's on a
tight deadline, but for
the future!

Thanks!
Chris

--- Alan MacDougall [EMAIL PROTECTED] wrote:

 Chris W. Paterson wrote:
  this.firstChild.childNodes[i].firstChild.childNodes[j].childNodes;---
this is how I am trying
 to
  access the content of that node.
 
  First off, I'm guessing I should use .nodeValue?  Will that give me the
entire node with
  ![CDATA[]]?  Is it even possible to read the html value for html
text?

 
 Yep, there's the problem. The content of an XML node is a node in itself 
 -- it's just a text node. It looks like this:
 
 foomy text/foo
 
 foo -- part of node A
 my text -- node B
 /foo -- part of node A
 
 
 So to get the text inside that foo tag, let's say we have:
 
 var fooNode:XMLNode;
 var textNode:XMLNode = fooNode.firstChild;
 var myText:String = textNode.nodeValue;
 myTextField.htmlText = myText; // now it should look right
 
 As you can see, the child node of foo is an XMLNode which contains the 
 text -- it's not the string itself. I've used CDATA in XML plenty of 
 times, and your HTML text fields will interpret the HTML as long as 
 you're getting the string value of the text node.
 
 As for all that confusing child.firstChild.childNodes[n].child business, 
 may I suggest XFactorStudios' excellent XPath implementation? 
 www.xfactorstudio.com -- and then you can specify your XML with simple 
 syntax like this:
 
 // gets an Array of XMLNodes; specifically, all bar inside a foo, 
 starting from rootNode
 var nodes:Array = XPath.selectNodes(rootNode, foo/bar);
 
 It's a less confusing than manually walking the XML tree, and allows 
 some pretty complex searches once you really get into it. ( 
 http://www.w3.org/TR/xpath is very dense, but section 2 may give you an 
 example of XPath's power.)
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com
 



 



   


Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidsc
s=bz 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

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

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


[Flashcoders] ConvolutionFilter stops when it gets online

2007-07-24 Thread David Cohn

Hey all,

What could cause a ConvolutionFilter to not show up online, when it  
works perfectly well locally?  I'm publishing as Flash Player 8,  
ActionScript 2.0, my browser uses Shockwave Flash 9.0 r45, and the  
actionScript is including (I've tried import flash.filters.* as well):


import flash.filters.ConvolutionFilter;


(This is the code, although as I said I'd think there's no problem  
here since it works in Authoring:)


private function onLoadInit( target_mc:MovieClip ):Void {
// Set up sharpening filter
var neg = -1;
var pos =  2;
var cor =  0;
var mat:Array = [
cor,  neg, cor,
neg,  pos, neg,
cor,  neg, cor
];
var convMat = new ConvolutionFilter(3,3,mat);
target_mc.filters = [convMat];

this.picimage._alpha = 0;
this.setFrameEvent(fadeIn); // this starts an alpha 
fade-in
}


Any ideas?

Thanks,
--Dave

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

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


[Flashcoders] [JOB] Sr. Flash/AS Programmers, Los Angeles, CA | 70-125k

2007-07-24 Thread Beau Gould
Sr. Flash/AS Programmers, Los Angeles, CA | 70-125k 

My Los Angeles, CA client is one of the most renowned and acclaimed
interactive agencies in the world.  

As a Senior Flash/ActionScript Programmer, you transform client goals into
compelling, usable, and media-rich Interactive Experiences ranging from
Websites, Games, Applications and Widgets, to intelligent User Interfaces
for mobile and the console. Their creative concepts, design, motion
graphics, video and audio teams will challenge you to plan and build
innovative projects for our well known clients, appreciated by millions and
often awarded top industry accolades.

These positions are located in Beverly Hills, CA. They pay from
$70,000-$125,000 (dep on experience) and come with 3 paid weeks vacation
time. In addition, all staff members enjoy Health, Dental and Vision
Insurance, Equity Participation Plan and a Company-Matched 401k. Ideal
candidates will have at least 3+ years of Flash coding experience,
preferably in a collaborative interactive agency setting.

These are full time positions in their Beverly Hills, CA office and they
will pay full relocation expenses for candidates who are authorized to work
in the USA. 

If you are interested in this position, please submit your resume, salary
requirements, and a paragraph (or two) highlighting your skills/experience
as it pertains to this job to [EMAIL PROTECTED] 


Thank you,
Beau J. Gould
 
Open Source Staffing
www.open-source-staffing.com
[EMAIL PROTECTED]

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

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


[Flashcoders] A3 scrollbars in Flex app

2007-07-24 Thread Smith, Philip
Hello,

We are experiencing the following error with actionscript 3/Flash CS3
scrollbars when embedded in a Flex application:


TypeError: Error #1034: Type Coercion failed: cannot convert
fl.events::[EMAIL PROTECTED] to mx.events.FlexEvent.
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven
tFunction()
at flash.events::EventDispatcher/dispatchEvent()
at fl.core::UIComponent/set visible()
at
fl.containers::BaseScrollPane/fl.containers:BaseScrollPane::drawLayout()
at fl.containers::ScrollPane/fl.containers:ScrollPane::drawLayout()
at fl.containers::BaseScrollPane/fl.containers:BaseScrollPane::draw()
at fl.containers::ScrollPane/fl.containers:ScrollPane::draw()
at fl.core::UIComponent/::callLaterDispatcher()

How can this be fixed?

Thanks,

Phil



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

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


Re: [Flashcoders] How to remove a datagrid

2007-07-24 Thread Paul Andrews


- Original Message - 
From: Paul Steven [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Tuesday, July 24, 2007 3:37 PM
Subject: [Flashcoders] How to remove a datagrid



Probably a really dumb question but how do I remove a datagrid?

I create the datagrid as follows and I want the function 'Click_Datagrid' 
to

delete / remove the datagrid.

var myDataGrid:DataGrid = new DataGrid();
myDataGrid.addColumn(Type);
myDataGrid.addColumn(Qualification);
myDataGrid.addColumn(Code);
myDataGrid.addColumn(Students);
myDataGrid.addColumn(Marked);
myDataGrid.addColumn(Submitted);
myDataGrid.addColumn(Series);
myDataGrid.addColumn(DaysLeft);


myDataGrid.columns[0].width = 60;
myDataGrid.columns[1].width = 140;
myDataGrid.columns[2].width = 140;
myDataGrid.columns[3].width = 70;
myDataGrid.columns[4].width = 70;
myDataGrid.columns[5].width = 90;
myDataGrid.columns[6].width = 70;

myDataGrid.addItem({Type:GCE, Qualification: Extended Project,
Code:EPQ-W-SP-06-08, Students:8,
Marked:0,Submitted:0,Series:November, DaysLeft:15});
myDataGrid.width = 720;
myDataGrid.move(20, 160);
myDataGrid.columns[7].headerText = Days Left;
myDataGrid.rowCount = myDataGrid.length;
addChild(myDataGrid);

myDataGrid.addEventListener(ListEvent.ITEM_CLICK, Click_Datagrid);

function Click_Datagrid(evt_obj:Object) {

var vDG = evt_obj.target;

   // Code to remove / delete the datagrid here


Probably something like this..

   evt_obj.currentTarget.parent.removeChild(evt_obj.currentTarget);

Paul


gotoAndStop(qualificationSummary);

}

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

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



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

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


RE: [Flashcoders] CDATA Html Text not working

2007-07-24 Thread David Ngo
Correct, but for most parsing functionality, the ones included in Flash 8
should be sufficient.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Tuesday, July 24, 2007 2:00 PM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] CDATA Html Text not working

But only a partial one, right?  That's what I understood - others have
commented on it.  I have used xfactorstudios Xpath classes instead.  AS3
takes care of it though if you can go that route.

Jason Merrill
Bank of America  
GTO Learning  Leadership Development
eTools  Multimedia Team


 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of David Ngo
Sent: Tuesday, July 24, 2007 1:55 PM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] CDATA Html Text not working

If you're using Flash 8, XPath was already integrated into 
its library/API.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf 
Of Chris W.
Paterson
Sent: Tuesday, July 24, 2007 1:44 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] CDATA Html Text not working

Great!  That works!  Thanks so much!!

I'll look into that XPath... Maybe not for this project since 
it's on a tight deadline, but for the future!

Thanks!
Chris

--- Alan MacDougall [EMAIL PROTECTED] wrote:

 Chris W. Paterson wrote:
  
this.firstChild.childNodes[i].firstChild.childNodes[j].childNodes;--
  -
this is how I am trying
 to
  access the content of that node.
 
  First off, I'm guessing I should use .nodeValue?  Will 
that give me 
  the
entire node with
  ![CDATA[]]?  Is it even possible to read the html 
value for html
text?

 
 Yep, there's the problem. The content of an XML node is a node in 
 itself
 -- it's just a text node. It looks like this:
 
 foomy text/foo
 
 foo -- part of node A
 my text -- node B
 /foo -- part of node A
 
 
 So to get the text inside that foo tag, let's say we have:
 
 var fooNode:XMLNode;
 var textNode:XMLNode = fooNode.firstChild; var myText:String = 
 textNode.nodeValue; myTextField.htmlText = myText; // now it should 
 look right
 
 As you can see, the child node of foo is an XMLNode which 
contains 
 the text -- it's not the string itself. I've used CDATA in 
XML plenty 
 of times, and your HTML text fields will interpret the HTML 
as long as 
 you're getting the string value of the text node.
 
 As for all that confusing child.firstChild.childNodes[n].child 
 business, may I suggest XFactorStudios' excellent XPath 
implementation?
 www.xfactorstudio.com -- and then you can specify your XML 
with simple 
 syntax like this:
 
 // gets an Array of XMLNodes; specifically, all bar 
inside a foo, 
 starting from rootNode var nodes:Array = 
XPath.selectNodes(rootNode, 
 foo/bar);
 
 It's a less confusing than manually walking the XML tree, 
and allows 
 some pretty complex searches once you really get into it. ( 
 http://www.w3.org/TR/xpath is very dense, but section 2 may 
give you 
 an example of XPath's power.)
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training 
 http://www.figleaf.com http://training.figleaf.com
 



 



   
__
__

Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mailp=summer+activit
ies+for+kidsc
s=bz 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

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

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

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

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

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

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

Re: [Flashcoders] CDATA Html Text not working

2007-07-24 Thread Chris W. Paterson
Great!  That works!  Thanks so much!!

I'll look into that XPath... Maybe not for this project since it's on a tight 
deadline, but for
the future!

Thanks!
Chris

--- Alan MacDougall [EMAIL PROTECTED] wrote:

 Chris W. Paterson wrote:
  this.firstChild.childNodes[i].firstChild.childNodes[j].childNodes;--- this 
  is how I am trying
 to
  access the content of that node.
 
  First off, I'm guessing I should use .nodeValue?  Will that give me the 
  entire node with
  ![CDATA[]]?  Is it even possible to read the html value for html text?

 
 Yep, there's the problem. The content of an XML node is a node in itself 
 -- it's just a text node. It looks like this:
 
 foomy text/foo
 
 foo -- part of node A
 my text -- node B
 /foo -- part of node A
 
 
 So to get the text inside that foo tag, let's say we have:
 
 var fooNode:XMLNode;
 var textNode:XMLNode = fooNode.firstChild;
 var myText:String = textNode.nodeValue;
 myTextField.htmlText = myText; // now it should look right
 
 As you can see, the child node of foo is an XMLNode which contains the 
 text -- it's not the string itself. I've used CDATA in XML plenty of 
 times, and your HTML text fields will interpret the HTML as long as 
 you're getting the string value of the text node.
 
 As for all that confusing child.firstChild.childNodes[n].child business, 
 may I suggest XFactorStudios' excellent XPath implementation? 
 www.xfactorstudio.com -- and then you can specify your XML with simple 
 syntax like this:
 
 // gets an Array of XMLNodes; specifically, all bar inside a foo, 
 starting from rootNode
 var nodes:Array = XPath.selectNodes(rootNode, foo/bar);
 
 It's a less confusing than manually walking the XML tree, and allows 
 some pretty complex searches once you really get into it. ( 
 http://www.w3.org/TR/xpath is very dense, but section 2 may give you an 
 example of XPath's power.)
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com
 



 



   

Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidscs=bz
 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] CDATA Html Text not working

2007-07-24 Thread Peter Hall

The xpath library included with Flash 8 is really quite basic, as it
is the bare minimum for generated paths for databinding purposes. It
only permits abbreviated syntax (though this is fine and preferable
most of the time), doesn't support any axes other than child (e.g.
you can't do a//b or a/../c), and only supports position filtering in
predicates. (e.g. you can do x/y[1], but you can't do x/y[last()]).

XFactorStudio's XPath is complete (or at least I haven't found
anything that wasn't supported).

If you need XPath for an AS3 (or Flex 2/3) project, I have written a
library, xpath-as3, which is also a complete implementation.
http://code.google.com/p/xpath-as3

Peter


On 7/24/07, David Ngo [EMAIL PROTECTED] wrote:

Correct, but for most parsing functionality, the ones included in Flash 8
should be sufficient.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Tuesday, July 24, 2007 2:00 PM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] CDATA Html Text not working

But only a partial one, right?  That's what I understood - others have
commented on it.  I have used xfactorstudios Xpath classes instead.  AS3
takes care of it though if you can go that route.

Jason Merrill
Bank of America
GTO Learning  Leadership Development
eTools  Multimedia Team




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of David Ngo
Sent: Tuesday, July 24, 2007 1:55 PM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] CDATA Html Text not working

If you're using Flash 8, XPath was already integrated into
its library/API.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Chris W.
Paterson
Sent: Tuesday, July 24, 2007 1:44 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] CDATA Html Text not working

Great!  That works!  Thanks so much!!

I'll look into that XPath... Maybe not for this project since
it's on a tight deadline, but for the future!

Thanks!
Chris

--- Alan MacDougall [EMAIL PROTECTED] wrote:

 Chris W. Paterson wrote:
 
this.firstChild.childNodes[i].firstChild.childNodes[j].childNodes;--
  -
this is how I am trying
 to
  access the content of that node.
 
  First off, I'm guessing I should use .nodeValue?  Will
that give me
  the
entire node with
  ![CDATA[]]?  Is it even possible to read the html
value for html
text?
 

 Yep, there's the problem. The content of an XML node is a node in
 itself
 -- it's just a text node. It looks like this:

 foomy text/foo

 foo -- part of node A
 my text -- node B
 /foo -- part of node A


 So to get the text inside that foo tag, let's say we have:

 var fooNode:XMLNode;
 var textNode:XMLNode = fooNode.firstChild; var myText:String =
 textNode.nodeValue; myTextField.htmlText = myText; // now it should
 look right

 As you can see, the child node of foo is an XMLNode which
contains
 the text -- it's not the string itself. I've used CDATA in
XML plenty
 of times, and your HTML text fields will interpret the HTML
as long as
 you're getting the string value of the text node.

 As for all that confusing child.firstChild.childNodes[n].child
 business, may I suggest XFactorStudios' excellent XPath
implementation?
 www.xfactorstudio.com -- and then you can specify your XML
with simple
 syntax like this:

 // gets an Array of XMLNodes; specifically, all bar
inside a foo,
 starting from rootNode var nodes:Array =
XPath.selectNodes(rootNode,
 foo/bar);

 It's a less confusing than manually walking the XML tree,
and allows
 some pretty complex searches once you really get into it. (
 http://www.w3.org/TR/xpath is very dense, but section 2 may
give you
 an example of XPath's power.)

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

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









__
__

Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mailp=summer+activit
ies+for+kidsc
s=bz
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

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

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

[Flashcoders] Flash 8 exception handling

2007-07-24 Thread Alan MacDougall
Okay, here's one for you. I extended Error with a very simple specific 
error type, like this:


class com.mycompany.exceptions.InvalidPathFormatException extends Error
{
   public function InvalidPathFormatException(message:String)
   {
  if (message != null)
  {
 this.message = message;
  }
  else
  {
 this.message = General message for this error type.;
  }
   }
}


Now I try to use it with a method like this:

/**
   Does stuff.

   @throws InvalidPathFormatException
*/
public function doSomeStuff():Void
{
   if (anErrorOccurs)
   {
  throw new InvalidPathFormatException(error message);
   }
}


I call this method like this:

try
{
   doSomeStuff();
}
catch (e:InvalidPathFormatException)
{
   trace(caught the specific error);
}
catch (e:Error)
{
   trace(caught a generic error);
}


This looks completely straightforward and identical to Java... but when 
I do it, it catches the generic error. Now, obviously an Error instance 
is getting caught, which means one is getting thrown, which means my 
InvalidPathFormatException IS being recognized as a subclass of Error! 
It's just not getting caught by the right block! And it's not a priority 
thing, because if I omit the catch block for e:Error, I don't catch 
anything at all (but I DO get debug output of the string Error).


Now, I think I'm doing this right -- I've done it in Java, and Colin 
Moock's book confirms that it's the same in Flash. What am I missing 
here? (All my exception classes are properly defined and imported or I'd 
be getting compile errors instead.)


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

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


[Flashcoders] Displacement Map with mcs

2007-07-24 Thread eric e. dolecki

I started coding up a little sniper scope thing.

bmp on the stage of the scene.
a larger bmp pulled out and used with a displacement map/mask to simulate
the magnified sniper scope with some displacement around the edges of the
scope occular thing.

However I'd like to have mcs on the stage to show up in the scope as well
(enemies)... i haven't seen anything like this yet, or perhaps i need to
redo my code to make things work properly.

anyone have demo code or somethign that shows this effect in action?

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

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


Re: [Flashcoders] Returning a String fails

2007-07-24 Thread Paul Andrews
Haven't tested it but where you call eliminateSpaces inside the function, 
you don't save the result...


- Original Message - 
From: Mendelsohn, Michael [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Tuesday, July 24, 2007 9:22 PM
Subject: [Flashcoders] Returning a String fails


Hi list...

I've written a simple routine to eliminate spaces from a user entered
string.  But, it won't return the string.  I'm sure it's something
silly.  Can anyone shed light?

- MM


function eliminateSpaces(phrase:String):String {
var foundSpace = phrase.indexOf( );
if (foundSpace != -1) {
phrase = String(phrase.substring(0, foundSpace) +
phrase.substring(foundSpace + 1));
if (phrase.indexOf( ) != -1) {
eliminateSpaces(phrase);
} else {
trace(output:  + phrase);
return phrase;
}
}
}
var s:String = eliminateSpaces(moe and larry and curly);
trace(s);

/* RESULT:

output: moeandlarryandcurly
Undefined

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

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

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

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


[Flashcoders] Rotating, skewing and coloring TextFields using device fonts.

2007-07-24 Thread strk
Hi all, I'd like to gather some opinions reguarding compatibility between
Gnash and the proprietary players.

Current Gnash development version is able to handle device fonts exactly in
the same way as embedded fonts are handled. This means you can rotate, skew,
colorize each component and everything will work.

Do flash coders consider this as an advantage or a compatibility warning ?
(or both)

Also, I've been reported that *some* proprietary player versions handle
this differently in different architecture flavors (like _alpha being 
misreguarded
but borderColor and backgroundColor being honoured). Can anyone confirm ?

--strk;


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

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


Re: [Flashcoders] Returning a String fails

2007-07-24 Thread R�kos Attila

You should rethink what you are doing :) If the string passed contains
more than 1 space, your function will not return anything. Do you see
a return statement here?

if (phrase.indexOf( ) != -1) {
  eliminateSpaces(phrase);
}

Well, and the whole function seems to be an overkill, you can reach
the same result with a single line:

phrase = phrase.split( ).join();

  Attila

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From:Mendelsohn, Michael [EMAIL PROTECTED]
To:  flashcoders@chattyfig.figleaf.com flashcoders@chattyfig.figleaf.com
Date:Tuesday, July 24, 2007, 10:22:06 PM
Subject: [Flashcoders] Returning a String fails
--===--
Hi list...

I've written a simple routine to eliminate spaces from a user entered
string.  But, it won't return the string.  I'm sure it's something
silly.  Can anyone shed light?

- MM


function eliminateSpaces(phrase:String):String {
var foundSpace = phrase.indexOf( );
if (foundSpace != -1) {
phrase = String(phrase.substring(0, foundSpace) +
phrase.substring(foundSpace + 1));
if (phrase.indexOf( ) != -1) {
eliminateSpaces(phrase);
} else {
trace(output:  + phrase);
return phrase;
}
}
}
var s:String = eliminateSpaces(moe and larry and curly);
trace(s);

/* RESULT:

output: moeandlarryandcurly
Undefined

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

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

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

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


Re: [Flashcoders] Returning a String fails

2007-07-24 Thread Pedro Taranto
you forgot to put a 'return' statement where you call 
eliminateSpaces(phrase)


--
Pedro Taranto

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

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


[Flashcoders] Returning a String fails

2007-07-24 Thread Mendelsohn, Michael
Hi list...

I've written a simple routine to eliminate spaces from a user entered
string.  But, it won't return the string.  I'm sure it's something
silly.  Can anyone shed light?

- MM


function eliminateSpaces(phrase:String):String {
var foundSpace = phrase.indexOf( );
if (foundSpace != -1) {
phrase = String(phrase.substring(0, foundSpace) +
phrase.substring(foundSpace + 1));
if (phrase.indexOf( ) != -1) {
eliminateSpaces(phrase);
} else {
trace(output:  + phrase);
return phrase;
}
}
}
var s:String = eliminateSpaces(moe and larry and curly);
trace(s);

/* RESULT:

output: moeandlarryandcurly
Undefined

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

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


[Flashcoders] WDDX library

2007-07-24 Thread Josh Ettwein
This is a bit of an oddball request, but a long time ago, Branden  
Hall wrote a WDDX library in AS1 and I think Jobe Makar had written  
an AS2 port of it. Anyone know where I can get Jobe's version? Thanks!


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

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


RE: [Flashcoders] Returning a String fails

2007-07-24 Thread David Ngo
I'd probably still put it in some sort of util function you can call
anywhere.


function eliminateSpaces(phrase:String):String
{
return phrase.split(' ').join('');
}

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rákos Attila
Sent: Tuesday, July 24, 2007 4:35 PM
To: Mendelsohn, Michael
Subject: Re: [Flashcoders] Returning a String fails


You should rethink what you are doing :) If the string passed contains
more than 1 space, your function will not return anything. Do you see
a return statement here?

if (phrase.indexOf( ) != -1) {
  eliminateSpaces(phrase);
}

Well, and the whole function seems to be an overkill, you can reach
the same result with a single line:

phrase = phrase.split( ).join();

  Attila

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=
From:Mendelsohn, Michael [EMAIL PROTECTED]
To:  flashcoders@chattyfig.figleaf.com
flashcoders@chattyfig.figleaf.com
Date:Tuesday, July 24, 2007, 10:22:06 PM
Subject: [Flashcoders] Returning a String fails
--==
=--
Hi list...

I've written a simple routine to eliminate spaces from a user entered
string.  But, it won't return the string.  I'm sure it's something
silly.  Can anyone shed light?

- MM


function eliminateSpaces(phrase:String):String {
var foundSpace = phrase.indexOf( );
if (foundSpace != -1) {
phrase = String(phrase.substring(0, foundSpace) +
phrase.substring(foundSpace + 1));
if (phrase.indexOf( ) != -1) {
eliminateSpaces(phrase);
} else {
trace(output:  + phrase);
return phrase;
}
}
}
var s:String = eliminateSpaces(moe and larry and curly);
trace(s);

/* RESULT:

output: moeandlarryandcurly
Undefined

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

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

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

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

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

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


[Flashcoders] AS3 - how do i find the path to where a MC belongs?

2007-07-24 Thread quinrou .

Hi all,

I am wondering how can I manage to find the path to where a MC belongs?

in AS2 when you wanted the target to where the MC was all you had to do was
to trace the movieclip instance. For instance cosider the following example:

var mc:MovieClip = this.attachMovie(something , something0 , 0);
var mc = mc.something0.attachMovie(somethingelse , somethingelse0 , 0);
trace(mc) // _level0.something0.somethingelse0


In AS3 since everything is a class everytime I trace an object i get its
class name.

So is there anyway of know the tree to where a mc belongs?

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

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


Re: [Flashcoders] Rotating, skewing and coloring TextFields using device fonts.

2007-07-24 Thread David Rorex

Personally I think you should keep it as compatible as possible. Otherwise,
someone might develop a SWF, only checking against gnash, and not realize
that it doesn't work correctly in the official player (which the majority of
users will be using). This means that gnash would not be as useful for
developing, since you'd need to doublecheck against the official player all
the time. My opinion is that extra functionality or changed functionality is
much worse than missing functionality.

-David R

On 7/24/07, strk [EMAIL PROTECTED] wrote:


Hi all, I'd like to gather some opinions reguarding compatibility between
Gnash and the proprietary players.

Current Gnash development version is able to handle device fonts exactly
in
the same way as embedded fonts are handled. This means you can rotate,
skew,
colorize each component and everything will work.

Do flash coders consider this as an advantage or a compatibility warning ?
(or both)

Also, I've been reported that *some* proprietary player versions handle
this differently in different architecture flavors (like _alpha being
misreguarded
but borderColor and backgroundColor being honoured). Can anyone confirm ?

--strk;


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

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


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

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


Re: [Flashcoders] AS3 Events

2007-07-24 Thread Muzak
an A instance should have a property that holds the contextInfo value.

class B {

   function loadSomethingAndProcessIt(url:String, contextInfo:Object):void {
 var a:A = new A();
 a.contextInfo = contectInfo;
 a.addEventListener(Event.COMPLETE,onALoaded);
 a.loadSomething(url);
   }

   function onALoaded(event:Event):void {
  var a:A = event.currentTarget as A;
  trace(a.contextInfo);
   }

}

regards,
Muzak

- Original Message - 
From: Ian Thomas [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Tuesday, July 24, 2007 6:12 PM
Subject: [Flashcoders] AS3 Events


 Hi all,
  I'm in the process of converting a quite extensive code framework
 from AS2 to AS3, and I've got a 'how do you cope with this situation?'
 question.

  I understand events, event listeners, EventDispatcher etc., but I'm
 missing a trick somewhere (probably from my historical use of Delegate
 with additional params).

 Say we have object A, which supports the following:

 A.addEventListener(type:String,handler:Function);
 A.loadSomething(url:String); // Dispatches Event.COMPLETE when done

 and object B wraps it and wants to do something context specific once
 A has finished loading:

 (pseudo-AS3!)

 class B
 {
 :
   function addEventListener(/as per usual/);

   // Dispatches MyEvent.ITSOVERWITH when done
   function loadSomethingAndProcessIt(url:String,contextInfo:Object):void
   {
  var a:A=new A();
  a.addEventListener(Event.COMPLETE,onALoaded);
  a.loadSomething(url);
   }

   function onALoaded(event:Event):void
   {
  var a:A=A(event.target);
   // Process the results of A being loaded
   // : blah
   // then:
  dispatchEvent(new MyEvent(MyEvent.ITSOVERWITH,someDataIGotFromA));
   }
 }

 It doesn't really matter what events either are firing; what does matter is 
 that
 calling loadSomethingAndProcessIt() is both asynchronous and atomic
 i.e. multiple loadSomethingAndProcessIt() calls could be running at
 the same time on the same B.

 What I'm trying to do is to find a sane, 'generally accepted' way to
 get information from loadSomethingAndProcessIt() to onALoaded()
 without A being aware of it at all. So to access the contextInfo
 variable from within onALoaded().

 What I'd have done in AS2 is to use an extended Delegate (or Proxy) -
 the listener would have been:

 a.addEventListener(Event.COMPLETE,Delegate.create(this,onALoaded,contextInfo));

 Which works fine.

 Now, I've written the equivalent of that sort of Delegate/Proxy for
 AS3, and it works perfectly well and does the trick. However, that
 method appears to be Frowned Upon by the community, for reasons which
 escape me. So I guess my question is:

 - Why, in AS3, is my equivalent of using Delegate Not The Done Thing?
 (Someone mentioned type-safety; and yes, at compile time, you'll lose
 type safety)
 - How else would you do it? What's the 'standard' approach?

 This situation comes up a lot - really, a huge number of times - in
 our code frameworks. This may be because they take the wrong approach
 - perhaps I can't see the wood for the trees.

 For clarity, we can't just store contextInfo inside B, as there may be
 multiple requests. We could conceivably store a look up table in B
 with various contextInfos tied to varies requests to A, but that's
 just overkill.

 Thoughts?

 Ian


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

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


Re: [Flashcoders] AS3 - how do i find the path to where a MC belongs?

2007-07-24 Thread eka

Hello :)

in AS3 i don't find a native method ?

For the moment you can test :

package
{

   import flash.display.* ;

   public class test extends Sprite
   {

   /**
* Creates a new test instance.
*/
   public function test()
   {

   var container:Sprite = new Sprite() ;

   var container2:Sprite = new Sprite() ;
   container2.graphics.beginFill(0xFF, 1) ;
   container2.graphics.drawCircle(0, 0, 150) ;

   addChild(container) ;
   container.addChild(container2) ;

   var target:String = getDisplayPathName(container2) ;

   trace( target ) ;

   }

   static public function getDisplayPathName( display:DisplayObject
):String
   {

   var parents:Array = [] ;
   var parent:* = display ;

   while( true )
   {
   parents.push( parent.name ) ;
   parent = parent.parent ;
   if (parent.name == null)
   {
   break ;
   }
   }

   parents.reverse() ;

   return parents.join( . ) ;

   }

}

but it's not the better solution lol

eKA+ :)

2007/7/24, quinrou . [EMAIL PROTECTED]:


Hi all,

I am wondering how can I manage to find the path to where a MC belongs?

in AS2 when you wanted the target to where the MC was all you had to do
was
to trace the movieclip instance. For instance cosider the following
example:

var mc:MovieClip = this.attachMovie(something , something0 , 0);
var mc = mc.something0.attachMovie(somethingelse , somethingelse0 ,
0);
trace(mc) // _level0.something0.somethingelse0


In AS3 since everything is a class everytime I trace an object i get its
class name.

So is there anyway of know the tree to where a mc belongs?

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

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


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

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


RE: [Flashcoders] WDDX library

2007-07-24 Thread Palmer, Jim

Seeing as I could find this useful myself, I found it...

http://actionscript.codefetch.com/example/8v/Lesson12/Assets/Wddx.as?qy=XML

That's the one from Jobe Makar

--
Jim Palmer ! Mammoth Web Operations


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Josh
 Ettwein
 Sent: Tuesday, July 24, 2007 1:47 PM
 To: flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] WDDX library
 
 
 This is a bit of an oddball request, but a long time ago, Branden  
 Hall wrote a WDDX library in AS1 and I think Jobe Makar had written  
 an AS2 port of it. Anyone know where I can get Jobe's version? Thanks!
 
 Josh
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com
 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] AS3 Events

2007-07-24 Thread Ian Thomas

Muzak,
 Thanks for that.

 But to me, that breaks encapsulation - it assumes that A _knows_ it
might be used in such a manner. What if you're writing to an API which
doesn't?

 One of my stated requirements - as above - would be to achieve this
without A having to be modified/aware of it's potential usages.

 Also - you could indeed create a contextInfo field on A, which would
be an anonymous object (i.e. typed as Object or *, because A shouldn't
know what that field is to be used for). But then that breaks
type-safety (which is the same argument as people have used for not
using a Delegate equivalent) and also, it means that you can only have
one request at a time running through A.

 So - yes, your solution would solve the specific instance I gave, if
I had control of A. But it doesn't solve the general situation for all
cases, I'm afraid. I'm looking for a 'how are these things normally
handled' solution that'll apply generally.

Ian

On 7/24/07, Muzak [EMAIL PROTECTED] wrote:

an A instance should have a property that holds the contextInfo value.

class B {

   function loadSomethingAndProcessIt(url:String, contextInfo:Object):void {
 var a:A = new A();
 a.contextInfo = contectInfo;
 a.addEventListener(Event.COMPLETE,onALoaded);
 a.loadSomething(url);
   }

   function onALoaded(event:Event):void {
  var a:A = event.currentTarget as A;
  trace(a.contextInfo);
   }

}

regards,
Muzak

- Original Message -
From: Ian Thomas [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Tuesday, July 24, 2007 6:12 PM
Subject: [Flashcoders] AS3 Events


 Hi all,
  I'm in the process of converting a quite extensive code framework
 from AS2 to AS3, and I've got a 'how do you cope with this situation?'
 question.

  I understand events, event listeners, EventDispatcher etc., but I'm
 missing a trick somewhere (probably from my historical use of Delegate
 with additional params).

 Say we have object A, which supports the following:

 A.addEventListener(type:String,handler:Function);
 A.loadSomething(url:String); // Dispatches Event.COMPLETE when done

 and object B wraps it and wants to do something context specific once
 A has finished loading:

 (pseudo-AS3!)

 class B
 {
 :
   function addEventListener(/as per usual/);

   // Dispatches MyEvent.ITSOVERWITH when done
   function loadSomethingAndProcessIt(url:String,contextInfo:Object):void
   {
  var a:A=new A();
  a.addEventListener(Event.COMPLETE,onALoaded);
  a.loadSomething(url);
   }

   function onALoaded(event:Event):void
   {
  var a:A=A(event.target);
   // Process the results of A being loaded
   // : blah
   // then:
  dispatchEvent(new MyEvent(MyEvent.ITSOVERWITH,someDataIGotFromA));
   }
 }

 It doesn't really matter what events either are firing; what does matter is 
that
 calling loadSomethingAndProcessIt() is both asynchronous and atomic
 i.e. multiple loadSomethingAndProcessIt() calls could be running at
 the same time on the same B.

 What I'm trying to do is to find a sane, 'generally accepted' way to
 get information from loadSomethingAndProcessIt() to onALoaded()
 without A being aware of it at all. So to access the contextInfo
 variable from within onALoaded().

 What I'd have done in AS2 is to use an extended Delegate (or Proxy) -
 the listener would have been:

 
a.addEventListener(Event.COMPLETE,Delegate.create(this,onALoaded,contextInfo));

 Which works fine.

 Now, I've written the equivalent of that sort of Delegate/Proxy for
 AS3, and it works perfectly well and does the trick. However, that
 method appears to be Frowned Upon by the community, for reasons which
 escape me. So I guess my question is:

 - Why, in AS3, is my equivalent of using Delegate Not The Done Thing?
 (Someone mentioned type-safety; and yes, at compile time, you'll lose
 type safety)
 - How else would you do it? What's the 'standard' approach?

 This situation comes up a lot - really, a huge number of times - in
 our code frameworks. This may be because they take the wrong approach
 - perhaps I can't see the wood for the trees.

 For clarity, we can't just store contextInfo inside B, as there may be
 multiple requests. We could conceivably store a look up table in B
 with various contextInfos tied to varies requests to A, but that's
 just overkill.

 Thoughts?

 Ian


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

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


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

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and 

Re: [Flashcoders] Rotating, skewing and coloring TextFields using device fonts.

2007-07-24 Thread Zeh Fernando

Hi all, I'd like to gather some opinions reguarding compatibility between
Gnash and the proprietary players.
Current Gnash development version is able to handle device fonts exactly in
the same way as embedded fonts are handled. This means you can rotate, skew,
colorize each component and everything will work.
Do flash coders consider this as an advantage or a compatibility warning ?
(or both)


Personally, while it IS a better feature, I'd consider it a 
compatibility problem. Having someone take advantage of a Gnash feature 
not present on the regular player is as much of a problem as the other 
way around (although that is the case now); and it risks having two very 
different versions with different features, instead of just a version 
with less features. I'm not sure if different branches is what would 
make Gnash/open source players popular.


Just as a side note, textfields rendered with device fonts can be 
'captured' by way of BitmapData instances and manipulated as an image, 
so on most aspects, they can still be manipulated although you'd need a 
few more steps for that (and Flash Player 8+).




Also, I've been reported that *some* proprietary player versions handle
this differently in different architecture flavors (like _alpha being 
misreguarded
but borderColor and backgroundColor being honoured). Can anyone confirm ?


I haven't tested these properties specifically, but I think they do 
work. Plus they can have filters (Flash 8+ feature) applied to force 
antialias. So yes, it's a bit confusing.



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

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


Re: [Flashcoders] AS3 - how do i find the path to where a MC belongs?

2007-07-24 Thread eric e. dolecki

http://www.kirupa.com/forum/showthread.php?p=1935107


On 7/24/07, eka [EMAIL PROTECTED] wrote:


Hello :)

in AS3 i don't find a native method ?

For the moment you can test :

package
{

import flash.display.* ;

public class test extends Sprite
{

/**
 * Creates a new test instance.
 */
public function test()
{

var container:Sprite = new Sprite() ;

var container2:Sprite = new Sprite() ;
container2.graphics.beginFill(0xFF, 1) ;
container2.graphics.drawCircle(0, 0, 150) ;

addChild(container) ;
container.addChild(container2) ;

var target:String = getDisplayPathName(container2) ;

trace( target ) ;

}

static public function getDisplayPathName( display:DisplayObject
):String
{

var parents:Array = [] ;
var parent:* = display ;

while( true )
{
parents.push( parent.name ) ;
parent = parent.parent ;
if (parent.name == null)
{
break ;
}
}

parents.reverse() ;

return parents.join( . ) ;

}

}

but it's not the better solution lol

eKA+ :)

2007/7/24, quinrou . [EMAIL PROTECTED]:

 Hi all,

 I am wondering how can I manage to find the path to where a MC belongs?

 in AS2 when you wanted the target to where the MC was all you had to do
 was
 to trace the movieclip instance. For instance cosider the following
 example:

 var mc:MovieClip = this.attachMovie(something , something0 , 0);
 var mc = mc.something0.attachMovie(somethingelse , somethingelse0 ,
 0);
 trace(mc) // _level0.something0.somethingelse0


 In AS3 since everything is a class everytime I trace an object i get its
 class name.

 So is there anyway of know the tree to where a mc belongs?

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

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

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

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


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

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


Re: [Flashcoders] AS3 Events

2007-07-24 Thread Muzak
Well, alot depends on the context of the whole thing (the bigger picture).
If contextInfo isn't used/part of class A or B, it shouldn't even be there.

But since you said:
 object B wraps it and wants to do something context specific once
 A has finished loading

Then contextInfo should probably be a property of A or B.
IMO that doesn't break encapsulation but rather enforces it.

regards,
Muzak

- Original Message - 
From: Ian Thomas [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, July 25, 2007 12:19 AM
Subject: Re: [Flashcoders] AS3 Events


 Muzak,
  Thanks for that.

  But to me, that breaks encapsulation - it assumes that A _knows_ it
 might be used in such a manner. What if you're writing to an API which
 doesn't?

  One of my stated requirements - as above - would be to achieve this
 without A having to be modified/aware of it's potential usages.

  Also - you could indeed create a contextInfo field on A, which would
 be an anonymous object (i.e. typed as Object or *, because A shouldn't
 know what that field is to be used for). But then that breaks
 type-safety (which is the same argument as people have used for not
 using a Delegate equivalent) and also, it means that you can only have
 one request at a time running through A.

  So - yes, your solution would solve the specific instance I gave, if
 I had control of A. But it doesn't solve the general situation for all
 cases, I'm afraid. I'm looking for a 'how are these things normally
 handled' solution that'll apply generally.

 Ian

 On 7/24/07, Muzak [EMAIL PROTECTED] wrote:
 an A instance should have a property that holds the contextInfo value.

 class B {

function loadSomethingAndProcessIt(url:String, contextInfo:Object):void {
  var a:A = new A();
  a.contextInfo = contectInfo;
  a.addEventListener(Event.COMPLETE,onALoaded);
  a.loadSomething(url);
}

function onALoaded(event:Event):void {
   var a:A = event.currentTarget as A;
   trace(a.contextInfo);
}

 }

 regards,
 Muzak

 - Original Message -
 From: Ian Thomas [EMAIL PROTECTED]
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Sent: Tuesday, July 24, 2007 6:12 PM
 Subject: [Flashcoders] AS3 Events


  Hi all,
   I'm in the process of converting a quite extensive code framework
  from AS2 to AS3, and I've got a 'how do you cope with this situation?'
  question.
 
   I understand events, event listeners, EventDispatcher etc., but I'm
  missing a trick somewhere (probably from my historical use of Delegate
  with additional params).
 
  Say we have object A, which supports the following:
 
  A.addEventListener(type:String,handler:Function);
  A.loadSomething(url:String); // Dispatches Event.COMPLETE when done
 
  and object B wraps it and wants to do something context specific once
  A has finished loading:
 
  (pseudo-AS3!)
 
  class B
  {
  :
function addEventListener(/as per usual/);
 
// Dispatches MyEvent.ITSOVERWITH when done
function loadSomethingAndProcessIt(url:String,contextInfo:Object):void
{
   var a:A=new A();
   a.addEventListener(Event.COMPLETE,onALoaded);
   a.loadSomething(url);
}
 
function onALoaded(event:Event):void
{
   var a:A=A(event.target);
// Process the results of A being loaded
// : blah
// then:
   dispatchEvent(new MyEvent(MyEvent.ITSOVERWITH,someDataIGotFromA));
}
  }
 
  It doesn't really matter what events either are firing; what does matter 
  is that
  calling loadSomethingAndProcessIt() is both asynchronous and atomic
  i.e. multiple loadSomethingAndProcessIt() calls could be running at
  the same time on the same B.
 
  What I'm trying to do is to find a sane, 'generally accepted' way to
  get information from loadSomethingAndProcessIt() to onALoaded()
  without A being aware of it at all. So to access the contextInfo
  variable from within onALoaded().
 
  What I'd have done in AS2 is to use an extended Delegate (or Proxy) -
  the listener would have been:
 
  a.addEventListener(Event.COMPLETE,Delegate.create(this,onALoaded,contextInfo));
 
  Which works fine.
 
  Now, I've written the equivalent of that sort of Delegate/Proxy for
  AS3, and it works perfectly well and does the trick. However, that
  method appears to be Frowned Upon by the community, for reasons which
  escape me. So I guess my question is:
 
  - Why, in AS3, is my equivalent of using Delegate Not The Done Thing?
  (Someone mentioned type-safety; and yes, at compile time, you'll lose
  type safety)
  - How else would you do it? What's the 'standard' approach?
 
  This situation comes up a lot - really, a huge number of times - in
  our code frameworks. This may be because they take the wrong approach
  - perhaps I can't see the wood for the trees.
 
  For clarity, we can't just store contextInfo inside B, as there may be
  multiple requests. We could conceivably store a look up table in B
  with various 

Re: [Flashcoders] Rotating, skewing and coloring TextFields using device fonts.

2007-07-24 Thread strk
On Tue, Jul 24, 2007 at 07:22:20PM -0300, Zeh Fernando wrote:

 Just as a side note, textfields rendered with device fonts can be 
 'captured' by way of BitmapData instances and manipulated as an image, 
 so on most aspects, they can still be manipulated although you'd need a 
 few more steps for that (and Flash Player 8+).

Can this be done with embedded fonts too ?

 Also, I've been reported that *some* proprietary player versions handle
 this differently in different architecture flavors (like _alpha being 
 misreguarded
 but borderColor and backgroundColor being honoured). Can anyone confirm ?
 
 I haven't tested these properties specifically, but I think they do 
 work.

It has been reported that they do NOT work with LNX 9,0,31,0 (Adobe's)
Does it have to be considered a bug or is it known practice among flash
coders to switch code based on some sort of versioning ?

This is not the first case of such incompatibility between versions
of Adobe players - take a look at http://gnashdev.org/wiki/index.php/Testcases
and see if you find other failures (a few are listed, for example for
the Number test).

 Plus they can have filters (Flash 8+ feature) applied to force 
 antialias. So yes, it's a bit confusing.

Gnash also support antialias for device fonts for free (another problem ?)

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

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


Re: [Flashcoders] Returning a String fails

2007-07-24 Thread Jordan L. Chilcott
Aside from the fact that this is not as simple a method as doing a  
String.split() and then joining each array element, your method  
didn't keep the return value after each recursion. I added a local  
var for clarity.


function eliminateSpaces(phrase:String):String {
var testString:String = phrase;
var finalResult:String;

var foundSpace = testString.indexOf( );
if (foundSpace != -1) {
testString = String(testString.substring(0, foundSpace) +
testString.substring(foundSpace + 1));
if (testString.indexOf( ) != -1) {
testString = eliminateSpaces(testString);
} else {
trace(output:  + testString);
}
}
return testString;
}
var s:String = eliminateSpaces(moe and larry and curly);
trace(s);

jord

On Jul 24, 2007, at 4:22 PM, Mendelsohn, Michael wrote:


I've written a simple routine to eliminate spaces from a user entered
string.  But, it won't return the string.  I'm sure it's something
silly.  Can anyone shed light?




Jordan L. Chilcott, President
Interactivity Unlimited
Guelph, Ontario
-
Tel:  (519) 837-1879
Fax: (519) 837-8610
mailto:[EMAIL PROTECTED]
http://www.interactivityunlimited.com
iChat/AIM: j1chilcott
Skype: bear-faced-cow
SightSpeed: [EMAIL PROTECTED]

Author: Building Web Sites with Macromedia Studio MX
Author: Building Dynamic Web Sites with Macromedia Studio MX
Author: Flash Professional 8: Training From the Source
Author: Foundation Flash 8 Video


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

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


Re: [Flashcoders] Rotating, skewing and coloring TextFields using device fonts.

2007-07-24 Thread Mark Winterhalder

On 7/24/07, David Rorex [EMAIL PROTECTED] wrote:

Personally I think you should keep it as compatible as possible. Otherwise,
someone might develop a SWF, only checking against gnash, and not realize
that it doesn't work correctly in the official player (which the majority of
users will be using). This means that gnash would not be as useful for
developing, since you'd need to doublecheck against the official player all
the time. My opinion is that extra functionality or changed functionality is
much worse than missing functionality.


I agree that it should be as compatible as possible, but in this case,
I don't think that would be a problem. Where Gnash features overlap
with the Adobe player, they should behave exactly the same. But in
this case, I know the Adobe player can't rotate device fonts, so I
don't do that. If it would support it in a future version, it can be
expected that it would do it like with embedded fonts (i.e., like
Gnash), no there wouldn't be a problem, either.

Yes, somebody might test only on Gnash and not be aware of this. But I
believe those who develop for the mainstream /will/ check with the
Adobe player, most likely even testing /only/ on the Adobe player.
Those who test only with Gnash are much more likely to use it, say,
for an interface of a device or an app where Gnash will be used for
the menu. So why not give them that feature?

Another example where the situation would be the same would be video
codecs. Should Gnash be able to play all videos I have codecs for, or
just those the Adobe player can play? I'd hope that it could play all.

Ideally, of course, there would be a compatibility mode, of course,
and in the browser it should be the default setting.

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

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


[Flashcoders] Class exclusion in AS3 in Flash IDE

2007-07-24 Thread Steve Bond
Hi,

I've been looking high and low for a way to exclude class file from
compiling into a swf on publish, similar to the functionality available when
publishing AS2 apps (outlined here:
http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.h
tm?context=LiveDocs_Partsfile=0817.html).

I've found references on how to do this when compiling with the command-line
compiler (detailed here: http://www.bit-101.com/blog/?p=941), but so far
I've haven't been able to find anything that details how to do this in the
IDE.

I'm hoping someone here might have an answer. I'm going to change my
approach to a number of applications if I can't find an answer to this.

Thanks,

--Steve 

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

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


Re: [Flashcoders] Rotating, skewing and coloring TextFields using device fonts.

2007-07-24 Thread Zeh Fernando
Just as a side note, textfields rendered with device fonts can be 
'captured' by way of BitmapData instances and manipulated as an image, 
so on most aspects, they can still be manipulated although you'd need a 
few more steps for that (and Flash Player 8+).

Can this be done with embedded fonts too ?


It can, but shouldn't be needed, since that's just a workaround so 
you're able to manipulate textfields with device fonts as if they were 
normal textfields.


I've had to use that a few times when using textfields with japanese fonts.



but borderColor and backgroundColor being honoured). Can anyone confirm ?
I haven't tested these properties specifically, but I think they do 
work.

It has been reported that they do NOT work with LNX 9,0,31,0 (Adobe's)
Does it have to be considered a bug or is it known practice among flash
coders to switch code based on some sort of versioning ?


Well, it's not normal. There has been issues between versions in the 
past - specially some differences between Mac and PC - so we've had to 
decide against some practices in the past (ie, getTextExtent() return 
values). But they're rare and should be considered a bug, IMO.



Plus they can have filters (Flash 8+ feature) applied to force 
antialias. So yes, it's a bit confusing.

Gnash also support antialias for device fonts for free (another problem ?)


In this case, I'm not sure if that's a problem. The way I see it, this 
option - rendering with or without antialias - depends a lot on the 
current system and the system options in regards to screen antialasing. 
I've seen the same text with the same font be rendered with antialias on 
a Mac, and without antialias on a PC; so there's not much consistency, 
and whichever option Gnash picks would make sense... althought it'd be 
best if it could read the global OS setting related to that: for 
example, my windows PC is set with Smooth edges of screen fonts as off 
so I think the Flash player is simply respecting that.



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

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


[Flashcoders] Generating Actionscript from Flash CS3 Pro

2007-07-24 Thread Adam Duston

Dear Flashcoders,

I am an AS3 coder -- I am actually the tech lead for waves.tv (which
is lacking in features right now but still fun to use -- try it!). I
typically split my UI into View and Controller components, and I
typically make my Views as thin as possible to test my infrastructure
easily. My View classes typically inherit from Sprite and I usually
use the drawing methods of the Graphics instance exposed by Sprite to
draw on them.

I am experimenting with Flash CS3 (it's weird to me because it's way
different than coding in AS3; I typically compile using mxmlc), and I
am hoping that there is some way to draw something in Flash CS3 and
then export it as actionscript that draws using the methods of the
Graphics object exposed by the MovieClip superclass. In other words, I
would like to draw something using the Flash CS3 toolbox and then have
Flash CS3 write the associated Actionscript for me. Is there any way
to do this?

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

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