[Flashcoders] load flv and its metadata without start to play

2008-01-21 Thread Matthias Dittgen
Hello,

I want to use video for character animations and so I want to preload
several videos without to play them while preloading.
How can I do this in AS3? I found only the play(something.flv)
method. Are there any other possibilities?

Also, I am currently waiting for my metadata handler to be called
before I accept a video as loaded, because I need to set its height
and width, which only works using these values.
video.videoWidth and video.videoHeight doesn't work for me all the time.

And because I have more than one charactor of its kind, do I need to
load the flv as often as many characters I have?

Any suggestions?

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


Re: [Flashcoders] load flv and its metadata without start to play

2008-01-21 Thread Glen Pike

Hi,

   Steven Sacks posted this the other day.

   Glen

   Preloading FLVs is easy peasy.


var progressTimer:Timer = new Timer(10);
progressTimer.addEventListener(TimerEvent.TIMER, updateProgress);
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
progressTimer.start();
// PLAY IT THEN PAUSE IT
ns.play(path);
ns.pause(true);

private function updateProgress($event:TimerEvent):void
{
   dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, 
false, ns.bytesLoaded, ns.bytesTotal));

}

private function onNetStreamStatus($event:NetStatusEvent):void
{
   if ($event.info.code == NetStream.Buffer.Flush)
   {
   progressTimer.stop();
   dispatchEvent(new Event(Event.COMPLETE));
   }
} 


Matthias Dittgen wrote:

Hello,

I want to use video for character animations and so I want to preload
several videos without to play them while preloading.
How can I do this in AS3? I found only the play(something.flv)
method. Are there any other possibilities?

Also, I am currently waiting for my metadata handler to be called
before I accept a video as loaded, because I need to set its height
and width, which only works using these values.
video.videoWidth and video.videoHeight doesn't work for me all the time.

And because I have more than one charactor of its kind, do I need to
load the flv as often as many characters I have?

Any suggestions?

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


  


--

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


RE: [Flashcoders] Windowing in AIR

2008-01-21 Thread Matthew James Poole
Im on XP at work / Vista at home and don't get the border, so that's a
bit weird. 

Ah, NativeWindow.bounds, that looks like just the thing - includes any
system chrome (visible or not). Lots of handy events with it too by the
looks. Yeah, let me know how it goes - good luck.

Cheers
Matt

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sidney
de Koning
Sent: 18 January 2008 18:27
To: Flash Coders List
Subject: Re: [Flashcoders] Windowing in AIR

I'm using XP, i have noticed that on Vista it doesn't do it, on mac it
is also a bit weird.
I think i have found something, namely NativeWindowBounds, i'll let you
know about my findings

Sid

Matthew James Poole wrote:
 Ah I see.

 Oddly I don't actually get that border when dragging the employees 
 app, which OS are you using?

 ... You could always ensure that your main NativeWindow is always 
 maximised and other 'windows' inside are just MovieClips, but that's a

 bit hacky

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Sidney

 de Koning
 Sent: 18 January 2008 10:45
 To: Flash Coders List
 Subject: Re: [Flashcoders] Windowing in AIR

 Hi Matthew,

 I have placed the screenshots online at: 
 http://www.funky-monkey.nl/flashcoders/
 The border you see, is the border that appears when i drag the app. I 
 have placed the EmployeeDirectory also in the screenshot so you can 
 see the difference.

 Hope this makes it more clear,

 Cheers,

 Sidney



 Matthew James Poole wrote:
   
 Screen shots would be good please mate - I don't seem to get any 
 problem with the sample AIR, I'm probably still misunderstanding the 
 issue though ;)

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Sidney
 

   
 de Koning
 Sent: 17 January 2008 10:52
 To: Flash Coders List
 Subject: Re: [Flashcoders] Windowing in AIR

 Well, kindof, if you install that EmployeeDirectory app, you see that

 when you drag, the size of the window is only as big as the content, 
 and then your operating system displays an border for how big the app

 is(only if you dragg it). when the app is folded out (when you press 
 the little i button) and you start dragging you see that the border 
 when you drag it, is again just as big as the app.
 What happends with my app is that that border always stays the same, 
 the size of my canvas i specify in the Flash IDE, and cannot make it 
 any smaller. The bounds of my app will never confine to my content 
 but
 

   
 only to my canvas. I want my bounds to be smaller accourding to the 
 state of my app. Does that make any sense to you?

 If not clear, i can make some screenshots and place on my website if 
 that helps,

 Thanks,

 Sid

 Matthew James Poole wrote:
   
 
 ...Ok, I think I see what you mean. NativeWindows are always 
 rectangular
 - The OS doesn't allow anything other than this. So the dimentions 
 of
   

   
 the NativeWindow will always be bigger than the size of the content 
 if
 
   
   
 
 it isnt rectangular in appearance.

 The work around for this is to not to set your drag on the 
 containing
   

   
 NativeWindow, but put it on your next container inside that... Does 
 that answer your question?

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Sidney
 
   
   
 
 de Koning
 Sent: 17 January 2008 10:01
 To: Flash Coders List
 Subject: Re: [Flashcoders] Windowing in AIR

 Hi Matthew,

 Thanks for the answers; like i said:

 The problem that i dont want is that when my app unfolds, my 
 'appllication canvas' is actully bigger that what the user sees. 
 When
   

   
 you dragg the app i want the draggeble area to be confined to the 
 size
 
   
   
 
 of the current state of my application). When your current state is 
 smaller than your canvas, you still see the border.

 For instance when you look at the EmployeeDirectory app, on 
 http://labs.adobe.com/technologies/air/samples/ and when it folds 
 open
 
   
   
 
 the 'canvas' is also stretched, and when you drag it, the borrder is

 only confined to the current state of the app.

 Can you tell me how this can be realized?

 Cheers, Sidney



 Matthew James Poole wrote:
   
 
   
 Hi Sid,

 1. NativeWindow's have height and width properties, so you should 
 be
 

   
 able just to set these directly 2. A NativeWindow is just that - an

 OS
 
   
 
   
 
   
 native windo - so at best you can have a MC in a NativeWindow 3. 
 see
 2
 
   
 
   
 
   
 - a NativeWindow can have many MC's inside it...
 4. Not really, though if it was the same size it would appear to be

 masked (assuming the top one was visible) 5. Yes just set the width

 and height, x and y properties onEnterFrame

 Cheers
 Matt

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL 

Re: [Flashcoders] load flv and its metadata without start to play

2008-01-21 Thread Steven Sacks

Glen,

Unfortunately, I discovered a bug with the code I posted. The 
NetStream.Buffer.Flush does not fire if the NetStream is paused.  You 
have to check to see if the ns.bytesLoaded == ns.bytesTotal in the 
onProgress.



Matthias,

I have never had any unwanted sound behavior when I use:

ns.play(src);
ns.pause(true);

If you are hearing an audio blip, it's simple to fix by applying a 
SoundTransform with the volume set to 0 before you play/pause the NetStream.


