[flexcoders] Text/Font with border on characters?

2007-09-21 Thread beecee1977
Hi,

I want to overlay text so that it can be read regardless of the 
background colour (without putting a background behind the text 
itself). So basically I want the text to have a border around each 
character with a different colour - white with black surround for 
example. 

Any ideas how I'd approach this? Will it require a particular font or 
can I handle it from within Flex?

Thanks in advance
Bill



[flexcoders] Re: Text/Font with border on characters?

2007-09-21 Thread beecee1977
You're a star. Thanks a million!

--- In flexcoders@yahoogroups.com, Stephen Allison 
[EMAIL PROTECTED] wrote:

 You could try playing around with the GlowFilter...
 
 mx:Label text=Behold a border! color=white fontSize=36  
 filters={[new GlowFilter(0x00,1,2,2,3,1)]}/
 
 
 On 21 Sep 2007, at 12:19, beecee1977 wrote:
 
  Hi,
 
  I want to overlay text so that it can be read regardless of the
  background colour (without putting a background behind the text
  itself). So basically I want the text to have a border around each
  character with a different colour - white with black surround for
  example.
 
  Any ideas how I'd approach this? Will it require a particular 
font or
  can I handle it from within Flex?
 
  Thanks in advance
  Bill





[flexcoders] Re: still having trouble with breakpoints

2007-06-07 Thread beecee1977
I'll just echo that I see the same thing (again only in .as files 
included by script tags).

For me it's usually after line 500 or so, but no amount of cleaning 
the project or closing reopening Flex fixes it for me. So I do lots 
of moving functions to where I can debug them! :-)


--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] 
wrote:

 On Thursday 07 Jun 2007, Pan Troglodytes wrote:
  Realized some info that might be relevant.  This seems to happen 
in a .as
  file included by a Script tag.  Not sure if I've run into it in 
a regular
  AS class file.
 
 I certainly recall other people having the same problem, but not a 
solution.
 
 -- 
 Tom Chiverton
 Helping to centrally introduce bleeding-edge channels
 on: http://thefalken.livejournal.com
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in 
England and Wales under registered number OC307980 whose registered 
office address is at St James's Court Brown Street Manchester M2 
2JF.  A list of members is available for inspection at the registered 
office. Any reference to a partner in relation to Halliwells LLP 
means a member of Halliwells LLP. Regulated by the Law Society.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named 
above and may be confidential or legally privileged.  If you are not 
the addressee you must not read it and must not use any information 
contained in nor copy it nor inform any person other than Halliwells 
LLP or the addressee of its existence or contents.  If you have 
received this email in error please delete it and notify Halliwells 
LLP IT Department on 0870 365 8008.
 
 For more information about Halliwells LLP visit www.halliwells.com.





[flexcoders] Is there a way to pass on rollOver to parent object?

2007-06-06 Thread beecee1977
Hi,

Just wondering, is it possible to have a child object ignore mouse 
rollOvers so that the parent object can pick it up. (I want the parent 
object's rollOverEffect/rollOutEffect to be activated). 

Thanks in advance
Bill



[flexcoders] Re: Datagrid with bound dataProvider not updating.

2007-06-05 Thread beecee1977
Thanks for all the responses! I took the advice and switched to using 
ArrayCollection and all is working fine now (without hammers :-)) 

Thanks again!

--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 I think Alex called invalidateDisplayList a big hammer.
 
  
 
 The best solution to this is to never use Array, or XMLList for 
dynamic
 dataProviders, since their methods do not dispatch the necessary 
events
 to update the UI.  Instead, wrap Array in ArrayCollection, and 
CMLList
 in XMLListCollection, or use XML directly.
 
  
 
 Tracy
 
  



[flexcoders] Datagrid with bound dataProvider not updating.

2007-05-29 Thread beecee1977
Hi,

I have a datagrid with the dataProvider bound to an array of objects. 

If I remove one of the items from the array the datagrid doesn't update 
to reflect this. Debugging and looking at the dataProvider's length it 
has updated, but that's not what's displayed. 

I've tried using validateNow() but that doesn't work. If I click on one 
of the column headers it updates. Currently I'm having to explicitly 
set the dataProvider in code, but then I lose the binding. 

Any suggestions?

Thanks
Bill 



[flexcoders] Re: VideoDisplay volume problem

2007-05-29 Thread beecee1977
Have you looked at the reply in this thread?

Anyway, here's another thread on same:
http://tech.groups.yahoo.com/group/flexcoders/message/75277

If you don't want to subclass, another trick that might help is setting 
the volume to some random value before setting it to the value you 
want. 

(I think if the volume's value isn't changing it will be ignored, but 
that it has to be set after the video is loaded, so if you keep setting 
it after loading to what it was set to before (but ignored), it won't 
change. I'm not sure I understood that sentence, but I hope it helps! :-
) )

--- In flexcoders@yahoogroups.com, Paul DeCoursey [EMAIL PROTECTED] wrote:

 I am having an issue with a VideoDisplay.  It seems to ignore any
 volume setting I set.  I have tried to set it to 0 at many different
 places and times in my code and every single time I can still hear the
 audio when the video starts.  Has anyone else had this issue?  Does
 anyone have a workaround?
 
 Thanks,
 
 Paul





[flexcoders] Re: Memory leak? IE7 Crashes!

2007-05-29 Thread beecee1977
Still crashing Internet Explorer 7. Surely this is a pretty major 
problem for flash player to be able to do this? Has anyone else seen 
this? Is it because I have a debug version of flash player?

When I look in the Event Viewer I get this log:

Faulting application iexplore.exe, version 7.0.5730.11, faulting 
module fldbg9b.ocx, version 9.0.28.0, fault address 0x001b5063.



