RE: [Flashcoders] Read and save xml file on disk

2014-02-10 Thread Jim Hayes
That I never knew! Even after years of using AIR.

From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] on behalf of Henrik Andersson 
[he...@henke37.cjb.net]
Sent: 10 February 2014 16:20
To: Flash Coders List
Subject: Re: [Flashcoders] Read and save xml file on disk

Just use File.separator, it will get you the correct one if you care.

Jim Hayes skriver:
> Or use a /  which I think works both on PC and the mac (which \ will not, 
> that will only work on windows)
> Forgive me if I'm wrong on that one.
> 
> From: flashcoders-boun...@chattyfig.figleaf.com 
> [flashcoders-boun...@chattyfig.figleaf.com] on behalf of Jim Hayes 
> [j...@primalpictures.com]
> Sent: 10 February 2014 15:26
> To: Flash Coders List
> Subject: RE: [Flashcoders] Read and save xml file on disk
>
> you need to escape the \   like so "\\"
>
> appFile = appFile.resolvePath(fileString+"\\personnel.xml");
> trace(fileString+"\\personnel.xml")


---
Detta epostmeddelande innehåller inget virus eller annan skadlig kod för avast! 
antivirus är aktivt.
http://www.avast.com


___
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] Read and save xml file on disk

2014-02-10 Thread Jim Hayes
Or use a /  which I think works both on PC and the mac (which \ will not, that 
will only work on windows)
Forgive me if I'm wrong on that one.

From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] on behalf of Jim Hayes 
[j...@primalpictures.com]
Sent: 10 February 2014 15:26
To: Flash Coders List
Subject: RE: [Flashcoders] Read and save xml file on disk

you need to escape the \   like so "\\"

appFile = appFile.resolvePath(fileString+"\\personnel.xml");
trace(fileString+"\\personnel.xml")

From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] on behalf of natalia Vikhtinskaya 
[natavi.m...@gmail.com]
Sent: 10 February 2014 15:14
To: Flash Coders List
Subject: Re: [Flashcoders] Read and save xml file on disk

Here how I try to save xml in the same folder where is my app

import flash.filesystem.File;
import flash.filesystem.FileStream;
import flash.filesystem.FileMode;
import flash.events.Event;

//personnel. xml  file
..

// save to disk
var appDirectory:File = File.applicationDirectory;
var newFileStream:FileStream = new FileStream();
var fileString:String = appDirectory.nativePath;
var appFile:File = File.documentsDirectory;
appFile = appFile.resolvePath(fileString+"\personnel.xml");
trace(fileString+"\personnel.xml")
it gives  path myfolderpersonnel.xml instead of myfolder\personal.xml

How to solve this problem?

2014-02-10 15:51 GMT+04:00 David Benman :

> AIR is another publishing method available in Flash and because it creates
> an executable that removes many of the Flash player's security
> restrictions. Prior to Flash CC you could also create a Mac or Windows
> projector that would save a file.
>
> I think most methods still require user interaction, but its usually not
> that hard to scare up some sort of user interaction to trigger the saving.
> The user doesn't necessarily need to choose the save location each time,
> just the save process needs to be triggered by a user interaction.
>
> On Feb 10, 2014, at 5:55 AM, natalia Vikhtinskaya 
> wrote:
>
> > Thank you for your answers. Unfortunately I don't know AIR or Zinc. I
> > looked for a way to publish this application as swf file and then convert
> > it to exe. I did that before with games.  So no way to do that without
> AIR
> > or Zinc?
> >
> > 2014-02-10 5:41 GMT+04:00 :
> >
> >> Natalia,
> >>
> >> You can use the File (see e.g. "applicationDirectory" or "resolvePath")
> >> and Filestream (open, read, and write) functions, but these are
> only
> >> available if you're using Air (other wrappers like Zinc have similar
> >> functionality).  If it's an executable created by simply Publishing with
> >> Flash Player as the target, I think security issues prevent you from
> doing
> >> this.
> >>
> >> HTH,
> >> --Dave
> >>
> >>> --
> >>> From: natalia Vikhtinskaya 
> >>>
> >>> Hi to all friends
> >>> I have to create stand alone application  that can read xml file then
> >>> after
> >>> editing save it on the disk. I need to do that by FlashCs6. I know that
> >>> FileReference.load() : Loads data from a file selected by the user.
> >>> FileReference.save() : Saves data to a file location selected by the
> >> user.
> >>> Is it possible to save and read without  the user?
> >>> What is the better way for this task?
> >>> Do you know any good tutorials with examples on this subject? This task
> >> it
> >>> new for me and I want to read about that more.
> >>>
> >>> Thank you in advance.
> >>
> >>
> >> ___
> >> 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
>
> David Benman
> Interactive Developer
> d...@dbenman.com
> http://www.dbenman.com
> (315) 637-8487 (home office)
>
>
>
>
> ___
> 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