var transform:SoundTransform = ns.soundTransform;
transform.volume = 0;
ns.soundTransform = transform;
ns.play(src);
ns.pause(true);

For the sake of this discussion, I'm going to assume we're talking about 
progressive downloads as opposed to FLVs streamed from FMS.


You cannot attach a single NetStream to multiple Video instances.

If you fully load an FLV and caching is turned on (never a guarantee, 
but likely) then the FLV will load instantly for the next NetStream that 
loads it.  HOWEVER, if it is not cached and you start a second NetStream 
to load the same FLV before it is finished loading, it will load the 
entire file again since it's technically not cached according to the 
browser.


I disagree that waiting for metadata is really ugly.  How is any 
client, Flash or otherwise, supposed to know anything about a file it's 
loading before it starts loading it?  The only way it could is if you 
hard-code it ahead of time because you know what it is.


If you're waiting for Flash to determine it dynamically, it has to 
access the file to get the header information (metadata) that describes 
the FLV.  Because you can play/pause, the metadata can come before you 
even addChild() the video to the display stack.


I don't see how any of this could be considered really ugly but if you 
do end up writing a psychic script that can determine a file's header 
data without ever accessing the file, be sure to let us know.  ;)


The ByteArray idea might work, I've never tried it, and it would 
probably take you anywhere from 5-15 minutes to try it out.  I'm not 
sure what benefit it would provide you other than guaranteeing that it 
would be stored in memory if browser cache was turned off.  At best, you 
might get a few milliseconds faster start-up loading from a ByteArray vs 
from cache.



Steven Sacks
Flash Maestro
Los Angeles, CA
--
blog: http://www.stevensacks.net
gaia: http://www.gaiaflashframework.com


Matthias Dittgen wrote:

Hi Glen,

thanks, but that's exactly what I do, but it answers not the related questions:

a) what, if I need the video for a second DisplayObject at the same
time on stage, does it load faster, because it was cached?

b) play() and pause() leads to unwanted sound behaviors when the video
consists of sound

c) how to set the video to the real size? I always need to wait for
metadata, which is really ugly. Otherwise the video is set to default
320x480.

Any thoughts?

Is it perhaps possible to load the FLV as ByteArray and later load the
Netstream from this ByteArray, which might be faster and done a second
time, too?

Matthias

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


Re: [Flashcoders] load flv and its metadata without start to play

2008-01-21 Thread Matthias Dittgen
Hello Steven,

yes, I noticed that. I am waiting for ns.bytesLoaded == ns.bytesTotal,
and I wait even until  metadata are received, as mentioned earlier.
I have shut off the unwanted sound behavior now, but don't know, how I did it.

pause(false) ist AS2, Steven?
AS3/FlexBuilder doesn't allow me to have parameters for ns.pause().

Sure, we talk about flv from file and ns.play(urlToFile).

I changed ns.bufferTime to a higher value, now.
That's everything I changed lately, and waiting for metadata seems to
become faster (can't explain). I know, that it'll take time to load
the header/metadata portion of a flv, Steven, but it felt to long.
Now, with bigger buffer time (sounds crazy, I know) it is much faster.

I'll try the ByteArray idea...

Regards,
Matthias

On Jan 21, 2008 12:07 PM, Steven Sacks [EMAIL PROTECTED] wrote:
 Glen,

 Unfortunately, I discovered a bug with the code I posted. The
 NetStream.Buffer.Flush does not fire if the NetStream is paused.  You
 have to check to see if the ns.bytesLoaded == ns.bytesTotal in the
 onProgress.


 Matthias,

 I have never had any unwanted sound behavior when I use:

 ns.play(src);
 ns.pause(true);

 If you are hearing an audio blip, it's simple to fix by applying a
 SoundTransform with the volume set to 0 before you play/pause the NetStream.

 var transform:SoundTransform = ns.soundTransform;
 transform.volume = 0;
 ns.soundTransform = transform;
 ns.play(src);
 ns.pause(true);

 For the sake of this discussion, I'm going to assume we're talking about
 progressive downloads as opposed to FLVs streamed from FMS.

 You cannot attach a single NetStream to multiple Video instances.

 If you fully load an FLV and caching is turned on (never a guarantee,
 but likely) then the FLV will load instantly for the next NetStream that
 loads it.  HOWEVER, if it is not cached and you start a second NetStream
 to load the same FLV before it is finished loading, it will load the
 entire file again since it's technically not cached according to the
 browser.

 I disagree that waiting for metadata is really ugly.  How is any
 client, Flash or otherwise, supposed to know anything about a file it's
 loading before it starts loading it?  The only way it could is if you
 hard-code it ahead of time because you know what it is.

 If you're waiting for Flash to determine it dynamically, it has to
 access the file to get the header information (metadata) that describes
 the FLV.  Because you can play/pause, the metadata can come before you
 even addChild() the video to the display stack.

 I don't see how any of this could be considered really ugly but if you
 do end up writing a psychic script that can determine a file's header
 data without ever accessing the file, be sure to let us know.  ;)

 The ByteArray idea might work, I've never tried it, and it would
 probably take you anywhere from 5-15 minutes to try it out.  I'm not
 sure what benefit it would provide you other than guaranteeing that it
 would be stored in memory if browser cache was turned off.  At best, you
 might get a few milliseconds faster start-up loading from a ByteArray vs
 from cache.


 Steven Sacks
 Flash Maestro
 Los Angeles, CA
 --
 blog: http://www.stevensacks.net
 gaia: http://www.gaiaflashframework.com


 Matthias Dittgen wrote:
  Hi Glen,
 
  thanks, but that's exactly what I do, but it answers not the related 
  questions:
 
  a) what, if I need the video for a second DisplayObject at the same
  time on stage, does it load faster, because it was cached?
 
  b) play() and pause() leads to unwanted sound behaviors when the video
  consists of sound
 
  c) how to set the video to the real size? I always need to wait for
  metadata, which is really ugly. Otherwise the video is set to default
  320x480.
 
  Any thoughts?
 
  Is it perhaps possible to load the FLV as ByteArray and later load the
  Netstream from this ByteArray, which might be faster and done a second
  time, too?
 
  Matthias

 ___
 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] MultiLanguage

2008-01-21 Thread Dave Mennenoh
I may be doing an app that has to be deployed in various languages, and I'm 
trying to find a good method of doing it. I guess my main issue is that the 
interface is Flash, and would be created by a designer. Content is pretty 
much all external, but things like button text, tool tip text, etc. are put 
in place by the designer.


I'd thought of just making different interface 'shells' for the various 
languages, but that'd be more difficult to maintain. What'd be perfect is 
language plugins but then I'm not quite sure on how to handle sizing 
problems - especially with certain languages like chinese.


Just looking for some guidance.


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


Re: [Flashcoders] MultiLanguage

2008-01-21 Thread Geografiek

Hi Dave,
I would ask the designer to put all the text in dynamic textFields  
(and fill them w3ith dummy text).
You can than adress these TextFields and fill them with text from a  
database at runtime, depending on a 'language' flag.