--- In flexcoders@yahoogroups.com, beecee1977 [EMAIL PROTECTED] 
wrote:

 Thanks for the reply Tom,
 
 I just have this on a 1 second timer:
 
 public function timerHandler(event:TimerEvent):void {
 time = getTimer()
 totmem = flash.system.System.totalMemory;
 maxmem = Math.max(maxmem, totmem);
 }
 
 I understand that garbage collection doesn't run until it's needed 
 to, but what's causing the memory to go up when there is nothing 
 happening? I know that the timer is running now, but I observe the 
 same behaviour without this timer and just watching memory from the 
 task manager (usually in jumps of 4K or 8K every couple of seconds).
 
 Also while garbage collection usually kicks in a drops the memory 
 back to the starting memory (more or less), sometimes (usually when 
 I've left it overnight, but not alway) the memory will continue to 
 rise to a much higher level (i.e. from 4.5 to 29.5 million bytes) 
 never to be recovered by garbage collection. This is my main 
concern 
 as in my larger application it has lead to my browser crashing on 
 occasion!
 
 Cheers
 Bill
 
 (P.S. You'll find my test application in my original post - switch 
 source to a local video as the flv link I posted doesn't work 
anymore)
 
 --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiverton@ 
 wrote:
 
  On Thursday 24 May 2007, beecee1977 wrote:
   Is it normal for memory to fluctuate when there are no user
   interactions (or timers or anything else in the code)?
  
  Yes. Memory may not be reclaimed unless there is pressure to free 
 some.
  How are you measuring it ? 
  
  -- 
  Tom Chiverton
  Helping to elementarily target dynamic e-services
  on: http://thefalken.livejournal.com
  
  
  
  This email is sent for and on behalf of Halliwells LLP.
  
  Halliwells LLP is a limited liability partnership registered in 
 England and Wales under registered number OC307980 whose registered 
 office address is at St James's Court Brown Street Manchester M2 
 2JF.  A list of members is available for inspection at the 
registered 
 office. Any reference to a partner in relation to Halliwells LLP 
 means a member of Halliwells LLP. Regulated by the Law Society.
  
  CONFIDENTIALITY
  
  This email is intended only for the use of the addressee named 
 above and may be confidential or legally privileged.  If you are 
not 
 the addressee you must not read it and must not use any information 
 contained in nor copy it nor inform any person other than 
Halliwells 
 LLP or the addressee of its existence or contents.  If you have 
 received this email in error please delete it and notify Halliwells 
 LLP IT Department on 0870 365 8008.
  
  For more information about Halliwells LLP visit 
www.halliwells.com.
 





[flexcoders] Re: Memory leak? IE7 Crashes!

2007-05-29 Thread beecee1977
Looks like it's a known issue:

http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?
forumid=44catid=184threadid=1257667enterthread=y

I just hope that it's not exascerbated to something I'm doing in code!

--- In flexcoders@yahoogroups.com, beecee1977 [EMAIL PROTECTED] wrote:

 Still crashing Internet Explorer 7. Surely this is a pretty major 
 problem for flash player to be able to do this? Has anyone else seen 
 this? Is it because I have a debug version of flash player?
 
 When I look in the Event Viewer I get this log:
 
 Faulting application iexplore.exe, version 7.0.5730.11, faulting 
 module fldbg9b.ocx, version 9.0.28.0, fault address 0x001b5063.
 
 
 



[flexcoders] Re: Memory leak? IE7 Crashes!

2007-05-29 Thread beecee1977
Indeed there are. It happens with v9.0.45.0 as well. 

Judging from the link I attached it's not just a problem with the 
debug version, but I'll give it a go and report back. 

--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] 
wrote:

 On Tuesday 29 May 2007, beecee1977 wrote:
  module fldbg9b.ocx, version 9.0.28.0, fault address 0x001b5063.
 
 There are newer releases, aren't there ?
 Is that the debug version ? What about the normal one if so.
 
 -- 
 Tom Chiverton
 Helping to conveniently scale real-time eyeballs
 on: http://thefalken.livejournal.com
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in 
England and Wales under registered number OC307980 whose registered 
office address is at St James's Court Brown Street Manchester M2 
2JF.  A list of members is available for inspection at the registered 
office. Any reference to a partner in relation to Halliwells LLP 
means a member of Halliwells LLP. Regulated by the Law Society.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named 
above and may be confidential or legally privileged.  If you are not 
the addressee you must not read it and must not use any information 
contained in nor copy it nor inform any person other than Halliwells 
LLP or the addressee of its existence or contents.  If you have 
received this email in error please delete it and notify Halliwells 
LLP IT Department on 0870 365 8008.
 
 For more information about Halliwells LLP visit www.halliwells.com.





[flexcoders] Re: Datagrid with bound dataProvider not updating.

2007-05-29 Thread beecee1977
Call refresh() on what? The dataGrid doesn't have a refresh() method.

It is an Array rather than an ArrayCollection. Could that be the 
problem? This could require a lot of refactoring!

Scratch all that... myDatagrid.invalidateDisplayList() did the trick!

Thanks!

--- In flexcoders@yahoogroups.com, Angus Johnson [EMAIL PROTECTED] 
wrote:

 arrayCollection or array? Try calling refresh() after the change.
 
 
 On 29/05/07, beecee1977 [EMAIL PROTECTED] wrote:
 
Hi,
 
  I have a datagrid with the dataProvider bound to an array of 
objects.
 
  If I remove one of the items from the array the datagrid doesn't 
update
  to reflect this. Debugging and looking at the dataProvider's 
length it
  has updated, but that's not what's displayed.
 
  I've tried using validateNow() but that doesn't work. If I click 
on one
  of the column headers it updates. Currently I'm having to 
explicitly
  set the dataProvider in code, but then I lose the binding.
 
  Any suggestions?
 
  Thanks
  Bill
 
   
 





[flexcoders] Re: videoDisplay.volume not working

2007-05-24 Thread beecee1977
Hi,

I started by doing a quick check and then got quite involved in this. 
Turns out there's a fairly simple solution (I think).