RE: [Flashcoders] Read and save xml file on disk

2014-02-10 Thread Jim Hayes
you need to escape the \   like so "\\"

appFile = appFile.resolvePath(fileString+"\\personnel.xml");
trace(fileString+"\\personnel.xml")

From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] on behalf of natalia Vikhtinskaya 
[natavi.m...@gmail.com]
Sent: 10 February 2014 15:14
To: Flash Coders List
Subject: Re: [Flashcoders] Read and save xml file on disk

Here how I try to save xml in the same folder where is my app

import flash.filesystem.File;
import flash.filesystem.FileStream;
import flash.filesystem.FileMode;
import flash.events.Event;

//personnel. xml  file
..

// save to disk
var appDirectory:File = File.applicationDirectory;
var newFileStream:FileStream = new FileStream();
var fileString:String = appDirectory.nativePath;
var appFile:File = File.documentsDirectory;
appFile = appFile.resolvePath(fileString+"\personnel.xml");
trace(fileString+"\personnel.xml")
it gives  path myfolderpersonnel.xml instead of myfolder\personal.xml

How to solve this problem?

2014-02-10 15:51 GMT+04:00 David Benman :

> AIR is another publishing method available in Flash and because it creates
> an executable that removes many of the Flash player's security
> restrictions. Prior to Flash CC you could also create a Mac or Windows
> projector that would save a file.
>
> I think most methods still require user interaction, but its usually not
> that hard to scare up some sort of user interaction to trigger the saving.
> The user doesn't necessarily need to choose the save location each time,
> just the save process needs to be triggered by a user interaction.
>
> On Feb 10, 2014, at 5:55 AM, natalia Vikhtinskaya 
> wrote:
>
> > Thank you for your answers. Unfortunately I don't know AIR or Zinc. I
> > looked for a way to publish this application as swf file and then convert
> > it to exe. I did that before with games.  So no way to do that without
> AIR
> > or Zinc?
> >
> > 2014-02-10 5:41 GMT+04:00 :
> >
> >> Natalia,
> >>
> >> You can use the File (see e.g. "applicationDirectory" or "resolvePath")
> >> and Filestream (open, read, and write) functions, but these are
> only
> >> available if you're using Air (other wrappers like Zinc have similar
> >> functionality).  If it's an executable created by simply Publishing with
> >> Flash Player as the target, I think security issues prevent you from
> doing
> >> this.
> >>
> >> HTH,
> >> --Dave
> >>
> >>> --
> >>> From: natalia Vikhtinskaya 
> >>>
> >>> Hi to all friends
> >>> I have to create stand alone application  that can read xml file then
> >>> after
> >>> editing save it on the disk. I need to do that by FlashCs6. I know that
> >>> FileReference.load() : Loads data from a file selected by the user.
> >>> FileReference.save() : Saves data to a file location selected by the
> >> user.
> >>> Is it possible to save and read without  the user?
> >>> What is the better way for this task?
> >>> Do you know any good tutorials with examples on this subject? This task
> >> it
> >>> new for me and I want to read about that more.
> >>>
> >>> Thank you in advance.
> >>
> >>
> >> ___
> >> 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
>
> David Benman
> Interactive Developer
> d...@dbenman.com
> http://www.dbenman.com
> (315) 637-8487 (home office)
>
>
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders







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


RE: [Flashcoders] Combining embedded and device fonts in one textfield

2010-02-11 Thread Jim Hayes
Ah, I've just been there with IPA characters.