HTH,
Willem van den Goorbergh

Op 21-jan-2008, om 13:26 heeft Dave Mennenoh het volgende geschreven:

I may be doing an app that has to be deployed in various languages,  
and I'm trying to find a good method of doing it. I guess my main  
issue is that the interface is Flash, and would be created by a  
designer. Content is pretty much all external, but things like  
button text, tool tip text, etc. are put in place by the designer.


I'd thought of just making different interface 'shells' for the  
various languages, but that'd be more difficult to maintain. What'd  
be perfect is language plugins but then I'm not quite sure on how  
to handle sizing problems - especially with certain languages like  
chinese.


Just looking for some guidance.


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



=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Geografiek is a Dutch, Utrecht-based map and chart design company.
Willem van den Goorbergh can be contacted by telephone: (+31) 
30-2719512 or cell phone: (+31)6-26372378

or by fax: (+31)302719687
snail mail: Hooghiemstraplein 89 3514 AX UTRECHT
Visit our website at: http://www.geografiek.nl
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=


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


Re: [Flashcoders] MultiLanguage

2008-01-21 Thread Glen Pike

Hi,

   Look at using the Strings Panel - it's in FL8, probably in CS3.  
This lets you attach an ID to all your text fields, etc. and define 
languages in XML.  The help has more in depth stuff about this, but that 
is a good start.


   You may also want to ensure all your translation is done before the 
designer starts, otherwise they might start getting stressed when you 
ask them to resize a button for German, etc.


   Glen

Geografiek wrote:

Hi Dave,
I would ask the designer to put all the text in dynamic textFields 
(and fill them w3ith dummy text).
You can than adress these TextFields and fill them with text from a 
database at runtime, depending on a 'language' flag.

HTH,
Willem van den Goorbergh

Op 21-jan-2008, om 13:26 heeft Dave Mennenoh het volgende geschreven:

I may be doing an app that has to be deployed in various languages, 
and I'm trying to find a good method of doing it. I guess my main 
issue is that the interface is Flash, and would be created by a 
designer. Content is pretty much all external, but things like button 
text, tool tip text, etc. are put in place by the designer.


I'd thought of just making different interface 'shells' for the 
various languages, but that'd be more difficult to maintain. What'd 
be perfect is language plugins but then I'm not quite sure on how to 
handle sizing problems - especially with certain languages like chinese.


Just looking for some guidance.


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



=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Geografiek is a Dutch, Utrecht-based map and chart design company.
Willem van den Goorbergh can be contacted by telephone: 
(+31)30-2719512 or cell phone: (+31)6-26372378

or by fax: (+31)302719687
snail mail: Hooghiemstraplein 89 3514 AX UTRECHT
Visit our website at: http://www.geografiek.nl
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=


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




--

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


Re: [Flashcoders] MultiLanguage

2008-01-21 Thread Dave Mennenoh
Right, thanks. I realize that, my concern is still sizing issues though. 
This will be an app that is 'pretty' it has nice looking buttons and such. 
If everything could be scrollable text fields I would have no problem. 
Consider something as something as simple as 'stop', which is something like 
'anschlag' in german. Doubling the character count in a field can make a big 
diff for formatting...


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


Re: [Flashcoders] MultiLanguage

2008-01-21 Thread Dennis - I Sioux

I agree with Glen on the stringpanel part.
I've done a big project in the past with multilanguage games.. stringpanel 
is a good start.. although if you want to give the user the possibility to 
select the language at runtime you had to code that yourself into the 
panel.. (that was made back in flash 7 though.. might be in there right now) 
..


Translating it on forhand isn't always an option.. somtimes the product gets 
popular and a new country/language is added..
The way we did it is to keep space for larger languages in the design.. and 
if it isn't possible to translate it shorter.. it will always be a pain in 
the @ss.. but there should be a balance to keep the designer/design happy 
and the translations/translators good..


We made an extra panel to add character sets to all textfields on the press 
of a button.. this way it is easier to add a new character set.


Hope this helps..

With kind regards,

Dennis
Isioux

- Original Message - 
From: Glen Pike [EMAIL PROTECTED]

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Monday, January 21, 2008 2:01 PM
Subject: Re: [Flashcoders] MultiLanguage



Hi,

   Look at using the Strings Panel - it's in FL8, probably in CS3.  This 
lets you attach an ID to all your text fields, etc. and define languages 
in XML.  The help has more in depth stuff about this, but that is a good 
start.


   You may also want to ensure all your translation is done before the 
designer starts, otherwise they might start getting stressed when you ask 
them to resize a button for German, etc.


   Glen

Geografiek wrote:

Hi Dave,
I would ask the designer to put all the text in dynamic textFields (and 
fill them w3ith dummy text).
You can than adress these TextFields and fill them with text from a 
database at runtime, depending on a 'language' flag.

HTH,
Willem van den Goorbergh

Op 21-jan-2008, om 13:26 heeft Dave Mennenoh het volgende geschreven:

I may be doing an app that has to be deployed in various languages, and 
I'm trying to find a good method of doing it. I guess my main issue is 
that the interface is Flash, and would be created by a designer. Content 
is pretty much all external, but things like button text, tool tip text, 
etc. are put in place by the designer.


I'd thought of just making different interface 'shells' for the various 
languages, but that'd be more difficult to maintain. What'd be perfect 
is language plugins but then I'm not quite sure on how to handle sizing 
problems - especially with certain languages like chinese.


Just looking for some guidance.


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



=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Geografiek is a Dutch, Utrecht-based map and chart design company.
Willem van den Goorbergh can be contacted by telephone: (+31)30-2719512 
or cell phone: (+31)6-26372378

or by fax: (+31)302719687
snail mail: Hooghiemstraplein 89 3514 AX UTRECHT
Visit our website at: http://www.geografiek.nl
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=


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




--

Glen Pike
01736 759321
www.glenpike.co.uk http://www.glenpike.co.uk
___
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] MultiLanguage

2008-01-21 Thread Matthew James Poole
Failing all that just code your own buttons using scale-9 so they can
stretch to fit the text...

... If that seems like hard work, maybe the project should be done in
Flex which has a localisation API and a framework specifically designed
to handle this sort of dynamically changing interface 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dennis -
I Sioux
Sent: 21 January 2008 13:36
To: [EMAIL PROTECTED]; Flash Coders List
Subject: Re: [Flashcoders] MultiLanguage

I agree with Glen on the stringpanel part.
I've done a big project in the past with multilanguage games..
stringpanel is a good start.. although if you want to give the user the
possibility to select the language at runtime you had to code that
yourself into the panel.. (that was made back in flash 7 though.. might
be in there right now) ..

Translating it on forhand isn't always an option.. somtimes the product
gets popular and a new country/language is added..
The way we did it is to keep space for larger languages in the design..
and if it isn't possible to translate it shorter.. it will always be a
pain in the @ss.. but there should be a balance to keep the
designer/design happy and the translations/translators good..

We made an extra panel to add character sets to all textfields on the
press of a button.. this way it is easier to add a new character set.