There is a bug whereby if you set the volume before the video is 
loaded it doesn't get set properly

I think if you call 
vidDisplay.load();
before setting 
vidDisplay.volume = 0; 
it should work. 

Bizarrely if you just use vidDisplay.play() and set the volume on the 
VideoEvent.READY event it doesn't work though. I've also had problems 
with the vidDisplay object forgetting its volume setting if you 
change the video source and reload (even though the it still reports 
it's volume as 0). It defaults back to 0.75.

Hope that helps
Bill

--- In flexcoders@yahoogroups.com, yiğit boyar [EMAIL PROTECTED] wrote:

 hi;
 i'm setting the volume property of a videoDisplay to 0.0 but when 
the video
 is loaded; there comes sound...
 is this property not working
 or
 is there a crack for this (like flex 1.5 useHandCursor crack)
 or
 what am i making wrong ?
 
 thnks.





[flexcoders] Re: Memory leak in VideoDisplay?

2007-05-24 Thread beecee1977
Hi,

Does anyone have any thoughts on this?

Is it normal for memory to fluctuate when there are no user 
interactions (or timers or anything else in the code)?

With the exact code I included I had the following behaviour:
initial memory: 
~4.5 MB

for a few hours: 
the memory would cycle up to about 6.5 MB before garbage collection 
would kick in and it would go back down to ~4.5MB

The next day:
Memory had hit a max of 29.5MB and even using the hack to run garbage 
collection wouldn't bring it below 26MB

Is there a fault in my code, is this a bug or is this just the normal 
behaviour for an application?

Any feedback would be welcome!
Bill

--- In flexcoders@yahoogroups.com, beecee1977 [EMAIL PROTECTED] 
wrote:

 Hi, 
 
 I've been having memory problems with my application when it's left 
 running overnight in IE7, which often results in IE crashing and a 
 flash9.ocx error popup.
 
 Anyway, I'm struggling to pin down where the problem is coming 
from. 
 I know about the seemingly whimsical nature of when garbage 
 collection is done, but even still this behaviour seems strange to 
 me: 
 
 (See the sample project below) With just a VideoDisplay object 
 playing video (or paused!) the memory will keep going up for a 
couple 
 of Mb at least. At some stage the garbage collection will kick in 
and 
 it will recycle, but is this normal/expected behaviour. It looks 
 funny for my application, which is very video reliant, to have the 
 memory constantly fluctuating even when the user is doing nothing. 
It 
 also makes debugging for my memory leak very tricky. 
 
 Does anyone have any advice for tracking down my problem? Would it 
be 
 making a difference that I have the debug version of flash?
 
 Here's the sample app (not very neat) that demonstrates the 
problem. 
 Just click Load followed by Play/Pause and watch the memory go. 
 Sometimes if I click about on the slider or pause and play or even 
 just leave it for a while the problem becomes more pronounced. 
(Also 
 using the add/remove buttons to add extra components doesn't seem 
to 
 cause the garbage collection to occur)
 




[flexcoders] Re: Memory leak in VideoDisplay?

2007-05-24 Thread beecee1977
Thanks for the reply Tom,

I just have this on a 1 second timer:

public function timerHandler(event:TimerEvent):void {
time = getTimer()
totmem = flash.system.System.totalMemory;
maxmem = Math.max(maxmem, totmem);
}

I understand that garbage collection doesn't run until it's needed 
to, but what's causing the memory to go up when there is nothing 
happening? I know that the timer is running now, but I observe the 
same behaviour without this timer and just watching memory from the 
task manager (usually in jumps of 4K or 8K every couple of seconds).

Also while garbage collection usually kicks in a drops the memory 
back to the starting memory (more or less), sometimes (usually when 
I've left it overnight, but not alway) the memory will continue to 
rise to a much higher level (i.e. from 4.5 to 29.5 million bytes) 
never to be recovered by garbage collection. This is my main concern 
as in my larger application it has lead to my browser crashing on 
occasion!

Cheers
Bill

(P.S. You'll find my test application in my original post - switch 
source to a local video as the flv link I posted doesn't work anymore)

--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] 
wrote:

 On Thursday 24 May 2007, beecee1977 wrote:
  Is it normal for memory to fluctuate when there are no user
  interactions (or timers or anything else in the code)?
 
 Yes. Memory may not be reclaimed unless there is pressure to free 
some.
 How are you measuring it ? 
 
 -- 
 Tom Chiverton
 Helping to elementarily target dynamic e-services
 on: http://thefalken.livejournal.com
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in 
England and Wales under registered number OC307980 whose registered 
office address is at St James's Court Brown Street Manchester M2 
2JF.  A list of members is available for inspection at the registered 
office. Any reference to a partner in relation to Halliwells LLP 
means a member of Halliwells LLP. Regulated by the Law Society.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named 
above and may be confidential or legally privileged.  If you are not 
the addressee you must not read it and must not use any information 
contained in nor copy it nor inform any person other than Halliwells 
LLP or the addressee of its existence or contents.  If you have 
received this email in error please delete it and notify Halliwells 
LLP IT Department on 0870 365 8008.
 
 For more information about Halliwells LLP visit www.halliwells.com.





[flexcoders] Memory leak in VideoDisplay?

2007-05-22 Thread beecee1977
Hi, 

I've been having memory problems with my application when it's left 
running overnight in IE7, which often results in IE crashing and a 
flash9.ocx error popup.

Anyway, I'm struggling to pin down where the problem is coming from. 
I know about the seemingly whimsical nature of when garbage 
collection is done, but even still this behaviour seems strange to 
me: 

(See the sample project below) With just a VideoDisplay object 
playing video (or paused!) the memory will keep going up for a couple 
of Mb at least. At some stage the garbage collection will kick in and 
it will recycle, but is this normal/expected behaviour. It looks 
funny for my application, which is very video reliant, to have the 
memory constantly fluctuating even when the user is doing nothing. It 
also makes debugging for my memory leak very tricky. 

Does anyone have any advice for tracking down my problem? Would it be 
making a difference that I have the debug version of flash?

Here's the sample app (not very neat) that demonstrates the problem. 
Just click Load followed by Play/Pause and watch the memory go. 
Sometimes if I click about on the slider or pause and play or even 
just leave it for a while the problem becomes more pronounced. (Also 
using the add/remove buttons to add extra components doesn't seem to 
cause the garbage collection to occur)

?xml version=1.0?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
verticalScrollPolicy=off layout=absolute 
creationComplete=initTimer() bottom=0  height=648
mx:Script![CDATA[
import flash.utils.Timer;
import flash.events.TimerEvent;

[Bindable]
public var time:Number = 0;
[Bindable]
public var totmem:Number = 0;
[Bindable]
public var maxmem:Number = 0;
[Bindable]
public var initmem:Number = 0;


private var mCount:int = 0;

public function initTimer():void {
// The first parameter is the interval (in milliseconds). 
The 
// second parameter is number of times to run (0 means 
infinity).
var myTimer:Timer = new Timer(1000, 0);
myTimer.addEventListener(timer, timerHandler);
myTimer.start();
initmem = flash.system.System.totalMemory;

}

public function timerHandler(event:TimerEvent):void {
time = getTimer()
totmem = flash.system.System.totalMemory;
maxmem = Math.max(maxmem, totmem);
}
private function add():void
{
var theLabel:Label = new Label();   
theLabel.condenseWhite=false;   

theLabel.text= testing;
theLabel.name = id+ mCount;
mCount++;
theLabel.truncateToFit=true;
this.box.addChild(theLabel);
}
private function remove():void
{
mCount--;
var theLab:Label = Label(this.box.getChildByName(id 
+ mCount))
this.box.removeChild(theLab)
}
private function gc():void
{
try 
{
var lc1:LocalConnection = new 
LocalConnection();
var lc2:LocalConnection = new 
LocalConnection();

lc1.connect('name');
lc2.connect('name');
}
catch (e:Error) {}
}

private function slider_change():void
{
vid.playheadTime = slider.value
}

private function loadVid():void
{

vid.source='http://www.youtube.com/get_video.php?
video_id=GTXinF8ZVCot=OEgsToPDskJ4R8PZpQMwNWLj_IyZOhvr'
}
private function playPause():void
{
vid.volume=0;
if (vid.playing != true)
vid.play();
else
vid.pause();
}
]]/mx:Script
mx:Form id=frm
mx:FormItem label=Time:
mx:Label text={time} ms/
/mx:FormItem
mx:FormItem label=Total Memory:
mx:Label text={totmem} bytes/
/mx:FormItem
mx:FormItem label=Max Memory:
mx:Label text={maxmem} bytes/
/mx:FormItem
mx:FormItem label=Init Memory:
mx:Label text={initmem} bytes/
/mx:FormItem
mx:Button label=Do garbage collection click=gc() /

/mx:Form

mx:VBox top=10 bottom=219 borderThickness=3 
verticalScrollPolicy=auto horizontalScrollPolicy=off  x=245

[flexcoders] Events not firing from swf imported with SwfLoader

2007-05-18 Thread beecee1977
Hi,

I'm not a flash expert so you'll have to bear with me on this. I'm 
not creating the swf's myself.

I've recieved animations in swf's before and used them in image 
controls and they work fine. (movie clips generated in Flash MX 2004)

If however the swf has a button on it (just an animation which plays 
on the rollover and snaps back to first frame on rollout) no events 
get fired from it when it's embeded into my image control. I'm 
assuming that the button in the swf is catching all mouse events and 
not passing them on. Does anybody know if this is the expected 
behaviour or if there's an easy way around it? 

As it stands I guess I'll need to handle switching to an animation on 
the rollover event within Flex2.

Thanks in advance
Bill

P.S. I saw this, but it seems like overkill for what I want. 
http://www.jessewarden.com/archives/2006/08/flash_9_button.html



[flexcoders] Re: global variable vs passing parameters to the cus tom components

2007-05-01 Thread beecee1977
As you say yourself, your other example is a lot clearer. For example 
in the context of this question, 

a=1;
b=5;

a = b;
a = a+5;

/*result: a=9
  b=4
*/

i.e. a = b doesn't make both a and b point to the same Number in 
memory and changing a does not change b. This is not the case for 
objects as you explained very clearly in your other post! This is why 
this can be a bit confusing though...


--- In flexcoders@yahoogroups.com, Guido [EMAIL PROTECTED] wrote:

 Lucas, remember variables are references to objects; A = B doesn't 
mean Put
 in A the same data that is in B, it means Make A reference the 
same object
 that is currently referenced by B.
 
 I.e.:
 
 var a : Number = 1;
 var b : Number = 5;
 
 /*
 a + 3 returns 4
 b + 9 returns 14
 a + b  returns 6;
 */
 
 //Now make a reference the same object as b (in this case, make a 
no longer
 reference 1, but 5)
 
 a = b
 
 /*
 a + 3 returns 8
 b + 9 returns 14
 a + b  returns 10;
 */
 
 The same goes to any variable, not only the ones referencing basic 
