[Flashcoders] shared objects as a sort of scratch disk file

2009-09-30 Thread Anthony Pace
-Now, if the user sets the local storage amount to unlimited, it is 
possible to save and modify heaps of data; yet, at what cost speed wise?

-Is there a max size to a shared object, even if the user selects unlimited?
-Is there something wrong with my idea, other than having to ask the 
user to set the storage capacity to unlimited?
-Has anyone clocked speed of read and write access when files get 
extremely large?
-Has anyone come up with a better solution when the app has to run in 
the browser?


I worked with shared objects a while back; however, I never really 
needed to use them to store much more than cookie data.  I am thinking 
about asking the user to set the local storage to unlimited, in an 
attempt to decrease the amount of memory that is required by an 
application, especially when it gets to the 40mb or more of dynamically 
generated content and the user has limited memory on their system.  The 
user needs to be able to load multiple files to be modified, and the 
modifications could be rather intense and have very large file sizes; 
yet, not all files and resultant data will be required for modification 
at the same time, and I was hoping that storage on the system as a 
shared object, would be able to act as a scratch file.


I know this isn't new, but I was also thinking that if the file is used 
properly, and storage is set to unlimited, one could make an application 
with most of the interface elements stored in the shared object; 
therefore, even if the user clears their cache, the swf can check the 
shared object to see when it was last updated and reuse what's stored if 
nothing has changed.  (reducing bandwidth and download time 
requirements)...  Is this a pipe dream?

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


[Flashcoders] floating wordpress blog within a swf?

2009-09-30 Thread thomas horner
 

Is it possible to have a wordpress blog floating within a swf? or something
as to that effect, 

 

it would be nice to keep the viewer at the site rather then redirecting them
to a new window, is this possible?

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


Re: [Flashcoders] floating wordpress blog within a swf?

2009-09-30 Thread Glen Pike

Hi,

   You can't easily display the HTML from the blog inside Flash, but 
you can do a couple of things:


   Load the RSS feed of the blog into your Flash as XML and display it 
in a text field.  You can display simple text content from the blog, 
but any fancy formatting and other stuff may be lost.
   However, once you have the RSS you can parse the content XML and 
extract any media links etc. and show them as you wish.


   Another way to do it is to use one of the API's that people have 
created to join Wordpress up-to Flash.  There is an AMFPHP based one - 
http://code.google.com/p/awi/ - which lets you load posts and post meta 
data from the database as serialized data.  Not sure how well this 
works, but if you were to use that, you can have more fine grained 
control over displaying your content, etc.


   I have a simple example of loading the latest article from an RSS 
feed and displaying it in a text field for AS2, I will post this later 
when I am at home if you like.


   Have google too - 
http://www.gotoandlearnforum.com/viewtopic.php?f=35t=12121start=0

   etc...

   Glen

thomas horner wrote:
 


Is it possible to have a wordpress blog floating within a swf? or something
as to that effect, 

 


it would be nice to keep the viewer at the site rather then redirecting them
to a new window, is this possible?

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


  


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


Re: [Flashcoders] best way to use external interface

2009-09-30 Thread Joel Stransky
Keep in mind as a second parameter to  ExternalInerface.call() you can pass
arguments. There's actually some hidden power to EI where the js doesn't
even need to exist physically in the html. You can actually write js right
from EI and then call it and or delete it later.
http://www.actionscript.org/resources/articles/745/1/JavaScript-and-VBScript-Injection-in-ActionScript-3/Page1.html