Hope this helps..

With kind regards,

Dennis
Isioux

- Original Message -
From: Glen Pike [EMAIL PROTECTED]
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Monday, January 21, 2008 2:01 PM
Subject: Re: [Flashcoders] MultiLanguage


 Hi,

Look at using the Strings Panel - it's in FL8, probably in CS3.
This 
 lets you attach an ID to all your text fields, etc. and define
languages 
 in XML.  The help has more in depth stuff about this, but that is a
good 
 start.

You may also want to ensure all your translation is done before the

 designer starts, otherwise they might start getting stressed when you
ask 
 them to resize a button for German, etc.

Glen

 Geografiek wrote:
 Hi Dave,
 I would ask the designer to put all the text in dynamic textFields
(and 
 fill them w3ith dummy text).
 You can than adress these TextFields and fill them with text from a 
 database at runtime, depending on a 'language' flag.
 HTH,
 Willem van den Goorbergh

 Op 21-jan-2008, om 13:26 heeft Dave Mennenoh het volgende geschreven:

 I may be doing an app that has to be deployed in various languages,
and 
 I'm trying to find a good method of doing it. I guess my main issue
is 
 that the interface is Flash, and would be created by a designer.
Content 
 is pretty much all external, but things like button text, tool tip
text, 
 etc. are put in place by the designer.

 I'd thought of just making different interface 'shells' for the
various 
 languages, but that'd be more difficult to maintain. What'd be
perfect 
 is language plugins but then I'm not quite sure on how to handle
sizing 
 problems - especially with certain languages like chinese.

 Just looking for some guidance.


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


 =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
 Geografiek is a Dutch, Utrecht-based map and chart design company.
 Willem van den Goorbergh can be contacted by telephone:
(+31)30-2719512 
 or cell phone: (+31)6-26372378
 or by fax: (+31)302719687
 snail mail: Hooghiemstraplein 89 3514 AX UTRECHT
 Visit our website at: http://www.geografiek.nl
 =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=


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



 -- 

 Glen Pike
 01736 759321
 www.glenpike.co.uk http://www.glenpike.co.uk
 ___
 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 e-mail has been scanned for viruses by the Virtual Universe e-mail
security system - powered by MessageLabs.
http://www.virtual-universe.net

__

Virtual Universe Ltd, 28-39 The Quadrant, 135 Salusbury Road, London  NW6 6RJ

Tel:  +44 (0) 870 788 6000  

Fax: +44 (0) 870 788 6689

Web:www.virtual-universe.net

-

CONFIDENTIALITY NOTICE

This e-mail may contain information which is confidential and privileged. If 
you are not the named addressee of this e-mail, you may not copy or use it, or 
forward or otherwise disclose it to anyone else. If you have 

[Flashcoders] AS3 addChild() strange behaviour

2008-01-21 Thread Toby de Havilland
Hi Guys,

I have run into a strange problem and its seriously affecting my deadline, i
just cant seem to find the problem.

- I am using PureMVC and as3.
- I am building a dynamic menu based on XML returned from the server
- I am attaching MovieClips from the flash IDE library dynamically
- Some of these Library MovieClips contain small amounts of code (rollovers,
stop() commands etc)

If i simply build the menu and do not request the XML the menu appears fine
at the actionscript inside the MenuItemMC works as expected.

If i invoke my HTTPService to request the XML, and fire a PureMVC
sendNotification() when the data is returned and then call
buildMenuItems()... the actionscript inside the MenuItemMC is ignored.

Has anyone else seen this problem where MovieClips added using addChild()
appear to ignore their timeline scripts?

-- 
Regards,

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


Re: [Flashcoders] AS3 addChild() strange behaviour

2008-01-21 Thread Matthias Dittgen
yes, I have seen problems like these a lot, lately.
Do you gotoAndStop/gotoAndPlay on the timeline?

If so, your timeline does not execute their script as expected?
Timelines are very different in their behavior from AS2 based
timelines. So for example a dynamic textField with the same instance
name given in the Flash IDE but in different keyframes on the same
timeline, is not initialized after a gotoAndStop to that keyframe. It
also losses their dynamically assigned text value and so on...
AFAIK there are only workaround to this problem. You can wait for that
frame to be initialized. An elegant way to do so is to use
addFrameScript.

But perhaps you have a different problem, which relates to pureMVC or the like.

hth,
Matthias

On Jan 21, 2008 4:23 PM, Toby de Havilland [EMAIL PROTECTED] wrote:
 Hi Guys,

 I have run into a strange problem and its seriously affecting my deadline, i
 just cant seem to find the problem.

 - I am using PureMVC and as3.
 - I am building a dynamic menu based on XML returned from the server
 - I am attaching MovieClips from the flash IDE library dynamically
 - Some of these Library MovieClips contain small amounts of code (rollovers,
 stop() commands etc)

 If i simply build the menu and do not request the XML the menu appears fine
 at the actionscript inside the MenuItemMC works as expected.

 If i invoke my HTTPService to request the XML, and fire a PureMVC
 sendNotification() when the data is returned and then call
 buildMenuItems()... the actionscript inside the MenuItemMC is ignored.

 Has anyone else seen this problem where MovieClips added using addChild()
 appear to ignore their timeline scripts?

 --
 Regards,

 Toby de Havilland.
 ___
 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] load flv and its metadata without start to play

2008-01-21 Thread Matthias Dittgen
Steven,

I can't figure out a way to use ByteArray. I am able to load the flv
as ByteArray, but I can't see a way to load this into a Netstream
object. Any thought on that?

private function load(url:String):void
{
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE,completeHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR,errorHandler);
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,errorHandler);
loader.dataFormat = URLLoaderDataFormat.BINARY;
loader.load(new URLRequest(url));
}

private function completeHandler(e:Event):void
{
var loader:URLLoader = e.target as URLLoader;
trace(loader.data); // :-) how to go on from here?
}

Matthias