types.
 
 Please reffer to the other email you sent, I wrote a much more 
clearer
 example there.
 
 Good luck!
 
 On 4/30/07, Lucas Pereira [EMAIL PROTECTED] wrote:
 
HI all.
  maybe my question fits here.
 
  here it goes. I have an object A of some king and object b of same
  kind as A..
 
  if I make B.someproperty = A.someproperty and then make changes 
to be
  property in B, such has, B.someproperty = something, why do the
  someproperty in A also changes?
 
  Any way to get around this?
 
  a common case is, if I have Object A of array collection with 1000
  objects inside, and i want to create a Object B of array 
collection,
  and want B to have all the 1000 values that A has i will do B = A,
  instead of running the A array and push each value into B.
 
  The problem is same as above, if then i push another value on B
  (A.length would be 1001) the same value will be pushed to A array
  (A.length = 1001)!!
 
  Is this normal? Or is there a way in flex to say that i Want B to 
have
  same content as A, but then change B without affecting A?
 
  Thanks
 
  Lucas
 
  --- In flexcoders@yahoogroups.com flexcoders%
40yahoogroups.com, Tracy
  Spratt tspratt@ wrote:
  
   On your second question, regarding refreshing the screen, the 
ideal
   solution is to use data binding. If your screen elements are 