If you are using htmltext it's do able, though in the end I embedded the font 
(deja-vu in my case, it's open source) since I also needed to set plain text.

The trick is to unicode escape the character, replace it with that escaped code 
and set a style on it's replacement, where that style specifies the embedded 
font.

so if you know your character code for your undertie , lets say it's 1234, try 
something like this :

var unicodeString:String = "&#" + 1234 + ";";
str = str.replace(String.fromCharCode(1234),"" + 
unicodeString + "");

then specify the style for your text :
_textStyle = new StyleSheet();
var ipaStyle:Object = new Object();
ipaStyle.fontFamily = "YourEmbeddedFont";  
_textStyle.setStyle(".ipa", ipaStyle);
yourText.styleSheet = _textStyle;

Sorry if that's a bit scrappy, hopefully it will give you an idea of where you 
might head.
I was using flex, in fact, but I think this still applies to flash textfields.  


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com on behalf of 
confustic...@gmail.com
Sent: Thu 2/11/2010 6:01 AM
To: Flash Coders List
Subject: Re: [Flashcoders] Combining embedded and device fonts in one textfield
 
Thanks for that link, Ktu. I didn't know you could specify Unicode
ranges to embed - very handy.

Unfortunately, the problem still remains of having to combine an
embedded font and a device font in the same textfield. As Lee Brimelow
demonstrates near the end of the tutorial, the lowercase 'u' didn't
display because only uppercase glyphs were embedded. It seems like if
I choose to embed only the undertie character, my textfield will only
be capable of displaying ... the undertie character!

It seems like this is the conundrum:

1) I need to embed the undertie character, as Arial Unicode MS is not
guaranteed to be found on all machines.

2) That means that any textfield which would have an undertie in it,
would have to have embedFonts = true;

3) Any textfield which has embedFonts = true can only display
characters included in the embedded font. Which, referring back to
(1), would just be an undertie.

4) This means that if I want to have an undertie, I'd have to embed
the undertie AND every single other glyph which might be used in that
textfield. Uppercase, lowercase, punctuation, numbers, etc. Further,
I'd have to embed separate versions for each of bold, italic, and
bold-italic.

All this for an undertie!!

On Thu, Feb 11, 2010 at 4:18 PM, Ktu  wrote:
> If you have Flash CS4 or Flex, you could embed just that one character from
> that font using the [Embed] syntax. Check out this tutorial
> http://gotoandlearn.com/play?id=102
>
> Ktu
>
> On Wed, Feb 10, 2010 at 11:08 PM, confustic...@gmail.com <
> confustic...@gmail.com> wrote:
>
>> I have paragraphs of text which includes phonemic symbols: pretty much
>> any character found here should be included:
>> http://www.e-lang.co.uk/mackichan/call/pron/type.html
>>
>> I thought I was home and hosed, as Lucida Sans Unicode / Lucida
>> Grande, which seems pretty standard, covers all that.
>>
>> The problem came when I found out that I also have to be able to
>> display the undertie character:
>> http://en.wikipedia.org/wiki/Tie_(typography)(HTML
>>  code ?)
>>
>> It seems that the only font on Windows that covers the undertie is
>> Arial Unicode MS. Unfortunately, Arial Unicode MS doesn't seem to be a
>> standard font.
>>
>> I don't want to have to embed Arial Unicode MS because that would
>> really add to my file sizes, as well as restricting my ability to do
>> things like textfield.htmlText = "bold text". It seems like
>> such overkill for ONE SINGLE GLYPH.
>>
>> Would anyone be able to suggest any alternatives? ALL I WANT IS AN
>> UNDERTIE ... *sob*
>> ___
>> 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


__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents t

RE: [Flashcoders] Loading local files with query strings

2009-09-16 Thread Jim Hayes
That's what you'd expect with *local* files, e.g. loading from a filesystem.
The filesystem will look for the file with the literal filename 
"my_swf.swf?id=33".
A web server, on the other hand, knows that anything after "?" is not part of 
the filename, and should be treated as a query string.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Álvaro Saraiva
Sent: 14 September 2009 19:17
To: Flash Coders List
Subject: [Flashcoders] Loading local files with query strings

Hi everyone,
I have a strange problem loading external assets from local files with 
Loader() Class in AS3.
If i use query string in the file name, the asset don't loads.

This code doesnt load the swf file inside a class
this.mySWFLoader = new Loader();
this.mySWFLoader.contentLoaderInfo.addEventListener(Event.INIT, 
displaySwfContainer );
this.mySWFLoader.load(new URLRequest("my_swf.swf?id=33"));

if i dont use the '?id=33' it works.

Any suggestions?
Thanxs in advance,
Álvaro




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

__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__

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