On Jan 21, 2008 12:48 PM, Matthias Dittgen [EMAIL PROTECTED] wrote:
 Hello Steven,

 yes, I noticed that. I am waiting for ns.bytesLoaded == ns.bytesTotal,
 and I wait even until  metadata are received, as mentioned earlier.
 I have shut off the unwanted sound behavior now, but don't know, how I did it.

 pause(false) ist AS2, Steven?
 AS3/FlexBuilder doesn't allow me to have parameters for ns.pause().

 Sure, we talk about flv from file and ns.play(urlToFile).

 I changed ns.bufferTime to a higher value, now.
 That's everything I changed lately, and waiting for metadata seems to
 become faster (can't explain). I know, that it'll take time to load
 the header/metadata portion of a flv, Steven, but it felt to long.
 Now, with bigger buffer time (sounds crazy, I know) it is much faster.

 I'll try the ByteArray idea...

 Regards,
 Matthias


 On Jan 21, 2008 12:07 PM, Steven Sacks [EMAIL PROTECTED] wrote:
  Glen,
 
  Unfortunately, I discovered a bug with the code I posted. The
  NetStream.Buffer.Flush does not fire if the NetStream is paused.  You
  have to check to see if the ns.bytesLoaded == ns.bytesTotal in the
  onProgress.
 
 
  Matthias,
 
  I have never had any unwanted sound behavior when I use:
 
  ns.play(src);
  ns.pause(true);
 
  If you are hearing an audio blip, it's simple to fix by applying a
  SoundTransform with the volume set to 0 before you play/pause the NetStream.
 
  var transform:SoundTransform = ns.soundTransform;
  transform.volume = 0;
  ns.soundTransform = transform;
  ns.play(src);
  ns.pause(true);
 
  For the sake of this discussion, I'm going to assume we're talking about
  progressive downloads as opposed to FLVs streamed from FMS.
 
  You cannot attach a single NetStream to multiple Video instances.
 
  If you fully load an FLV and caching is turned on (never a guarantee,
  but likely) then the FLV will load instantly for the next NetStream that
  loads it.  HOWEVER, if it is not cached and you start a second NetStream
  to load the same FLV before it is finished loading, it will load the
  entire file again since it's technically not cached according to the
  browser.
 
  I disagree that waiting for metadata is really ugly.  How is any
  client, Flash or otherwise, supposed to know anything about a file it's
  loading before it starts loading it?  The only way it could is if you
  hard-code it ahead of time because you know what it is.
 
  If you're waiting for Flash to determine it dynamically, it has to
  access the file to get the header information (metadata) that describes
  the FLV.  Because you can play/pause, the metadata can come before you
  even addChild() the video to the display stack.
 
  I don't see how any of this could be considered really ugly but if you
  do end up writing a psychic script that can determine a file's header
  data without ever accessing the file, be sure to let us know.  ;)
 
  The ByteArray idea might work, I've never tried it, and it would
  probably take you anywhere from 5-15 minutes to try it out.  I'm not
  sure what benefit it would provide you other than guaranteeing that it
  would be stored in memory if browser cache was turned off.  At best, you
  might get a few milliseconds faster start-up loading from a ByteArray vs
  from cache.
 
 
  Steven Sacks
  Flash Maestro
  Los Angeles, CA
  --
  blog: http://www.stevensacks.net
  gaia: http://www.gaiaflashframework.com
 
 
  Matthias Dittgen wrote:
   Hi Glen,
  
   thanks, but that's exactly what I do, but it answers not the related 
   questions:
  
   a) what, if I need the video for a second DisplayObject at the same
   time on stage, does it load faster, because it was cached?
  
   b) play() and pause() leads to unwanted sound behaviors when the video
   consists of sound
  
   c) how to set the video to the real size? I always need to wait for
   metadata, which is really ugly. Otherwise the video is set to default
   320x480.
  
   Any thoughts?
  
   Is it perhaps possible to load the FLV as ByteArray and later load the
   Netstream from this ByteArray, which might be faster and done a second
   time, too?
  
   Matthias
 
  ___
  Flashcoders mailing list
  

Re: [Flashcoders] MultiLanguage

2008-01-21 Thread Dave Mennenoh
Thanks for all the suggestions. I have thought of Flex, but have not used 
before, so I wouldn't feel comfortable. I like the idea of just leaving room 
in the design. Some testing will be required, but this may work.
Anyone recommend a good translation service? It may be upwards of eight 
languages - but it's not a lot of text... I think the Help will be the 
most - much of it will be single words used for buttons.




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


Re: [Flashcoders] load flv and its metadata without start to play

2008-01-21 Thread Glen Pike

Hi,

   Have a look at these 2 possible things to combine / work-around 
getting the meta-data  streaming via PHP.  It is a different thing 
altogether, but you may be able to parse the FLV's and store the data in 
XML or something?


   
http://www.flashcomguru.com/index.cfm/2005/11/2/Streaming-flv-video-via-PHP-take-two


   http://getid3.sourceforge.net/

   Glen

Matthias Dittgen wrote:

Steven,

I can't figure out a way to use ByteArray. I am able to load the flv
as ByteArray, but I can't see a way to load this into a Netstream
object. Any thought on that?

private function load(url:String):void
{
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE,completeHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR,errorHandler);
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,errorHandler);
loader.dataFormat = URLLoaderDataFormat.BINARY;
loader.load(new URLRequest(url));
}

private function completeHandler(e:Event):void
{
var loader:URLLoader = e.target as URLLoader;
trace(loader.data); // :-) how to go on from here?
}

Matthias

On Jan 21, 2008 12:48 PM, Matthias Dittgen [EMAIL PROTECTED] wrote:
  

Hello Steven,

yes, I noticed that. I am waiting for ns.bytesLoaded == ns.bytesTotal,
and I wait even until  metadata are received, as mentioned earlier.
I have shut off the unwanted sound behavior now, but don't know, how I did it.

pause(false) ist AS2, Steven?
AS3/FlexBuilder doesn't allow me to have parameters for ns.pause().

Sure, we talk about flv from file and ns.play(urlToFile).

I changed ns.bufferTime to a higher value, now.
That's everything I changed lately, and waiting for metadata seems to
become faster (can't explain). I know, that it'll take time to load
the header/metadata portion of a flv, Steven, but it felt to long.
Now, with bigger buffer time (sounds crazy, I know) it is much faster.

I'll try the ByteArray idea...

Regards,
Matthias


On Jan 21, 2008 12:07 PM, Steven Sacks [EMAIL PROTECTED] wrote:


Glen,

Unfortunately, I discovered a bug with the code I posted. The
NetStream.Buffer.Flush does not fire if the NetStream is paused.  You
have to check to see if the ns.bytesLoaded == ns.bytesTotal in the
onProgress.


Matthias,

I have never had any unwanted sound behavior when I use:

ns.play(src);
ns.pause(true);

If you are hearing an audio blip, it's simple to fix by applying a
SoundTransform with the volume set to 0 before you play/pause the NetStream.

var transform:SoundTransform = ns.soundTransform;
transform.volume = 0;
ns.soundTransform = transform;
ns.play(src);
ns.pause(true);

For the sake of this discussion, I'm going to assume we're talking about
progressive downloads as opposed to FLVs streamed from FMS.

You cannot attach a single NetStream to multiple Video instances.

If you fully load an FLV and caching is turned on (never a guarantee,
but likely) then the FLV will load instantly for the next NetStream that
loads it.  HOWEVER, if it is not cached and you start a second NetStream
to load the same FLV before it is finished loading, it will load the
entire file again since it's technically not cached according to the
browser.

I disagree that waiting for metadata is really ugly.  How is any
client, Flash or otherwise, supposed to know anything about a file it's
loading before it starts loading it?  The only way it could is if you
hard-code it ahead of time because you know what it is.

If you're waiting for Flash to determine it dynamically, it has to
access the file to get the header information (metadata) that describes
the FLV.  Because you can play/pause, the metadata can come before you
even addChild() the video to the display stack.

I don't see how any of this could be considered really ugly but if you
do end up writing a psychic script that can determine a file's header
data without ever accessing the file, be sure to let us know.  ;)