bound to
   some dataProvider, and that dataProvider changes, the screen 
elements
   will automatically refresh, no programattic work is necessary.
  
  
  
   In your tab example, you should only need to refresh the data 
if it
   changes, and binding will handle that for you.
  
  
  
   Do you need to explicitly refresh your data model every time 
the user
   navigates between tabs? Do that on a navigation event, and your 
bound
   field/elements will update automatically
  
  
  
   Tracy
  
  
  
   
  
   From: dmitriy_orlovskiy [mailto:[EMAIL PROTECTED]
   Sent: Monday, July 26, 2004 10:37 PM
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   Subject: [flexcoders] Re: global variable vs passing parameters 
to the
   cus tom components
  
  
  
   Thank you very much for the response.
   Does it mean that vars need to be defined in the script file 
that
   has reference to the Application tag?
   Is parentApplication property is the same as accessing data 
this way:
   mx.core.Application.application.userObject.userId or is it 
different?
  
   What is the good practice for refreshing data on the screen?
   creationComplete event for the container fires only once. Which
   event in the container to use to referesh data from the 
database,
   every time component becomes active?
   Let's say there are multile tabs. Every time when tab is 
selected,
   refresh data is needed. How to do that inside of the component
   without using tab change event and broadcast it to the component
   somehow? How to do that?
  
   Thank you
  
   --- In flexcoders@yahoogroups.com flexcoders%
40yahoogroups.com, Gordon
  Smith [EMAIL PROTECTED] wrote:
The use of _global in Flex applications is generally 
discouraged.
   Instead
you could store your user information in vars of the 
Application
   object and
use the parentApplication property to access them from 
multiple
   custom
components.
   
If the information needs to be accessed by many custom 
components,
   this is
probably preferable to storing it redundantly in each 
component.
   
Another common pattern is to separate data from UI by having a
   singleton
DataModel class for storing data.
   
- Gordon
   
   
-Original Message-
From: dmitriy_orlovskiy [mailto:[EMAIL PROTECTED]
Sent: Monday, July 26, 2004 3:04 PM
To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
Subject: [flexcoders] global variable vs passing parameters 
to the
   custom
components
   
   
Hello,
Are there any advantages/disadvantages to use 

[flexcoders] Problems using Zoom effect.

2007-04-30 Thread beecee1977
Hi, 

I'm having a couple of problems with Zoom effects. Here's my simple 
test application:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute
mx:Script
![CDATA[
private function zoomImg(e:Event):void
{
if (zoomEffect.isPlaying)
{
zoomEffect.reverse();
}
else
{
var x:Array = zoomEffect.play
([Image(e.target)],e.type == MouseEvent.ROLL_OUT ? true : false)
}
}
]]
/mx:Script

mx:Zoom id=zoomEffect zoomHeightFrom=0.5 
zoomHeightTo=1 zoomWidthFrom=0.5 zoomWidthTo=1 /
mx:Image id=im1 source=im1.png 
rollOver=zoomImg(event) rollOut=zoomImg(event) 
scaleX=0.5 scaleY=0.5 x=28 y=10/
mx:Image id=im2 source=im2.png 
rollOver=zoomImg(event) rollOut=zoomImg(event)
scaleX=0.5 scaleY=0.5 x=60 y=10/
mx:Image id=im3 source=im3.png 
rollOver=zoomImg(event) rollOut=zoomImg(event)
scaleX=0.5 scaleY=0.5 x=92 y=10/
mx:Image id=im4 source=im4.png 
rollOver=zoomImg(event) rollOut=zoomImg(event)
scaleX=0.5 scaleY=0.5 x=126 y=10/
/mx:Application

The idea is the have a toolbar where as I scroll over the images are 
zoomed (ala Mac toolbar I think).
I find that when I move the mouse slowly across the images it behaves 
as expected. However if I move the mouse more quickly all the images 
end up getting zoomed. 

I'm pretty sure I know the reason why, but I'm not sure what the best 
solution is. I'm guessing the the different zoomInstances are getting 
mixed up as I scroll over the different images, but what's the best 
way to keep track of them? I don't want to have a different 
zoomEffect for each image as I want this to be scaleable.

Thanks in advance.
Bill



[flexcoders] VideoDisplay bug?! How to extend to change a private variable?

2007-03-28 Thread beecee1977
Hi,

I would normally spend more time trying to work this out first, but 
I'm under a bit of pressure... There appears to be a bug in the 
VideoDisplay code. 

vid.close() = within the videoDisplay a private variable called 
closeCalled is set to true. 
vid.play() = the closeCalled variable is set to be false in the play 
function.

Fine, but:
vid.close() = closeCalled=true
vid.load() = loadVideo()
vid.play() = if (closeCalled==true) {loadVideo()}

So if you load in the video this variable is not reset to false. This 
means that the video gets loaded twice; once when the video is loaded 
and once when the video is played... 

Anyway, all this is besides the point... I just want to know how to 
get around this. I've tried this:

package libraries.utility
{
import mx.controls.VideoDisplay;

public class NewVideoDisplay extends VideoDisplay
{
//private var closeCalled:Boolean = false;  


public function NewVideoDisplay()
{
super();
}

override public function load():void
{
super.load();
closeCalled = false;
}

}
}


but naturally I cannot access the private variable closeCalled. How 
do I go about doing this?

Thanks in advance
Bill




[flexcoders] Re: VideoDisplay bug?! How to extend to change a private variable?

2007-03-28 Thread beecee1977
P.S. If it's any easier to access an mx_internal variable than a 
private variable (when sub-classing/extending a control) that'll work 
too!

Cheers
Bill

--- In flexcoders@yahoogroups.com, beecee1977 [EMAIL PROTECTED] 
wrote:

 Hi,
 
 I would normally spend more time trying to work this out first, but 
 I'm under a bit of pressure... There appears to be a bug in the 
 VideoDisplay code. 
 
 vid.close() = within the videoDisplay a private variable called 
 closeCalled is set to true. 
 vid.play() = the closeCalled variable is set to be false in the 
play 
 function.
 
 Fine, but:
 vid.close() = closeCalled=true
 vid.load() = loadVideo()
 vid.play() = if (closeCalled==true) {loadVideo()}
 
 So if you load in the video this variable is not reset to false. 
This 
 means that the video gets loaded twice; once when the video is 
loaded 
 and once when the video is played... 
 
 Anyway, all this is besides the point... I just want to know how to 
 get around this. I've tried this:
 
 package libraries.utility
 {
   import mx.controls.VideoDisplay;
 
   public class NewVideoDisplay extends VideoDisplay
   {
   //private var closeCalled:Boolean = false;  
 
 
   public function NewVideoDisplay()
   {
   super();
   }
   
   override public function load():void
   {
   super.load();
   closeCalled = false;
   }
   
   }
 }
 
 
 but naturally I cannot access the private variable closeCalled. How 
 do I go about doing this?
 
 Thanks in advance
 Bill





[flexcoders] Re: VideoDisplay bug?! How to extend to change a private variable?

2007-03-28 Thread beecee1977
That did the trick thanks. 

For when I get a chance I should really log a bug... anyone got the 
url for that handy?

For anyone else with this problem, so long as you know you'll be 
ALWAYS calling load() before play(), having done a close() this will 
do the job:

package libraries.utility
{
import mx.controls.VideoDisplay;
import mx.core.mx_internal;

use namespace mx_internal;


public class NewVideoDisplay extends VideoDisplay
{
public function NewVideoDisplay()
{
super();
}

override public function close():void
{
//the real close sets a variable closeCalled
//which causes the next video to be loaded 
after
//both load() and play().

//because we always load before playing we 
can avoid
//setting this variable.. 
mx_internal::videoPlayer.close()
}   
}
}

--- In flexcoders@yahoogroups.com, Daniel Freiman [EMAIL PROTECTED] 
wrote:

 mx_internal is easy to access because it's just a namespace.
 
 Simply import mx.core.mx_internal.  After the imports type the line:
 
 use namespace mx_internal;
 
 
 There should be a complete discussion if you just search through 
the mailing
 list archives for 'mx_internal' specifically or you can just read 
up on
 namespaces in general in the docs.
 
 HOWEVER, mx_internal is not documented or stable.  If you use it 
and an
 update to the framework is released, there is no guarantee that the 
update
 will not break your code.  Use at your own risk.
 
 - Dan Freiman
 
 On 3/28/07, beecee1977 [EMAIL PROTECTED] wrote:
 
P.S. If it's any easier to access an mx_internal variable than a
  private variable (when sub-classing/extending a control) that'll 
work
  too!
 
  Cheers
  Bill
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
  beecee1977 billcahill@
 
  wrote:
  
   Hi,
  
   I would normally spend more time trying to work this out first, 
but
   I'm under a bit of pressure... There appears to be a bug in the
   VideoDisplay code.
  
   vid.close() = within the videoDisplay a private variable called
   closeCalled is set to true.
   vid.play() = the closeCalled variable is set to be false in the
  play
   function.
  
   Fine, but:
   vid.close() = closeCalled=true
   vid.load() = loadVideo()
   vid.play() = if (closeCalled==true) {loadVideo()}
  
   So if you load in the video this variable is not reset to false.
  This
   means that the video gets loaded twice; once when the video is
  loaded
   and once when the video is played...
  
   Anyway, all this is besides the point... I just want to know 
how to
   get around this. I've tried this:
  
   package libraries.utility
   {
   import mx.controls.VideoDisplay;
  
   public class NewVideoDisplay extends VideoDisplay
   {
   //private var closeCalled:Boolean = false;
  
  
   public function NewVideoDisplay()
   {
   super();
   }
  
   override public function load():void
   {
   super.load();
   closeCalled = false;
   }
  
   }
   }
  
  
   but naturally I cannot access the private variable closeCalled. 
How
   do I go about doing this?
  
   Thanks in advance
   Bill
  
 
   
 





[flexcoders] Re: TextArea autoSize?

2007-03-15 Thread beecee1977
Try:

either on myTextArea change event:
myTextArea.height = myTextArea.textHeight 

or bind the height to the textHeight.

Hope that helps.

--- In flexcoders@yahoogroups.com, [EMAIL PROTECTED] wrote:

 I would like to make a TextArea instance expand to the size of the 
Text
 assigned to it.
 Similar to ActionScript TextFieldInstance.autoSize property.
 How would I do this in Flex?
 
 --Keith H--





[flexcoders] Re: VideoDisplay.complete event doesn't get called when a video ends

2007-03-08 Thread beecee1977
Well you're not crazy, but I've no solution I'm afraid:

http://tech.groups.yahoo.com/group/flexcomponents/message/1549

I'd imagine it's something to do with how the flv is encoded? You 
could try catching a state change event when the video stops playing 
at the end, but I haven't tried that myself...

Good luck.
Bill

--- In flexcoders@yahoogroups.com, Yair Flicker [EMAIL PROTECTED] wrote:

 Hello again!
 
 I'm having ANOTHER problem with the VideoDisplay control where I 
set it
 to play a video, attach an event handler to its complete event, but 
the
 complete event never gets triggered/fired! Note this happens
 consistently with select FLV's - it doesn't happen all the time. To
 rephrase that, on certain FLV's the VideoDisplay control operates
 properly and fires the complete event on completion, on other 
certain
 FLV's the VideoDisplay control completes but doesn't fire the 
complete
 event!!! Am I crazy? Or is this another blatant bug?
 
 Try this MXML (I'm using Flex 2.01):
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 http://www.adobe.com/2006/mxml%22  layout=absolute
 
 mx:Script
 ![CDATA[
 private function complete():void {
 vid.visible = false;
 txt.visible = true;
 }
 ]]
 /mx:Script
 
 mx:VideoDisplay id=vid
 source=http://ash-v14.ash.youtube.com/get_video?video_id=qP_3_NtG-
lo
 http://ash-v14.ash.youtube.com/get_video?video_id=qP_3_NtG-lo%22
 autoPlay=true width=450 height=338 complete=complete() /
 
 mx:Text id=txt text=IF YOU SEE ME THE VIDEODISPLAY COMPLETED!!!
 fontSize=16 color=0x00 visible=false /
 
 /mx:Application
 
 That's a 30 second clip btw. You will never see the IF YOU SEE ME 
THE
 VIDEODISPLAY COMPLETED!!! text. Now, however, if you change the 
source
 to http://www.mediacollege.com/video-
gallery/testclips/barsandtone.flv
 http://www.mediacollege.com/video-
gallery/testclips/barsandtone.flv 
 (6 second clip), the clip completes and you WILL see IF YOU SEE ME 
THE
 VIDEODISPLAY COMPLETED!!!
 
 Any suggestions as to what may be going on?  Thanks!





[flexcoders] Re: I set VideoDisplay.source to a 404, but VideoDisplay simply says it's loading

2007-03-08 Thread beecee1977
This of any use?

http://tech.groups.yahoo.com/group/flexcomponents/message/1398

--- In flexcoders@yahoogroups.com, Yair Flicker [EMAIL PROTECTED] wrote:

 Hello people,
 
 I have a problem where I set the videoDisplay.source property to an
 invalid URL - 404 - call the .play() method, and then the 
videoDisplay
 simply says that it's loading. It doesn't give any indication of an
 error, just sits there and says it's loading. It's the most annoying
 thing in the worldhow the hell am I supposed to know when the
 .source property points to an invalid URL?!?!?! I even have a timer 
in
 there to output the state of the VideoDisplay every 2.5 seconds - 
all it
 says is that it's loading. Am I crazy? Am I doing something wrong? 
Or is
 this a blatant bug in Flex?
 
 Try this MXML:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 http://www.adobe.com/2006/mxml  layout=absolute
 
 mx:Script
 ![CDATA[
 import mx.events.VideoEvent;
 private function showInfo(event:VideoEvent):void {
 trace('stateChange: ' + event.state + ' ' + event);
 var foo:Timer = new Timer(2000, 100);
 foo.addEventListener(TimerEvent.TIMER, timerComplete);
 foo.start();
 }
 private function timerComplete(event:TimerEvent):void {
 trace('timerComplete: ' + vid.state + ' ' + event);
 }
 ]]
 /mx:Script
 
 mx:VideoDisplay id=vid
 source=http://sjc-v90.sjc.you1234tube.com/get_video?
video_id=BTh8no91g5\
 4E http://sjc-v90.sjc.you1234tube.com/get_video?
video_id=BTh8no91g54E
 autoPlay=true width=450 height=338 stateChange=showInfo
(event)
 /
 
 /mx:Application
 
 
 The trace debug output is as follows:
 stateChange: loading [Event type=stateChange bubbles=false
 cancelable=false eventPhase=2]
 timerComplete: loading [TimerEvent type=timer bubbles=false
 cancelable=false eventPhase=2]
 timerComplete: loading [TimerEvent type=timer bubbles=false
 cancelable=false eventPhase=2]
 
 timerComplete: loading [TimerEvent type=timer bubbles=false
 cancelable=false eventPhase=2]
 timerComplete: loading [TimerEvent type=timer bubbles=false
 cancelable=false eventPhase=2]
 
 And btw, if you set the source to
 http://chi-v45.chi.youtube.com/get_video?video_id=n4Fwge2iqJ0
 http://chi-v45.chi.youtube.com/get_video?video_id=n4Fwge2iqJ0 
 (another 404), Flex detects it immediately and the trace output is 
what
 you would expect/hope.
 
 Anybody else experience this problems?  Can anybody think of any
 fixes/workarounds?  Am I doing something wrong?  Thanks!





[flexcoders] Re: How do I prevent the user from selecting text in a text area component?

2007-02-28 Thread beecee1977
Yes, but that doesn't stop the user from selecting the text (dragging 
mouse over and highlighting)... Is there an easy way to prevent that? 
(Other than disabling the component)

Bill

--- In flexcoders@yahoogroups.com, Brian Holmes [EMAIL PROTECTED] wrote:

 editable=false
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of Robin Burrer
 Sent: Monday, February 26, 2007 6:08 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] How do I prevent the user from selecting text 
in a
 text area component?
 
 
 
 Hi there,
 
  
 
 How do I prevent the user from selecting text in a text area 
component?
 
 
 I noticed that it does not have a selectable property and does not
 derive from the Text object either.
 
  
 
  
 
 Robin
 
  
 
 
 ***
 The information in this e-mail is confidential and intended solely 
for the individual or entity to whom it is addressed.  If you have 
received this e-mail in error please notify the sender by return e-
mail delete this e-mail and refrain from any disclosure or action 
based on the information.
 ***





[flexcoders] Re: text area height

2007-02-19 Thread beecee1977
You'd be better starting a new thread, but it's pretty straight 
forward...

Either on myText change event:

myText.height = myText.TextArea.textHeight + BORDERS_HEIGHT

or bind the height..

Haven't tested this, but it should work.
Hope that helps.


--- In flexcoders@yahoogroups.com, jeff noyes [EMAIL PROTECTED] wrote:

 Anyone know how to make a text area automatically change height 
based on 
 the content that's pushed to the text area?
 
 





[flexcoders] Re: text area height

2007-02-19 Thread beecee1977
By the way, for a TextArea control you won't need the .TextArea bit :-
) That was for a RichTextEditor.