On Mon, Sep 28, 2009 at 2:24 PM, Gregory Boland
breakfastcof...@gmail.comwrote:

 yup just like that

 On Mon, Sep 28, 2009 at 2:17 PM, Gustavo Duenas 
 gdue...@leftandrightsolutions.com wrote:

  Ok, thanks, so it should work this way right?
 
  Gustavi
 
  On Sep 28, 2009, at 12:53 PM, Gregory Boland wrote:
 
   thats essentially it.
 
  Syntax is slightly different
 
  if (ExternalInterface.available){
  ExternalInterface.call(openMyWindow);}
  }
 
  make sure to import flash.external.ExternalInterface;
 
  and when u tell it what the name of the method in the javascript is
 leave
  off the ()
 
 
 
  On Mon, Sep 28, 2009 at 12:18 PM, Gustavo Duenas 
  gdue...@leftandrightsolutions.com wrote:
 
   Hi I have a function in javascript on the html
 
  like:
 
  script type=javascript
 
  function openMyWindow(){
  document.getElementByID(myWindow).setStyle(etc)
  }
 
  and I would like to use it from falsh something like this:
 
  mybutton.addEventlistener(MouseEvent.CLICK, contactJavascript);
 
  function contactJavascript(e:MouseEvent):void{
 
  if (externalInterface.available){
  externalInterface.call(openMyWindow());
  }
 
  let me know if this could work at all.
  I'm trying to find a google about it, but all seems so obscure
  any help appreciated
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
   ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 
 
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




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


Re: [Flashcoders] Catalyst

2009-09-30 Thread Joel Stransky
It's definitely not a tool worth integrating into your work flow until at
least version 2. For now it might be a nice utility to generate some data
that might otherwise be difficult but as far as being able to pass a
catalyst file back and forth between artist and developer? No way.

On Mon, Sep 28, 2009 at 9:39 AM, Merrill, Jason 
jason.merr...@bankofamerica.com wrote:

 Catalyst is still really rough - I wasn't initially impressed with the
 first public beta at all, but the tool has great potential and I'm
 hopeful and excited for the release next year.  And yes, it's MXML
 output, not pure AS3.


 Jason Merrill

 Bank of  America   Global Learning
 Learning  Performance Soluions

 Monthly meetings on making the most of the Adobe Flash Platform -
 presented by bank associates, Adobe engineers, and outside experts in
 the borader multimedia community - join the Bank of America Flash
 Platform Community  (note: this is for Bank of America employees only)





 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Anthony
 Pace
 Sent: Saturday, September 26, 2009 6:29 PM
 To: Flash Coders List
 Subject: [Flashcoders] Catalyst

 Anyone try catalyst?  Does it only output to flex style code that make
 babies cry, or does it output do pure AS3 too?
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




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


Re: [Flashcoders] Catalyst

2009-09-30 Thread Anthony Pace

I hate that it is only mxml.  Good to know.

Joel Stransky wrote:

It's definitely not a tool worth integrating into your work flow until at
least version 2. For now it might be a nice utility to generate some data
that might otherwise be difficult but as far as being able to pass a
catalyst file back and forth between artist and developer? No way.

On Mon, Sep 28, 2009 at 9:39 AM, Merrill, Jason 
jason.merr...@bankofamerica.com wrote:

  

Catalyst is still really rough - I wasn't initially impressed with the
first public beta at all, but the tool has great potential and I'm
hopeful and excited for the release next year.  And yes, it's MXML
output, not pure AS3.


Jason Merrill

Bank of  America   Global Learning
Learning  Performance Soluions

Monthly meetings on making the most of the Adobe Flash Platform -
presented by bank associates, Adobe engineers, and outside experts in
the borader multimedia community - join the Bank of America Flash
Platform Community  (note: this is for Bank of America employees only)





-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Anthony
Pace
Sent: Saturday, September 26, 2009 6:29 PM
To: Flash Coders List
Subject: [Flashcoders] Catalyst

Anyone try catalyst?  Does it only output to flex style code that make
babies cry, or does it output do pure AS3 too?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders






  

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


[Flashcoders] RE: Input textfield's Event.CHANGE doesn't fire for backspace?

2009-09-30 Thread Alan Watts
What if you use the KeyboardEvent.KEY_UP event instead?  I don't know  
what you're trying to accomplish, but I've always used the  
KeyboardEvents for textfield interactions.


Alan


Hey List,

Consider something like this:

//inputTextField is multilined and wordWrapped
inputTextField.addEventListener(Event.CHANGE, changeHandler);

//All this does is trace when fired
function changeHandler(e:Event):void {
   trace(fired);
}

I expected this to fire when backspacing over a carriage return (ie,  
when
pressing backspace reduces the number of lines in the textfield by  
one), but

it doesn't. To try for yourself:

1. Type Hello, then press enter, then type world. You should  
have 2

lines of text.
2. Press backspace 5 times (so that world is gone, but the cursor  
is still

on line 2). The changeHandler should fire all 5 times.
3. Press backspace one more time (so that the cursor is at the end  
of line
1). ... Am I the only one who isn't getting a changeHandler fired at  
me?!


Note: It works fine in the opposite direction - ie, if you're using  
the
delete key rather than the backspace. But I really need to be able  
to detect
backspace so I can rearrange the y positions of other things on my  
stage.


If anyone has any suggestions or comments, it would be most  
appreciated!


Thanks!
CB.


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


Re: [Flashcoders] floating wordpress blog within a swf?

2009-09-30 Thread Glen Pike

Hi,

   I dug out some old AS2 code - which used XFactorStudio's XPath 
library to grab the first entry from the RSS feed and stick it in a text 
field.
   Below is the example (it uses a generic string replacement function 
that I think came from Mike Chambers or someone @ adobe who did some 
nice String library for AS2).  AS3 will be similar, but you can use 
e4X...  Again, the blog content was simple text - they stayed away from 
fancy formatting too much, although I have tried basic css formatting of 
tags, which sometimes works...  There are probably better examples out 
there, but hopefully you can get the picture.


   function _xmlLoad(success:Boolean ) {
   if(success) {
   var obj:Object = XPath.selectNodes(_xmlObj, 
//item[1]/content:encoded/text());

   //trace(Obj is  + obj);
   var content:String = replace(String(obj), amp;, );
   content = replace(content, gt;, );
   content = replace(content, lt;,);
   content = replace(content, quot;, \);
   content = replace(content, apos;, ');
   //trace(content);
   var format:TextFormat = mpadText.getTextFormat();
   mpadText.html = true;
   mpadText.htmlText = content;
   mpadText.setTextFormat(format);
   } else {
   trace(Could not load XML);
   }
   }

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


[Flashcoders] Flash and HTML

2009-09-30 Thread Karl DeSaulniers
When is flash going to upgrade their HTML capabilities is what I want  
to know. Is it because of flash security that they only allow HTML 1.0  
tags?? The most basic of tags?


Karl

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


[Flashcoders] [MEMORY LEAK]

2009-09-30 Thread TS
Hello, this issue is killing me. I had a swf that loaded an xml file then
loaded images from the xml file and then killed the display list, xml,
images etc... then restarted based on a timer. Every time it reloads
however, I watch firefox take away memory consistently and when I refresh
that page memory use drops back to normal. So, I said screw this, I'm going
to create an empty swf and load the swf with all the magic in it and add it
to the empty swf. I figured if I add the swf to the main stage and kill that
one reference to the swf when I was done with it, I should have fixed my
problem. Here's my code. Can someone please tell me what is going on? 


stop();

var mLoader:Loader = new Loader();
function startLoad()
{
var mRequest:URLRequest = new
URLRequest(hasch_flash/currently_watched_videos.swf);
//var mRequest:URLRequest = new
URLRequest(currently_watched_videos.swf);
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
onCompleteHandler, false, 0, true);
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
onProgressHandler, false, 0, true);
mLoader.load(mRequest);
}

function onCompleteHandler(loadEvent:Event)
{
trace(load  + loadEvent.currentTarget.content);
trace(loadTarget  + loadEvent.target);
addChild(loadEvent.currentTarget.content);
}
function onProgressHandler(mProgress:ProgressEvent)
{
var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
trace(percent);
}
startLoad();


TimerExample();

// Set off timer to kill carousel and restart movie
function TimerExample() {
var myTimer:Timer = new Timer(3, 0);
myTimer.addEventListener(timer, timerHandler);
myTimer.start();
}

function timerHandler(event:TimerEvent):void {
trace(this.removeChildAt(0)); // remove from display list
mLoader = null;
mLoader =  new Loader(); // clear from memory
startLoad();
trace(timerHandler:  + event);
}


Thanks for any advice. T

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


RE: [Flashcoders] [MEMORY LEAK]

2009-09-30 Thread Chris Foster
Hi T,

No solution here, but this might relate to your current problem:
http://www.gskinner.com/blog/archives/2008/04/failure_to_unlo.html


C:
 

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of TS
Sent: Thursday, 1 October 2009 10:53 AM
To: 'Flash Coders List'
Subject: [Flashcoders] [MEMORY LEAK]

Hello, this issue is killing me. I had a swf that loaded an xml file
then loaded images from the xml file and then killed the display list,
xml, images etc... then restarted based on a timer. Every time it
reloads however, I watch firefox take away memory consistently and when
I refresh that page memory use drops back to normal. So, I said screw
this, I'm going to create an empty swf and load the swf with all the
magic in it and add it to the empty swf. I figured if I add the swf to
the main stage and kill that one reference to the swf when I was done
with it, I should have fixed my problem. Here's my code. Can someone
please tell me what is going on? 


stop();

var mLoader:Loader = new Loader();
function startLoad()
{
var mRequest:URLRequest = new
URLRequest(hasch_flash/currently_watched_videos.swf);
//var mRequest:URLRequest = new
URLRequest(currently_watched_videos.swf);
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
onCompleteHandler, false, 0, true);

mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
onProgressHandler, false, 0, true);
mLoader.load(mRequest);
}