The ByteArray idea might work, I've never tried it, and it would
probably take you anywhere from 5-15 minutes to try it out.  I'm not
sure what benefit it would provide you other than guaranteeing that it
would be stored in memory if browser cache was turned off.  At best, you
might get a few milliseconds faster start-up loading from a ByteArray vs
from cache.


Steven Sacks
Flash Maestro
Los Angeles, CA
--
blog: http://www.stevensacks.net
gaia: http://www.gaiaflashframework.com


Matthias Dittgen wrote:
  

Hi Glen,

thanks, but that's exactly what I do, but it answers not the related questions:

a) what, if I need the video for a second DisplayObject at the same
time on stage, does it load faster, because it was cached?

b) play() and pause() leads to unwanted sound behaviors when the video
consists of sound

c) how to set the video to the real size? I always need to wait for
metadata, which is really ugly. Otherwise the video is set to default
320x480.

Any thoughts?

Is it perhaps possible to load the FLV as ByteArray 

Re: [Flashcoders] load flv and its metadata without start to play

2008-01-21 Thread Jason Van Cleave
you could use flvtool2 to get the metadata server-side and store it in a
database

http://www.inlet-media.de/

flvtool2 -P Prints out meta data to stdout

On Jan 21, 2008 11:31 AM, Glen Pike [EMAIL PROTECTED] wrote:

 Hi,

Have a look at these 2 possible things to combine / work-around
 getting the meta-data  streaming via PHP.  It is a different thing
 altogether, but you may be able to parse the FLV's and store the data in
 XML or something?



 http://www.flashcomguru.com/index.cfm/2005/11/2/Streaming-flv-video-via-PHP-take-two

http://getid3.sourceforge.net/

Glen

 Matthias Dittgen wrote:
  Steven,
 
  I can't figure out a way to use ByteArray. I am able to load the flv
  as ByteArray, but I can't see a way to load this into a Netstream
  object. Any thought on that?
 
  private function load(url:String):void
  {
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE,completeHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR,errorHandler);
loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR
 ,errorHandler);
loader.dataFormat = URLLoaderDataFormat.BINARY;
loader.load(new URLRequest(url));
  }
 
  private function completeHandler(e:Event):void
  {
var loader:URLLoader = e.target as URLLoader;
trace(loader.data); // :-) how to go on from here?
  }
 
  Matthias
 
  On Jan 21, 2008 12:48 PM, Matthias Dittgen [EMAIL PROTECTED] wrote:
 
  Hello Steven,
 
  yes, I noticed that. I am waiting for ns.bytesLoaded == ns.bytesTotal,
  and I wait even until  metadata are received, as mentioned earlier.
  I have shut off the unwanted sound behavior now, but don't know, how I
 did it.
 
  pause(false) ist AS2, Steven?
  AS3/FlexBuilder doesn't allow me to have parameters for ns.pause().
 
  Sure, we talk about flv from file and ns.play(urlToFile).
 
  I changed ns.bufferTime to a higher value, now.
  That's everything I changed lately, and waiting for metadata seems to
  become faster (can't explain). I know, that it'll take time to load
  the header/metadata portion of a flv, Steven, but it felt to long.
  Now, with bigger buffer time (sounds crazy, I know) it is much faster.
 
  I'll try the ByteArray idea...
 
  Regards,
  Matthias
 
 
  On Jan 21, 2008 12:07 PM, Steven Sacks [EMAIL PROTECTED]
 wrote:
 
  Glen,
 
  Unfortunately, I discovered a bug with the code I posted. The
  NetStream.Buffer.Flush does not fire if the NetStream is paused.  You
  have to check to see if the ns.bytesLoaded == ns.bytesTotal in the
  onProgress.
 
 
  Matthias,
 
  I have never had any unwanted sound behavior when I use:
 
  ns.play(src);
  ns.pause(true);
 
  If you are hearing an audio blip, it's simple to fix by applying a
  SoundTransform with the volume set to 0 before you play/pause the
 NetStream.
 
  var transform:SoundTransform = ns.soundTransform;
  transform.volume = 0;
  ns.soundTransform = transform;
  ns.play(src);
  ns.pause(true);
 
  For the sake of this discussion, I'm going to assume we're talking
 about
  progressive downloads as opposed to FLVs streamed from FMS.
 
  You cannot attach a single NetStream to multiple Video instances.
 
  If you fully load an FLV and caching is turned on (never a guarantee,
  but likely) then the FLV will load instantly for the next NetStream
 that
  loads it.  HOWEVER, if it is not cached and you start a second
 NetStream
  to load the same FLV before it is finished loading, it will load the
  entire file again since it's technically not cached according to the
  browser.
 
  I disagree that waiting for metadata is really ugly.  How is any
  client, Flash or otherwise, supposed to know anything about a file
 it's
  loading before it starts loading it?  The only way it could is if you
  hard-code it ahead of time because you know what it is.
 
  If you're waiting for Flash to determine it dynamically, it has to
  access the file to get the header information (metadata) that
 describes
  the FLV.  Because you can play/pause, the metadata can come before you
  even addChild() the video to the display stack.
 
  I don't see how any of this could be considered really ugly but if
 you
  do end up writing a psychic script that can determine a file's header
  data without ever accessing the file, be sure to let us know.  ;)
 
  The ByteArray idea might work, I've never tried it, and it would
  probably take you anywhere from 5-15 minutes to try it out.  I'm not
  sure what benefit it would provide you other than guaranteeing that it
  would be stored in memory if browser cache was turned off.  At best,
 you
  might get a few milliseconds faster start-up loading from a ByteArray
 vs
  from cache.
 
 
  Steven Sacks
  Flash Maestro
  Los Angeles, CA
  --
  blog: http://www.stevensacks.net
  gaia: http://www.gaiaflashframework.com
 
 
  Matthias Dittgen wrote:
 
  Hi Glen,
 
  thanks, but that's exactly what I do, but it answers not the related
 questions:
 
  a) what, if I need 

RE: [Flashcoders] MultiLanguage

2008-01-21 Thread Pete Hotchkiss
Dave

I've lost count of the number of apps like this we've worked on. There
are several issues here to address that are wider reaching than just
TextFormatting.

Firstly you need to think about the character sets each of the various
versions will need for deployment. Are all of your required versions
only going to require Latin characters ? What about Crylic and other
more complicated requirements ? Your choice of typeface (and available
character sets) will could be limiting unless you plan carefully. After
all there's no point over-weighting a .swf file with characters your not
going to use.

Look at shared fonts as your best solution to this. By loading an
external .SWF file with the required font, and/or font nodes you can
dynamically change the display at run-time, negating the need to
re-compile the file for each version.

From the storage of content - I'd always recommend to run with XML.
Makes it soo much easier to change elements at runtime than the
flash panel which relies on the end user being able to re-compile the
flash. 