--- In flexcoders@yahoogroups.com, beecee1977 [EMAIL PROTECTED] 
wrote:

 You'd be better starting a new thread, but it's pretty straight 
 forward...
 
 Either on myText change event:
 
 myText.height = myText.TextArea.textHeight + BORDERS_HEIGHT
 
 or bind the height..
 
 Haven't tested this, but it should work.
 Hope that helps.
 
 
 --- In flexcoders@yahoogroups.com, jeff noyes jeffnoyes1@ wrote:
 
  Anyone know how to make a text area automatically change height 
 based on 
  the content that's pushed to the text area?
  
  
 





[flexcoders] Loading Image into BitmapData

2007-02-16 Thread beecee1977
Hi,

I have what I hope is a pretty simple problem, but I'm not sure how to 
do it. I want to load in an image file (png or whatever) from a url and 
store it locally in a BitmapData Object.

I suspect I need to use the Loader class, but I'm not sure how to get 
it out of this and into a BitmapData Object.

Any tips appreciated! 

P.S. I know I could probably load it into a UIComponent and then draw 
it onto the BitmapData Object, but I'd rather avoid that if possible.



[flexcoders] Re: Cross domain confusion

2007-02-12 Thread beecee1977
I don't really have a solution, but a suggestion as to why it might be 
working locally. If you created the project in Flex Builder it will add 
the source location to a trust file:

Documents and Settings\$UserName$\Application Data\Macromedia\Flash 
Player\#Security\FlashPlayerTrust\flexbuilder.cfg

(for my setup anyway)

This will override any sandbox issues when you run locally and possibly 
hide whatever security issue you're encountering when you deploy. 




[flexcoders] Re: Getting duration of FLV 1.0 videos

2007-02-09 Thread beecee1977
Thanks Jim, 

I'll give that a go.

--- In flexcoders@yahoogroups.com, Jim Cheng [EMAIL PROTECTED] wrote:

 beecee1977 wrote:
  Hi,
  
  I want to be able to get the duration of any flv file using the 
  videoDisplay object. This works fine most of the time (just 
  myVideoDisplay.totalTime)... However, for older flv files (before 
  1.1) this metadata is not included.
 
 If you're not streaming them from FMS, you can also load the entire 
FLV 
 into a ByteArray and parse the timestamps from the FLV tags for 
yourself 
 using a bit of AS3 ByteArray magic.  Provided there's nothing 
strange 
 about your FLV, the timestamp on the last tag should be your 
duration.
 
 I recently ended up having to do exactly this to diagnose a 
particularly 
 pestilent bug where some of my FLVs were reporting patently wrong 
 durations as a result of corrupt tag timestamps.
 
 You can get the FLV file format documentation from Adobe here:
 