function onCompleteHandler(loadEvent:Event)
{
trace(load  + loadEvent.currentTarget.content);
trace(loadTarget  + loadEvent.target);
addChild(loadEvent.currentTarget.content);
}
function onProgressHandler(mProgress:ProgressEvent)
{
var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
trace(percent);
}
startLoad();


TimerExample();

// Set off timer to kill carousel and restart movie function
TimerExample() {
var myTimer:Timer = new Timer(3, 0);
myTimer.addEventListener(timer, timerHandler);
myTimer.start();
}

function timerHandler(event:TimerEvent):void {
trace(this.removeChildAt(0)); // remove from display list
mLoader = null;
mLoader =  new Loader(); // clear from memory
startLoad();
trace(timerHandler:  + event);
}


Thanks for any advice. T

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
This e-mail, including any attached files, may contain confidential and 
privileged information for the sole use of the intended recipient.  Any review, 
use, distribution, or disclosure by others is strictly prohibited.  If you are 
not the intended recipient (or authorized to receive information for the 
intended recipient), please contact the sender by reply e-mail and delete all 
copies of this message.

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


RE: [Flashcoders] [MEMORY LEAK]

2009-09-30 Thread TS
Thanks for the info. Still reading it but, fme, it seems silly there's not
an ExitRestart() method or something.