In terms of the language variations affecting design - this one
ultimately comes down to educating the creative to design/produce a
framework which allows for flexibility. If you need customised 'pretty'
buttons then build them as extensions of the components (or custom ones
from scratch) that will automatically size where needed. 

Pete

 


 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dave
Mennenoh
Sent: 21 January 2008 13:00
To: Flash Coders List
Subject: Re: [Flashcoders] MultiLanguage

Right, thanks. I realize that, my concern is still sizing issues though.

This will be an app that is 'pretty' it has nice looking buttons and
such. 
If everything could be scrollable text fields I would have no problem. 
Consider something as something as simple as 'stop', which is something
like 'anschlag' in german. Doubling the character count in a field can
make a big diff for formatting...

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 email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
__

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


Re: [Flashcoders] load flv and its metadata without start to play

2008-01-21 Thread Matthias Dittgen
Hi Jason,

that's true. Of course I could read out all metadata and store it into
an array or xml. It's the usual decision of flashdevelopers to have a
every-situation-solution vs. a best-for-this-project-solution, right?
;)

Thanks,
Matthias

On Jan 21, 2008 6:07 PM, Jason Van Cleave [EMAIL PROTECTED] wrote:
 you could use flvtool2 to get the metadata server-side and store it in a
 database

 http://www.inlet-media.de/

 flvtool2 -P Prints out meta data to stdout


 On Jan 21, 2008 11:31 AM, Glen Pike [EMAIL PROTECTED] wrote:

  Hi,
 
 Have a look at these 2 possible things to combine / work-around
  getting the meta-data  streaming via PHP.  It is a different thing
  altogether, but you may be able to parse the FLV's and store the data in
  XML or something?
 
 
 
  http://www.flashcomguru.com/index.cfm/2005/11/2/Streaming-flv-video-via-PHP-take-two
 
 http://getid3.sourceforge.net/
 
 Glen
 
  Matthias Dittgen wrote:
   Steven,
  
   I can't figure out a way to use ByteArray. I am able to load the flv
   as ByteArray, but I can't see a way to load this into a Netstream
   object. Any thought on that?
  
   private function load(url:String):void
   {
 var loader:URLLoader = new URLLoader();
 loader.addEventListener(Event.COMPLETE,completeHandler);
 loader.addEventListener(IOErrorEvent.IO_ERROR,errorHandler);
 loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR
  ,errorHandler);
 loader.dataFormat = URLLoaderDataFormat.BINARY;
 loader.load(new URLRequest(url));
   }
  
   private function completeHandler(e:Event):void
   {
 var loader:URLLoader = e.target as URLLoader;
 trace(loader.data); // :-) how to go on from here?
   }
  
   Matthias
  
   On Jan 21, 2008 12:48 PM, Matthias Dittgen [EMAIL PROTECTED] wrote:
  
   Hello Steven,
  
   yes, I noticed that. I am waiting for ns.bytesLoaded == ns.bytesTotal,
   and I wait even until  metadata are received, as mentioned earlier.
   I have shut off the unwanted sound behavior now, but don't know, how I
  did it.
  
   pause(false) ist AS2, Steven?
   AS3/FlexBuilder doesn't allow me to have parameters for ns.pause().
  
   Sure, we talk about flv from file and ns.play(urlToFile).
  
   I changed ns.bufferTime to a higher value, now.
   That's everything I changed lately, and waiting for metadata seems to
   become faster (can't explain). I know, that it'll take time to load
   the header/metadata portion of a flv, Steven, but it felt to long.
   Now, with bigger buffer time (sounds crazy, I know) it is much faster.
  
   I'll try the ByteArray idea...
  
   Regards,
   Matthias
  
  
   On Jan 21, 2008 12:07 PM, Steven Sacks [EMAIL PROTECTED]
  wrote:
  
   Glen,
  
   Unfortunately, I discovered a bug with the code I posted. The
   NetStream.Buffer.Flush does not fire if the NetStream is paused.  You
   have to check to see if the ns.bytesLoaded == ns.bytesTotal in the
   onProgress.
  
  
   Matthias,
  
   I have never had any unwanted sound behavior when I use:
  
   ns.play(src);
   ns.pause(true);
  
   If you are hearing an audio blip, it's simple to fix by applying a
   SoundTransform with the volume set to 0 before you play/pause the
  NetStream.
  
   var transform:SoundTransform = ns.soundTransform;
   transform.volume = 0;
   ns.soundTransform = transform;
   ns.play(src);
   ns.pause(true);
  
   For the sake of this discussion, I'm going to assume we're talking
  about
   progressive downloads as opposed to FLVs streamed from FMS.
  
   You cannot attach a single NetStream to multiple Video instances.
  
   If you fully load an FLV and caching is turned on (never a guarantee,
   but likely) then the FLV will load instantly for the next NetStream
  that
   loads it.  HOWEVER, if it is not cached and you start a second
  NetStream
   to load the same FLV before it is finished loading, it will load the
   entire file again since it's technically not cached according to the
   browser.
  
   I disagree that waiting for metadata is really ugly.  How is any
   client, Flash or otherwise, supposed to know anything about a file
  it's
   loading before it starts loading it?  The only way it could is if you
   hard-code it ahead of time because you know what it is.
  
   If you're waiting for Flash to determine it dynamically, it has to
   access the file to get the header information (metadata) that
  describes
   the FLV.  Because you can play/pause, the metadata can come before you
   even addChild() the video to the display stack.
  
   I don't see how any of this could be considered really ugly but if
  you
   do end up writing a psychic script that can determine a file's header
   data without ever accessing the file, be sure to let us know.  ;)
  
   The ByteArray idea might work, I've never tried it, and it would
   probably take you anywhere from 5-15 minutes to try it out.  I'm not
   sure what benefit it would provide you other than guaranteeing that it
   

Re: [Flashcoders] load flv and its metadata without start to play

2008-01-21 Thread Matthias Dittgen
Hi Glen,

i am somewhat satisfied with my current solution, now, but this is a
really interesting ressource you mentioned! Thanks for sharing!

Matthias

On Jan 21, 2008 5:31 PM, Glen Pike [EMAIL PROTECTED] wrote:
 Hi,

 Have a look at these 2 possible things to combine / work-around
 getting the meta-data  streaming via PHP.  It is a different thing
 altogether, but you may be able to parse the FLV's and store the data in
 XML or something?


 http://www.flashcomguru.com/index.cfm/2005/11/2/Streaming-flv-video-via-PHP-take-two

 http://getid3.sourceforge.net/

 Glen


 Matthias Dittgen wrote:
  Steven,
 
  I can't figure out a way to use ByteArray. I am able to load the flv
  as ByteArray, but I can't see a way to load this into a Netstream
  object. Any thought on that?
 
  private function load(url:String):void
  {
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE,completeHandler);
loader.addEventListener(IOErrorEvent.IO_ERROR,errorHandler);

  loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,errorHandler);