http://www.adobe.com/licensing/developer/
 
 If you go this route, watch out for the timestamp byte order, it's 
a 
 32-bit unsigned integer, but is formatted as a big-endian UI32 
followed 
 by a most significant UI8 rather than the typical order expected by 
the 
 built-in readUnsignedInt() method.
 
 Jim Cheng
 effectiveUI





[flexcoders] Getting duration of FLV 1.0 videos

2007-02-08 Thread beecee1977
Hi,

I want to be able to get the duration of any flv file using the 
videoDisplay object. This works fine most of the time (just 
myVideoDisplay.totalTime)... However, for older flv files (before 
1.1) this metadata is not included.

Looking at the code in VideoDisplay.as:


/**
 *  Total length of the media, in seconds.
 *  For FLV 1.0 video files, you manually set this property.
 *  For FLV 1.1 and later, the control calculates this value
 *  automatically.
 */
public function get totalTime():Number
{
if (!isNaN(_totalTime))
// totalTime was set manually, return the 
// same value.
return _totalTime;
else
return videoPlayer != null ? 
videoPlayer.totalTime : NaN;
}

But because I'm loading in different flv's dynamically I can't set 
the totalTime manually, or more to the point I don't know what the 
totalTime is to set it. Does anyone have any ideas for how I could go 
about this? I've seen tools that will inject the metadata into the 
flv, but I don't want to directly manipulate the flv itself.

Thanks in advance
Bill



[flexcoders] Length of Dictionary...

2006-12-20 Thread beecee1977
Hopefully there's a pretty simple answer.

I want to find the length of a Dictionary (i.e. the number of entries 
in it)... There doesn't seem to be any documentation for the 
Dictionary's properties that I can find. 



[flexcoders] Video not showing in VideoDisplay... sometimes...

2006-12-20 Thread beecee1977
Hi,

I'm wondering if anyone else has encountered this problem (or better 
still resolved it)...

I have a VideoDisplay object which I load with a source flv. All fine. 
However, on some occasions the video doesn't display. I've set the 
backcolor of the VideoDisplay to red, to make sure it's nothing else 
appearing on top. 

I'm viewing the swf in IE7. Sometimes when I hit refresh the video will 
appear, sometimes not. The audio still plays and it still returns video 
duration and fires events etc. I can't seem to pin down any reason for 
this behaviour. 

Any ideas anyone?

Thanks in advance.
Bill



[flexcoders] Re: setting an external f9 swf's library symbols width

2006-10-18 Thread beecee1977
Not sure if this is what you're looking for, but you could try: 
maintainAspectRatio=false

Hope that helps...




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/