Thanks, T


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Chris Foster
Sent: Wednesday, September 30, 2009 7:08 PM
To: Flash Coders List
Subject: RE: [Flashcoders] [MEMORY LEAK]

Hi T,

No solution here, but this might relate to your current problem:
http://www.gskinner.com/blog/archives/2008/04/failure_to_unlo.html


C:
 

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of TS
Sent: Thursday, 1 October 2009 10:53 AM
To: 'Flash Coders List'
Subject: [Flashcoders] [MEMORY LEAK]

Hello, this issue is killing me. I had a swf that loaded an xml file
then loaded images from the xml file and then killed the display list,
xml, images etc... then restarted based on a timer. Every time it
reloads however, I watch firefox take away memory consistently and when
I refresh that page memory use drops back to normal. So, I said screw
this, I'm going to create an empty swf and load the swf with all the
magic in it and add it to the empty swf. I figured if I add the swf to
the main stage and kill that one reference to the swf when I was done
with it, I should have fixed my problem. Here's my code. Can someone
please tell me what is going on? 


stop();

var mLoader:Loader = new Loader();
function startLoad()
{
var mRequest:URLRequest = new
URLRequest(hasch_flash/currently_watched_videos.swf);
//var mRequest:URLRequest = new
URLRequest(currently_watched_videos.swf);
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
onCompleteHandler, false, 0, true);

mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
onProgressHandler, false, 0, true);
mLoader.load(mRequest);
}

function onCompleteHandler(loadEvent:Event)
{
trace(load  + loadEvent.currentTarget.content);
trace(loadTarget  + loadEvent.target);
addChild(loadEvent.currentTarget.content);
}
function onProgressHandler(mProgress:ProgressEvent)
{
var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
trace(percent);
}
startLoad();


TimerExample();

// Set off timer to kill carousel and restart movie function
TimerExample() {
var myTimer:Timer = new Timer(3, 0);
myTimer.addEventListener(timer, timerHandler);
myTimer.start();
}

function timerHandler(event:TimerEvent):void {
trace(this.removeChildAt(0)); // remove from display list
mLoader = null;
mLoader =  new Loader(); // clear from memory
startLoad();
trace(timerHandler:  + event);
}


Thanks for any advice. T

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
This e-mail, including any attached files, may contain confidential and
privileged information for the sole use of the intended recipient.  Any
review, use, distribution, or disclosure by others is strictly prohibited.
If you are not the intended recipient (or authorized to receive information
for the intended recipient), please contact the sender by reply e-mail and
delete all copies of this message.

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

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


Re: [Flashcoders] [MEMORY LEAK]

2009-09-30 Thread Karl DeSaulniers
Try removing any listeners associated with that swf before unloading  
it. It's possible the remaining listeners are still listening. Someone  
may be able to verify this more than I though.


HTH

Karl

Sent from losPhone

On Sep 30, 2009, at 7:53 PM, TS sunnrun...@gmail.com wrote:

Hello, this issue is killing me. I had a swf that loaded an xml file  
then

loaded images from the xml file and then killed the display list, xml,
images etc... then restarted based on a timer. Every time it reloads
however, I watch firefox take away memory consistently and when I  
refresh
that page memory use drops back to normal. So, I said screw this,  
I'm going
to create an empty swf and load the swf with all the magic in it and  
add it
to the empty swf. I figured if I add the swf to the main stage and  
kill that
one reference to the swf when I was done with it, I should have  
fixed my

problem. Here's my code. Can someone please tell me what is going on?


stop();

var mLoader:Loader = new Loader();
function startLoad()
{
   var mRequest:URLRequest = new
URLRequest(hasch_flash/currently_watched_videos.swf);
   //var mRequest:URLRequest = new
URLRequest(currently_watched_videos.swf);
   mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
onCompleteHandler, false, 0, true);
   mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
onProgressHandler, false, 0, true);
   mLoader.load(mRequest);
}

function onCompleteHandler(loadEvent:Event)
{
   trace(load  + loadEvent.currentTarget.content);
   trace(loadTarget  + loadEvent.target);
   addChild(loadEvent.currentTarget.content);
}
function onProgressHandler(mProgress:ProgressEvent)
{
   var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
   trace(percent);
}
startLoad();


TimerExample();

// Set off timer to kill carousel and restart movie
function TimerExample() {
   var myTimer:Timer = new Timer(3, 0);
   myTimer.addEventListener(timer, timerHandler);
   myTimer.start();
}

function timerHandler(event:TimerEvent):void {
   trace(this.removeChildAt(0)); // remove from display list
   mLoader = null;
   mLoader =  new Loader(); // clear from memory
   startLoad();
   trace(timerHandler:  + event);
}


Thanks for any advice. T

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

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