loader.dataFormat = URLLoaderDataFormat.BINARY;
loader.load(new URLRequest(url));
  }
 
  private function completeHandler(e:Event):void
  {
var loader:URLLoader = e.target as URLLoader;
trace(loader.data); // :-) how to go on from here?
  }
 
  Matthias
 
  On Jan 21, 2008 12:48 PM, Matthias Dittgen [EMAIL PROTECTED] wrote:
 
  Hello Steven,
 
  yes, I noticed that. I am waiting for ns.bytesLoaded == ns.bytesTotal,
  and I wait even until  metadata are received, as mentioned earlier.
  I have shut off the unwanted sound behavior now, but don't know, how I did 
  it.
 
  pause(false) ist AS2, Steven?
  AS3/FlexBuilder doesn't allow me to have parameters for ns.pause().
 
  Sure, we talk about flv from file and ns.play(urlToFile).
 
  I changed ns.bufferTime to a higher value, now.
  That's everything I changed lately, and waiting for metadata seems to
  become faster (can't explain). I know, that it'll take time to load
  the header/metadata portion of a flv, Steven, but it felt to long.
  Now, with bigger buffer time (sounds crazy, I know) it is much faster.
 
  I'll try the ByteArray idea...
 
  Regards,
  Matthias
 
 
  On Jan 21, 2008 12:07 PM, Steven Sacks [EMAIL PROTECTED] wrote:
 
  Glen,
 
  Unfortunately, I discovered a bug with the code I posted. The
  NetStream.Buffer.Flush does not fire if the NetStream is paused.  You
  have to check to see if the ns.bytesLoaded == ns.bytesTotal in the
  onProgress.
 
 
  Matthias,
 
  I have never had any unwanted sound behavior when I use:
 
  ns.play(src);
  ns.pause(true);
 
  If you are hearing an audio blip, it's simple to fix by applying a
  SoundTransform with the volume set to 0 before you play/pause the 
  NetStream.
 
  var transform:SoundTransform = ns.soundTransform;
  transform.volume = 0;
  ns.soundTransform = transform;
  ns.play(src);
  ns.pause(true);
 
  For the sake of this discussion, I'm going to assume we're talking about
  progressive downloads as opposed to FLVs streamed from FMS.
 
  You cannot attach a single NetStream to multiple Video instances.
 
  If you fully load an FLV and caching is turned on (never a guarantee,
  but likely) then the FLV will load instantly for the next NetStream that
  loads it.  HOWEVER, if it is not cached and you start a second NetStream
  to load the same FLV before it is finished loading, it will load the
  entire file again since it's technically not cached according to the
  browser.
 
  I disagree that waiting for metadata is really ugly.  How is any
  client, Flash or otherwise, supposed to know anything about a file it's
  loading before it starts loading it?  The only way it could is if you
  hard-code it ahead of time because you know what it is.
 
  If you're waiting for Flash to determine it dynamically, it has to
  access the file to get the header information (metadata) that describes
  the FLV.  Because you can play/pause, the metadata can come before you
  even addChild() the video to the display stack.
 
  I don't see how any of this could be considered really ugly but if you
  do end up writing a psychic script that can determine a file's header
  data without ever accessing the file, be sure to let us know.  ;)
 
  The ByteArray idea might work, I've never tried it, and it would
  probably take you anywhere from 5-15 minutes to try it out.  I'm not
  sure what benefit it would provide you other than guaranteeing that it
  would be stored in memory if browser cache was turned off.  At best, you
  might get a few milliseconds faster start-up loading from a ByteArray vs
  from cache.
 
 
  Steven Sacks
  Flash Maestro
  Los Angeles, CA
  --
  blog: http://www.stevensacks.net
  gaia: http://www.gaiaflashframework.com
 
 
  Matthias Dittgen wrote:
 
  Hi Glen,
 
  thanks, but that's exactly what I do, but it answers not the related 
  questions:
 
  a) what, if I need the 

[Flashcoders] Recommendations to access cache

2008-01-21 Thread Helmut Granda
Hi all,

When loading elements to the cache.. how can we ensure that when we try to
access the same element later during the life of an application that the
same element will be accessed from cache rather than re-loading the same
file?

For example I want to load 300 graphics to cache while the first section of
my movie is playing (rather than preaload them all and make the user wait
long). When I try to access the same element from within the movie, will
those elements be accessed from cache or will the be re-loaded?

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


[Flashcoders] Re: Recommendations to access cache

2008-01-21 Thread Helmut Granda
I think I found the answer to my question: Bulk Loader:
http://code.google.com/p/bulk-loader/

On 1/21/08, Helmut Granda [EMAIL PROTECTED] wrote:

 Hi all,

 When loading elements to the cache.. how can we ensure that when we try to
 access the same element later during the life of an application that the
 same element will be accessed from cache rather than re-loading the same
 file?

 For example I want to load 300 graphics to cache while the first section
 of my movie is playing (rather than preaload them all and make the user wait
 long). When I try to access the same element from within the movie, will
 those elements be accessed from cache or will the be re-loaded?

 --
 ...helmut




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


Re: [Flashcoders] Recommendations to access cache

2008-01-21 Thread Glen Pike
Yes, if you Preload your stuff will go into the cache whatever 
algorithm you use to preload them.


You can use LiveHTTPHeaders for Firefox or some kind of network debugger 
like Charles to see what happens when elements are requested.  If they 
are requested and cached, you will see lots of HTTP 304 responses for 
various requests from the server meaning that the item has not been 
modified on the server so it will be loaded from the cache.  Then clear 
your cache and do the same again, you will probably get lots ot HTTP 200 
responses for the same files as it downloads them again.


You can preload everything at the start, or do it behind the scenes, 
which I try to do.


Glen

Helmut Granda wrote:

Hi all,

When loading elements to the cache.. how can we ensure that when we try to
access the same element later during the life of an application that the
same element will be accessed from cache rather than re-loading the same
file?

For example I want to load 300 graphics to cache while the first section of
my movie is playing (rather than preaload them all and make the user wait
long). When I try to access the same element from within the movie, will
those elements be accessed from cache or will the be re-loaded?

  


--

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


Re: [Flashcoders] Recommendations to access cache

2008-01-21 Thread Mark Winterhalder
 When loading elements to the cache.. how can we ensure that when we try to
 access the same element later during the life of an application that the
 same element will be accessed from cache rather than re-loading the same
 file?

You can't. You can keep it in memory as long as the movie plays, but
you can't rely on the browser cache. The user might even have turned
cache off.
An alternative could be using a local SharedObject. It's not 100%
reliable, either, but at least you know when it fails.

Mark


On Jan 22, 2008 12:04 AM, Helmut Granda [EMAIL PROTECTED] wrote:
 Hi all,

 When loading elements to the cache.. how can we ensure that when we try to
 access the same element later during the life of an application that the
 same element will be accessed from cache rather than re-loading the same
 file?

 For example I want to load 300 graphics to cache while the first section of
 my movie is playing (rather than preaload them all and make the user wait
 long). When I try to access the same element from within the movie, will
 those elements be accessed from cache or will the be re-loaded?

 --
 ...helmut
 ___
 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