RE: [Flashcoders] Loading image on local filesystem

2009-01-29 Thread Jim Hayes
Are you sure this is not a "security" error due to the allow network /
allow local setting? I'm guessing that you may want to allow local file
access for the swf (somewhere in publish settings as I remember), or add
the img folder on your local drive to flash's "trusted" locations.

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of K-Dawg
Sent: 29 January 2009 13:30
To: Flash Coders List
Subject: Re: [Flashcoders] Loading image on local filesystem

On Thu, Jan 29, 2009 at 6:51 AM, Muzak  wrote:

> use relative path and forward slashes
>
> "img/image.jpg"
>
>
I'm sorry, I mistyped for some reason.  The actual string passed into
the
URLRequest is: img/food_array.jpg

the path is relative and does exist exactly as that.  I pass it in
through
the object's constructor and then do:

this.imagePath = new URLRequest(this.imagePathString);
loader = new Loader();
loader.load(this.imagePath);
loader.contentLoaderInfo.addEventListener(Event.INIT,
imageLoaded);

When I trace(this.imagePathString); it outputs the correct path and
trace(this.imagePath) returns the URLRequest.  I must be doing something
incorrect on the loader.load line maybe?

Thanks.

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

__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__

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


RE: [Flashcoders] textField fed htmlText renders title

2008-08-27 Thread Jim Hayes
Naaa! It will still render anything in the  tag, I ran into this
myself! Very annoying, and you wouldn't really expect it.

Only way I found to fix it was to strip out that tag and it's
contents...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: 27 August 2008 16:23
To: Flash Coders List
Subject: RE: [Flashcoders] textField fed htmlText renders title

myTextField.html = true;
myTextField.htmlText = "yourText"

Jason Merrill 
Bank of America 
Enterprise Technology & Global Risk L&LD 
Instructional Technology & Media

Join the Bank of America Flash Platform Developer Community 

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  Innovative Learning Blog & subscribe. 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Mendelsohn, Michael
Sent: Wednesday, August 27, 2008 10:03 AM
To: Flash Coders List
Subject: [Flashcoders] textField fed htmlText renders title

Hi list...

I'm feeding some htmlText into a TextField and the string within the
 tag of the html is rendering in the TextField.  Is there a trick
to hide this?

Thanks,
- Michael M.

___
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

__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__

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


RE: [Flashcoders] OT: Your Best CS4 Upgrade Guesstimate

2008-08-18 Thread Jim Hayes

Or cheaper still, email you the licence code, It's all you need!

Our company has some salespeople in the USA, that's what I do (though they do 
send the disks whenever they're sending us something else).

Recently though, upgrade prices in UK do seem to have been more or less on a 
par with the dollar price (on flex 3 and flash CS3, at least).
I didn't check the price of full versions.
Strangely, flex 3 upgrade was a fiver cheaper to get the CD as opposed to the 
"download" edition, and I got a lovely grey box as well:)


-Original Message-
From: [EMAIL PROTECTED] on behalf of Pedro Kostelec
Sent: Mon 18/08/2008 21:46
To: Flash Coders List
Subject: Re: [Flashcoders] OT: Your Best CS4 Upgrade Guesstimate
 
Or ask a friend in the US to buy it for you and send it via post. Even more
cheaper
Pedro D.K.


On Mon, Aug 18, 2008 at 3:37 PM, Merrill, Jason <
[EMAIL PROTECTED]> wrote:

> Hey well look at it this way, telling your boss he/she has to fly you to
> New York for the weekend to pickup your copies of Creative Suite so you
> can save them money is, well, pretty priceless... and also not a bad way
> to spend the weekend.
>
> Jason Merrill
> Bank of America
> Enterprise Technology & Global Risk L&LD
> Instructional Technology & Media
>
> Join the Bank of America Flash Platform Developer Community
>
> Are you a Bank of America associate interested in innovative learning
> ideas and technologies?
> Check out our internal  Innovative Learning Blog & subscribe.
>
>
>
> >>-Original Message-
> >>From: [EMAIL PROTECTED]
> >>[mailto:[EMAIL PROTECTED] On Behalf
> >>Of sebastian
> >>Sent: Monday, August 18, 2008 3:22 PM
> >>To: Flash Coders List
> >>Subject: Re: [Flashcoders] OT: Your Best CS4 Upgrade Guesstimate
> >>
> >>or a free plane ticket to fly to NY and buy the software there...
> >>
> >>After all, despite all logic and ecological reasoning, it's
> >>cheaper than the airfare it takes to get you there...
> >>:(
> >>:p
> >>
> >>
> >>Glen Pike wrote:
> >>> Maybe we should run a raffle to closest guess the UK price,
> >>then the
> >>> winner (UK based) gets the difference in the cost between
> >>the US and UK :)
> >>>
> >>> Merrill, Jason wrote:
>  LOL, Greg, sounds like a good idea.
> 
>  Thanks Kerry too - I did a quick survey of upgrade prices
> >>on Adobe.com
>  and found the % difference between upgrade price and new
> >>full license
>  prices to be:
> 
>  Flash 28%
>  Illustrator 33%
>  Photoshop 35%
>  Flexbuilder 39%
>  Dreamweaver 49%
> 
>  So maybe 35% is a good unscientific guess.
> 
> 
>  Jason Merrill Bank of America Enterprise Technology &
> >>Global Risk L&LD
>  Instructional Technology & Media
> 
>  Join the Bank of America Flash Platform Developer Community
>  Are you a Bank of America associate interested in
> >>innovative learning
>  ideas and technologies?
>  Check out our internal  Innovative Learning Blog & subscribe.
> 
>  ___
>  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


__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
_
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Question about the AIR security model...

2008-04-24 Thread Jim Hayes
Apparently, if you load the .swf as a byteArray then you can then use a
loader to load that as a swf, in the context of your application.
Normally that would be considered a potentially bad thing, but in your
case it looks like it could be exactly what you want to do.

Hth.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John
Eriksson
Sent: 24 April 2008 09:21
To: Flash Coders List
Subject: Re: [Flashcoders] Question about the AIR security model...

Yes. I have understood this when doing some research on the subject. My
problem though is that I don't want theswfs to be installed together
with
the app (a few thousand swfs altogether). I want my AIR App to load a
dir
full of them
and walk through them all and check if they implement a certain
interface.
I've done all these things, my only problem now
is that I cannot cast them in AIR at all which makes the whole thing
pointless.

You see my problem here right? I need it to load arbitrary swfs from a
harddrive or network share (i.e locally through the filesystem)
and try to cast them to an interface - throw up a warning or generate a
list
of swfs that do not conform to the interface and need to
be fixed.

I guess this cannot be easily done, or perhaps not at all... Could it be
possible through a sandbox bridge or something like that?

/John

2008/4/24 Ian Thomas <[EMAIL PROTECTED]>:

> Hi John,
>   Where are you loading the SWF from?
>
>   I think I had this problem early on with AIR, and it turned out I
> was loading from the wrong place. If you load the .swf files from
> within the AIR app's installed folder, then they are given full rights
> and you will be able to cast them etc. If you load them from anywhere
> else, they are placed into a different security sandbox and you won't
> be able to cast them.
>
>  This page should help:
> http://livedocs.adobe.com/flex/3/html/security_6.html
> (see under URL schemes)
>
> Hope that's helpful,
>   Ian
>
> On Wed, Apr 23, 2008 at 6:50 PM, John Axel Eriksson <[EMAIL PROTECTED]>
> wrote:
> > I'm trying to develop an application using AIR for internal use at
our
> > company.
> >
> >  Our company uses very advanced actionscript (3.0) on the web, we
load
> for
> > instance
> >  several hundred or maybe more swfs sometimes into a parent swf,
some
> that
> > are animated.
> >
> >  Recently we decided that we need control over these loaded animated
> swfs -
> > they need
> >  to adhere to an interface so we can stop the animations from the
> loading
> > application when needed.
> >  The animations can be both timeline based and script based. As long
as
> they
> > adhere to the interface
> >  (basically play() stop() reset() and the "running" getter should
return
> > true if playing or false if stopped) we should be just fine.
> >
> >  The problem is that we need people who don't really know any
scripting
> > (designers) to be able to publish these
> >  files properly. And I guess a template goes a long way but still...
> >
> >  So I thought: Hey there's AIR which have local filesystem access
among
> > other things. I could build an AIR App which
> >  loads a swf or even a whole dir of swfs and then casts the loaded
swfs
> to
> > IAnimatedItem and throws an error if it cant.
> >  It could also include play stop reset buttons to test every loaded
swf
> > manually to be sure it works. Nice indeed and simple
> >  enough for most people to use...
> >
> >  The problem is though that I can't cast loaded swfs in AIR it
seems,
> though
> > I can from a simple swf loading one of these items
> >  (but then I lose filesystem dialogs etc which is why I thought of
AIR
> in
> > the first place).
> >
> >  In AIR
> >  var aim:IAnimatedItem = loader.content as IAnimatedItem; (or
> > loader.contentLoaderInfo.content as IAnimatedItem doesn't matter).
> >
> >  aim becomes null.
> >
> >  In simple Flash swf:
> >
> >  aim becomes IAnimatedItem.
> >
> >
> >  if I do this in AIR:
> >
> >  var aim:IAnimatedItem = loader.content as IAnimatedItem;
> >
> >  if(aim is IAnimatedItem){
> > trace('is IAnimatedItem');
> >  } else {
> > trace('is NOT IAnimatedItem');
> >  }
> >
> >  this traces 'is NOT IAnimatedItem';
> >
> >  **
> >
> >  in simple Flash swf the same traces:
> >
> >  'is IAnimatedItem';
> >
> >  **
> >
> >  Also, doing a describeType in AIR OR Flash swf actually says it
DOES
> > implement IAnimatedItem. But, as I said, only in normal
> >  flash swfs is it castable to an IAnimatedItem. Why? Does this have
> > something to do with the AIR security model and does anyone
> >  know how I can achieve what I want in AIR?
> >
> >
> >  /John
> >  ___
> >  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/flash

RE: [Flashcoders] calculating distance between two points

2008-03-11 Thread Jim Hayes
That was the one I thought I'd heard of. But...
Too easy! Boring! Soh cah toa !
(and that as far as I can remember is actually the only useful thing I
did learn in school)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ivan
Dembicki
Sent: 11 March 2008 12:35
To: [EMAIL PROTECTED]; Flash Coders List
Subject: Re: [Flashcoders] calculating distance between two points

Or you can use new revolutionary Point.distance(pt1, pt2);

-- 

iv
http://www.bezier.ru
http://bezier.googlecode.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__

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


RE: [Flashcoders] calculating distance between two points

2008-03-11 Thread Jim Hayes
Pythagorus, innit?
The square root of the the sum of the difference in x squared and the
difference in y squared ? Or was I not listening in school way back
then?

I think there may be an inbuilt method in flash, mind you, but if there
is I don't know what it is.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lehr,
Theodore M (N-SGIS)
Sent: 11 March 2008 12:05
To: Flash Coders List
Subject: [Flashcoders] calculating distance between two points

How do you calculate the distance between two points with different x
and y values? I know it is some simple math formula - I just don't know
it
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__

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


RE: [Flashcoders] FileReference.download problem

2008-02-21 Thread Jim Hayes
It could just be windows set to not show file extentions for recognised
file types - personally one of my most hated "features", but that's the
default and most people don't change it.
Just a possibility ?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dave
Mennenoh
Sent: 21 February 2008 16:29
To: Flash Coders List
Subject: [Flashcoders] FileReference.download problem

I let users download an image - using FileRef.download - it works fine, 
except that some users are not getting the .jpg appended to the file
name. 
I've tried using issuing a default file name, and just letting FileRef
make 
the name from the download URL and just the image name appears - minus
the 
extension.

I tested here (XP - IE and FireFox) and I see the .jpg on both browsers.
My 
client does not see the extension - XP, IE - same version I have (she
says).

Odd. Anyone else seen this? I'm not sure what to tell her... published
from 
CS3 as AS2/Player 8


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

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

__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__

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


RE: [Flashcoders] AS3 Function question

2008-02-07 Thread Jim Hayes
I normally just set a default value for the second argument :

function someFunction(arg1:int,arg2:String=null):void
{
if(arg2==null)
{
//whatever.
}
//some code ...
}

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sidney
de Koning
Sent: 07 February 2008 11:45
To: Flash Coders List
Subject: [Flashcoders] AS3 Function question

Hi list,

I have a function in  AS3, and it takes two arguments, but sometimes i 
want it to have 1 argument. But when i run it now it errors:
1136: Incorrect number of arguments.  Expected 2.
How do i do this? keep one arguments standard in the function brackets 
and check for the second argument with the arguments array like in AS2?

Help would be advised,

Thanks,

Sidney

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

__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__

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