Re: [Flashcoders] combo box problem

2007-05-31 Thread Hans Wichman

Hi,

@randy:
define not working?

Does it no longer dropdown and show a weird show button thats disabled,
or does it no longer fire events
or is it no longer visible?

regards
JC


On 5/31/07, Carl Welch [EMAIL PROTECTED] wrote:


No, I'm not loading any external swfs.

On 5/30/07, Andy Herrman [EMAIL PROTECTED] wrote:

 Any chance you're loading child SWFs and then trying to attach the combo
 boxes there?  I'm running into some very strange behavior when doing
that
 (will be posting about it in the next day or so once I narrow it down
some
 more).

   -Andy

 On 5/30/07, Carl Welch [EMAIL PROTECTED] wrote:
 
  I have the same situation. In mine, I am dynamically generating each
  screen as the user navigates. It will work on the first screen that a
  series of comboboxes appear, then on the next screen they show up but
  don't work. I am completely deleting the movieclip that contains them.
  Then I build a new MC container each time a user goes to a different
  screen. I thought I was being safe with that set up.
 
  Kinda relieved I'm not the only one that has run into this problem,
  but its imperative that I fix it.
 
  --Carl
 
  On 5/30/07, Muzak [EMAIL PROTECTED] wrote:
   Explain your setup and maybe show us some code.
   The combobox should just work.
  
  
  
   - Original Message -
   From: Randy Tinfow [EMAIL PROTECTED]
   To: flashcoders@chattyfig.figleaf.com
   Sent: Wednesday, May 30, 2007 6:29 PM
   Subject: [Flashcoders] combo box problem
  
  
   We're 6 weeks into our last AS2 project, with about a week left for
  development.  Now we hit what seems like a brick wall.
  
   We select an item from the dropdown and it works fine the first
  time.  The second time it works okay.  The third time it just stops
   working.
  
   There is apparently a reference in the component to the root
timeline
  that prevents it from operating normally.  We've tried
   _lockroot, we've tried swapping depths of __dropdown every single
time
  you click on the combo box.  None of our hacks work.
  
   We tried the bjc bitcomponent combobox and it looks horrendous and
  doesn't seem to fire any of the events, either.
  
   Any suggestions?
  
   TIA,
  
   Randy Tinfow
  
  
   ___
   Flashcoders@chattyfig.figleaf.com
   To change your subscription options or search the archive:
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
   Brought to you by Fig Leaf Software
   Premier Authorized Adobe Consulting and Training
   http://www.figleaf.com
   http://training.figleaf.com
  
 
 
  --
  Carl Welch
  http://www.carlwelch.com
  [EMAIL PROTECTED]
  805.403.4819
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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




--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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

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


Re: [Flashcoders] problems with getURL and local frame targeting in FP9

2007-05-31 Thread Muzak
File  Publish Settings  Local playback security: Access network only (and 
recompile)

Then the allowScriptAccess param has no effect whatsoever, but getURL will work.

http://livedocs.adobe.com/flash/8/main/1610.html

regards,
Muzak

- Original Message - 
From: Darren Bowers [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Thursday, May 31, 2007 7:50 AM
Subject: [Flashcoders] problems with getURL and local frame targeting in FP9


I have a two frame page - the left frame is a custom flash Tree object that
 parses an IMS-compliant manifest (basically a tree menu structure) and the
 right frame displays the page/object in that manifest. If i run this from a
 server, it works fine and displays all links in the right frame. But if I
 run it from a local or network drive it opens all links in _blank.

 Adobe have a technote on the new allowScriptAccess and getURL in FP9 (
 http://www.adobe.com/go/50c1cf38) but dont mention anything about this issue
 (that i can locate).

 Can anyone confirm that targeting frames locally via getURL under FP9 is now
 not possible?

 Cheers,
 Darren


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

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


[Flashcoders] Loaded swf file is not calling function residing main file if played from sub-domain or other domain.

2007-05-31 Thread Vivek Lakhanpal

I have a very unique problem, i am not sure if it's something related to
security sandbox issue or something else.

I have a flash player ( http://www.authorstream.com) in which i play slides
dynamically. I pick up a xml file and then prepare an array of the slides to
be loaded in the player.
I have System.security.allowDomain(*); line written on first frame of all
slides (swf files being loaded into player).

Scenario1 :

Each slide (a swf file) on reaching it's end call a AS function (inside
player) from it's last frame which picks up the next array value and make a
loading call for next slide.

Problem: If i remove the www from the full url i.e. make it e.g.
http://authorstream.com/presentation.aspxhttp://authorstream.com/presentation.aspx?pun=fundude-804-animated-gif-images-animation-sking-ice-bike-house-new-age-learning-entertainment-powerpointvw=enmMostViewedpg=1and
then check a slideshow which runs automatically and it's slide changes
automatically at the end. It doesn't load next slide (if called
automatically from inside the loaded slide.swf). But if i click next or
previous button it load the slide at that position.
Now if i play the same slideshow with www attached in the url i.e.
http://www.authorstream.com/presentation.aspxhttp://www.authorstream.com/presentation.aspx?pun=fundude-804-animated-gif-images-animation-sking-ice-bike-house-new-age-learning-entertainment-powerpointvw=enmMostViewedpg=1http://www.authorstream.comthen
it plays properly.
i.e. next slide loads on a call to load next slide from inside the loaded
slide (swf file).

Scenario2:
In this case my player and xml file are on Domain 1 and swf files to be
loaded as slides in the player are on Domain 2. I call crossdomain.xml file
from Domain 2 on which all slides reside.

Problem: similar to the problem mentioned above if i play the slide show
from Domain 1 i.e. http://69.41.184.19/presentation.aspx
http://69.41.184.19/presentation.aspx?pun=dinesh-571-gifs-new-age-learning-entertainment-powerpointvw=enmLatestUploadspg=22
Slide loaded inside the player doesn't initiate the function call written in
the player and keep on looping in itself.

The problem which i see is that loaded slide is not able to call the
function written in player if played from subdomain  or any other domain.
Although i have called crossdomain.xml and calling it in the player.
Moreover i have writting System.Security.allowDomain(*) i don't see it is
playing any role here. Don't know why.

Can anyone provide me any insight into the issue? i will highly thankful.

--
Thanks  Regards,
Vivek Lakhanpal.
Phone: +91-987-608-2125 (India)
Skype ID: lakhanpalv
Website: http://viveklakhanpal.spaces.live.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] problems with getURL and local frame targeting in FP9

2007-05-31 Thread Muzak
Additionally, if you don't want to change the Local playback security option, 
you can create a FlashPlayerTrust file that contains 
the path to the swf.

http://livedocs.adobe.com/flash/8/main/1613.html
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=4c093f20

You can create this file manually or use the Flash Player Security Manager:
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html

regards,
Muzak

- Original Message - 
From: Darren Bowers [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Thursday, May 31, 2007 7:50 AM
Subject: [Flashcoders] problems with getURL and local frame targeting in FP9


I have a two frame page - the left frame is a custom flash Tree object that
 parses an IMS-compliant manifest (basically a tree menu structure) and the
 right frame displays the page/object in that manifest. If i run this from a
 server, it works fine and displays all links in the right frame. But if I
 run it from a local or network drive it opens all links in _blank.

 Adobe have a technote on the new allowScriptAccess and getURL in FP9 (
 http://www.adobe.com/go/50c1cf38) but dont mention anything about this issue
 (that i can locate).

 Can anyone confirm that targeting frames locally via getURL under FP9 is now
 not possible?

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

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


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

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


Re: [Flashcoders] problems with getURL and local frame targeting in FP9

2007-05-31 Thread Darren Bowers

I tried the Access network only and it would work great but I have to load
a number of XML files locally to build the Tree structure. This prevents
access to these files.

I have been searching Adobe and the net for ages and I cant find any
official reference to this change in behaviour as a security fix. I am
wondering if it is actually a bug. Unlikely, but a possibility?
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


[Flashcoders] default classpath for actionscript 3.0

2007-05-31 Thread נמרוד הוברמן

what is the default classpath for actionscript 3.0?
(I delete the line, and can find reference only to the settings for
actionscript 2.0)
thank you
nimrid
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] default classpath for actionscript 3.0

2007-05-31 Thread Muzak
$(AppConfig)/ActionScript 3.0/Classes


- Original Message - 
From: ? ?? [EMAIL PROTECTED]
To: Flashcoders@chattyfig.figleaf.com
Sent: Thursday, May 31, 2007 11:24 AM
Subject: [Flashcoders] default classpath for actionscript 3.0


 what is the default classpath for actionscript 3.0?
 (I delete the line, and can find reference only to the settings for
 actionscript 2.0)
 thank you
 nimrid


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

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


[Flashcoders] Surely simple: textField.restrict to block carriage return

2007-05-31 Thread Danny Kodicek
I want to allow users to enter anything except carriage returns in my input
field (but only sometimes). Is there no way to do this using
textField.restrict? I tried ^\r, ^\n, ^\u000d, none of which made any
difference. I know I can do it by setting multiline = false, but it's a bit
irritating for restrict not to work.

Danny

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

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


[Flashcoders] How do i get rid of the green halo glow on listbox?

2007-05-31 Thread Alistair Colling
Hi there, I want to remove the green glow that appears when you  
rollOver items in a list box. I know how to set the colour of the  
theme and how to edit the graphical elements of the component from  
the StandardComponents.fla but I can't find the rollOver highlight  
MC. If someone could let me know how to alter this (or remove it  
completely!) that would be ace.

Thanks guys:)
Ali



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

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


RE: [Flashcoders] combo box problem

2007-05-31 Thread Randy Tinfow
@randy:
define not working?

The combobox is being placed initially like this:

 

this._lockroot = true;

_cbCategory = ComboBox(createClassObject(ComboBox, _cbCategory, 
this.getNextHighestDepth()));

_cbCategory.addEventListener(change, objComboListen);

_cbCategory.setStyle(embedFonts, true);

_cbCategory.setStyle(fontFamily, Univers);

_cbCategory.setStyle(fontSize, 14);

_cbCategory.setStyle(color, 0x00);

_cbCategory.move(138, 0);

_cbCategory.setSize(200, 24);

 

Right after this, a bunch of stuff is added to the combobox using addItem.  
addItem takes an object with 2 properties, label and data, and I’m using both.  
The change event that is defined earlier runs a function that adds a bunch of 
fields to the screen, including more comboboxes, that are being placed exactly 
the same way as above, with the same styling.  They do not have any events 
assigned to them, so I don’t think they are interfering in any way.  The 
problem is, you can select something from the main combobox once, and it works 
fine.  You can select a 2nd item, and that works fine too.  After that, it 
doesn’t work at all.  You click the combobox, or the arrow next to it, and 
nothing happens at all, no dropdown, no nothing. 

Thanks,

RT


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

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

Re: [Flashcoders] combo box problem

2007-05-31 Thread Hans Wichman

Hi,
have you checked with xray if there is something in the way?
Or commented out some of the stuff that gets created in order to pinpoint
the problem?

regards,
JC


On 5/31/07, Randy Tinfow [EMAIL PROTECTED] wrote:


@randy:
define not working?

The combobox is being placed initially like this:



this._lockroot = true;

_cbCategory = ComboBox(createClassObject(ComboBox, _cbCategory,
this.getNextHighestDepth()));

_cbCategory.addEventListener(change, objComboListen);

_cbCategory.setStyle(embedFonts, true);

_cbCategory.setStyle(fontFamily, Univers);

_cbCategory.setStyle(fontSize, 14);

_cbCategory.setStyle(color, 0x00);

_cbCategory.move(138, 0);

_cbCategory.setSize(200, 24);



Right after this, a bunch of stuff is added to the combobox using
addItem.  addItem takes an object with 2 properties, label and data, and I'm
using both.  The change event that is defined earlier runs a function that
adds a bunch of fields to the screen, including more comboboxes, that are
being placed exactly the same way as above, with the same styling.  They do
not have any events assigned to them, so I don't think they are interfering
in any way.  The problem is, you can select something from the main combobox
once, and it works fine.  You can select a 2nd item, and that works fine
too.  After that, it doesn't work at all.  You click the combobox, or the
arrow next to it, and nothing happens at all, no dropdown, no nothing.

Thanks,

RT



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

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


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

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


Re: [Flashcoders] How do i get rid of the green halo glow on listbox?

2007-05-31 Thread Alistair Colling
Thanks for your reply eric, this code seems to make the background of  
each item black but the green glow still appears on rollOver and also  
you can see faint outlines around each of the items in the list. Al I  
want to do is hide the green animation that shows when i rollOver an  
item, I guess this could be targeted in a similar way to the way you  
suggested or maybe the rollover event could be disabled?

Any thoughts v gratefully received,
Thanks!
Ali


On 31 May 2007, at 15:15, eric e. dolecki wrote:


Here is some code that might work out for you

var backAlpha = 50;
var backColor = 0x00;

_global.styles.ScrollSelectList.backgroundColor = undefined; //  
this is

_global, can make it not so

mx.controls.listclasses.SelectableRow.prototype.drawRowFill =
   function(mc:MovieClip, newClr:Number):Void
   {
   mc.clear();
   if (newClr == undefined)
   {
   mc.beginFill( backColor,  backAlpha );
   } else
   {
   mc.beginFill( newClr, backAlpha );
   }

   mc.drawRect(1, 0, this.__width, this.__height);
   mc.endFill();
   mc._width = this.__width;
   mc._height = this.__height;

   if( mc._name.indexOf(tran) != -1 )
   {
   mc.lineStyle( 1, 0x8DB600, 100, false, none,  
square,
miter, 1 ); // thickness, rgb, alpha, pixelhinting, scaling,  
capstyle,

jointstyle, miterLimit
   mc.lineTo( this._width, 0 );
   mc.lineTo( this._width, 21);
   mc.lineTo( 0, 21);
   mc.lineTo( 0, 0 );
   }

   };



On 5/31/07, Alistair Colling [EMAIL PROTECTED] wrote:


Hi there, I want to remove the green glow that appears when you
rollOver items in a list box. I know how to set the colour of the
theme and how to edit the graphical elements of the component from
the StandardComponents.fla but I can't find the rollOver highlight
MC. If someone could let me know how to alter this (or remove it
completely!) that would be ace.
Thanks guys:)
Ali



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

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


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

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




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

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


Re: [Flashcoders] How do i get rid of the green halo glow on listbox?

2007-05-31 Thread Muzak
You can disable the rollover behavior:
_list.setStyle(useRollOver, false);

Does that help?

regards,
Muzak

- Original Message - 
From: Alistair Colling [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Thursday, May 31, 2007 3:42 PM
Subject: [Flashcoders] How do i get rid of the green halo glow on listbox?


 Hi there, I want to remove the green glow that appears when you  rollOver 
 items in a list box. I know how to set the colour of the 
 theme and how to edit the graphical elements of the component from  the 
 StandardComponents.fla but I can't find the rollOver 
 highlight  MC. If someone could let me know how to alter this (or remove it  
 completely!) that would be ace.
 Thanks guys:)
 Ali


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

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


RE: [Flashcoders] combo box problem

2007-05-31 Thread Randy Tinfow
have you checked with xray if there is something in the way?
Or commented out some of the stuff that gets created in order to pinpoint
the problem?

Just checked with xray, it seems that after 2 selections in that combobox, it 
loses its reference to the __dropdown property, which is a List object.  I'm 
assuming this is why I can't see anything happen after 2 selections.  Why would 
this happen?  Also, the comboboxes store their __dropdown lists at the _root 
level instead of beside the comboboxes themselves, I don't know if this is 
causing any problems.  I have tried using this._lockroot to prevent this, but 
it doesn't fix anything.

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

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

Re: [Flashcoders] How do i get rid of the green halo glow on listbox?

2007-05-31 Thread Alistair Colling

Thanks Muzak , that's great. I have also realised I can use:

this.userlist.rollOverColor = 0xFF;

Thanks :)



On 31 May 2007, at 16:22, Muzak wrote:


You can disable the rollover behavior:
_list.setStyle(useRollOver, false);

Does that help?

regards,
Muzak

- Original Message -
From: Alistair Colling [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Thursday, May 31, 2007 3:42 PM
Subject: [Flashcoders] How do i get rid of the green halo glow on  
listbox?



Hi there, I want to remove the green glow that appears when you   
rollOver items in a list box. I know how to set the colour of the
theme and how to edit the graphical elements of the component  
from  the StandardComponents.fla but I can't find the rollOver
highlight  MC. If someone could let me know how to alter this (or  
remove it  completely!) that would be ace.

Thanks guys:)
Ali



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

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




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

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


Re: [Flashcoders] combo box problem

2007-05-31 Thread Hans Wichman

Hi Randy,
this any help:
http://www.5etdemi.com/blog/archives/2005/06/careful-with-_rootgetnexthighestdepth-and-other-fun-ways-of-breaking-combo-boxes/

greetz
JC


On 5/31/07, Randy Tinfow [EMAIL PROTECTED] wrote:


have you checked with xray if there is something in the way?
Or commented out some of the stuff that gets created in order to pinpoint
the problem?

Just checked with xray, it seems that after 2 selections in that combobox,
it loses its reference to the __dropdown property, which is a List
object.  I'm assuming this is why I can't see anything happen after 2
selections.  Why would this happen?  Also, the comboboxes store their
__dropdown lists at the _root level instead of beside the comboboxes
themselves, I don't know if this is causing any problems.  I have tried
using this._lockroot to prevent this, but it doesn't fix anything.

RT

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

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


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

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


RE: [Flashcoders] combo box problem

2007-05-31 Thread Randy Tinfow
I read that article yesterday, didn't help much.  I'm half way to a solution 
right now.

private function onComboOpen(objEvent:Object)
{
var nDepth:Number = this.getNextHighestDepth();
trace (_cbCategory.getDepth());
_cbCategory.swapDepths(nDepth);
trace (_cbCategory.getDepth());
}

first off, I set _lockroot = true on my combobox instance directly, so its 
_cbCategory._lockroot = true.  This makes its children a part of it instead of 
being external.  Now the combobox will at least open every time.  Whenever it 
opens, it calls the above function to make sure its at the top level.  The 1st 
and 2nd time, it works just fine, the 3rd time, the list part of the combobox 
falls behind everything else on the stage, and the depth is not switching, so 
on the first time, the 2 traces in that function look like this:

1
2

And on the second time:

2
19

And on the third time (and fourth, fifth, sixth...as many as you want really):

19
19

Why is it no longer finding higher depths to put stuff on?

RT


-Original Message-
From: [EMAIL PROTECTED] on behalf of Randy Tinfow
Sent: Thu 5/31/2007 11:34 AM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] combo box problem
 
have you checked with xray if there is something in the way?
Or commented out some of the stuff that gets created in order to pinpoint
the problem?

Just checked with xray, it seems that after 2 selections in that combobox, it 
loses its reference to the __dropdown property, which is a List object.  I'm 
assuming this is why I can't see anything happen after 2 selections.  Why would 
this happen?  Also, the comboboxes store their __dropdown lists at the _root 
level instead of beside the comboboxes themselves, I don't know if this is 
causing any problems.  I have tried using this._lockroot to prevent this, but 
it doesn't fix anything.

RT



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

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

[Flashcoders] Adding Buttons Dynamically

2007-05-31 Thread Steve Abaffy
I would like to be able to add 1 to 18 buttons to the stage dynamically.
Then buttons need to have dynamic text. So the idea would be that there
would be one generic blank button with dynamic text.

So basically,

If(Room[x] != undefined){
Createnewbutton; //not sure of exact code required here
AddDynamicTextToButton;
PositionNewButton;
AddEvenHandlertoNewButton;
}
How does one go about this??




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

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


[Flashcoders] IE6: javascript issues w. events calling: getURL/SWFAddress/Object

2007-05-31 Thread sebastian chedal

Hello,

I'm having problems with IE6 and getURL calling javascript code:

getURL
(javascript:void(urchinTracker('+__newURL.parameters.myURL+')););//google
analytics

makes IE6 open a new window and puts the words:

javascript:void(urchinTracker('path/file'));

in the url bar!

a pop up throws errors too [run time errors] when i use:

window.open (...);

I've tried adding void to the js command. My getURL's are always called from
event handlers, not buttons [as I need to catch user activity].

I'm using SWFObject/Address and there I added:

var so = new SWFObject('?= $base ?/core_holder.swf', 'website', '100%',
'100%', '8', '#00');
(...)
so.addParam('allowScriptAccess', 'true');

To the code; but the error persists!

Has anyone seen this problem before???

I'm building in flash 8, it works fine on safari, firefox and ie7+

problem is urgent!
thanks!!!

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

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


RE: [Flashcoders] combo box problem

2007-05-31 Thread Randy Tinfow
more that I found out:

var nDepth:Number = this.getNextHighestDepth();
trace (this.getNextHighestDepth());
trace (_cbCategory.getDepth());
_cbCategory.swapDepths(nDepth);
trace (_cbCategory.getDepth());

this is that same onComboOpen function I posted before, with one extra 
trace...noticed some interesting stuff here:

1st time:

2
1
2

2nd time:

19
2
19

3rd time:

36
19
19

So getNextHighestDepth is finding the next highest depth, its just the combobox 
won't take that depth.  Any ideas here?


-Original Message-
From: [EMAIL PROTECTED] on behalf of Randy Tinfow
Sent: Thu 5/31/2007 11:56 AM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] combo box problem
 
I read that article yesterday, didn't help much.  I'm half way to a solution 
right now.

private function onComboOpen(objEvent:Object)
{
var nDepth:Number = this.getNextHighestDepth();
trace (_cbCategory.getDepth());
_cbCategory.swapDepths(nDepth);
trace (_cbCategory.getDepth());
}

first off, I set _lockroot = true on my combobox instance directly, so its 
_cbCategory._lockroot = true.  This makes its children a part of it instead of 
being external.  Now the combobox will at least open every time.  Whenever it 
opens, it calls the above function to make sure its at the top level.  The 1st 
and 2nd time, it works just fine, the 3rd time, the list part of the combobox 
falls behind everything else on the stage, and the depth is not switching, so 
on the first time, the 2 traces in that function look like this:

1
2

And on the second time:

2
19

And on the third time (and fourth, fifth, sixth...as many as you want really):

19
19

Why is it no longer finding higher depths to put stuff on?

RT


-Original Message-
From: [EMAIL PROTECTED] on behalf of Randy Tinfow
Sent: Thu 5/31/2007 11:34 AM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] combo box problem
 
have you checked with xray if there is something in the way?
Or commented out some of the stuff that gets created in order to pinpoint
the problem?

Just checked with xray, it seems that after 2 selections in that combobox, it 
loses its reference to the __dropdown property, which is a List object.  I'm 
assuming this is why I can't see anything happen after 2 selections.  Why would 
this happen?  Also, the comboboxes store their __dropdown lists at the _root 
level instead of beside the comboboxes themselves, I don't know if this is 
causing any problems.  I have tried using this._lockroot to prevent this, but 
it doesn't fix anything.

RT






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

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

RE: [Flashcoders] OT: Extract flv metadata using php

2007-05-31 Thread Ruslan Shestopal
Hi, Duncan!
It seems like a very great finding!
Thanks for the URL.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Duncan Reid
Sent: Wednesday, May 30, 2007 9:54 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] OT: Extract flv metadata using php

I found these while searching for a way to insert cuepoint data into FLV via
php, never did get very far though, I have not tried them myself, but if
your a php guy i'm sure you will be able to get something useful out of
them.

http://blog.netxus.es/projects/flv4php

looks like an flv module for getID3, it might very well be included, can't
be certain though...
http://getid3.sourceforge.net/source/module.audio-video.flv.phps

hope this helps some,
Dunc



On 5/30/07, Brian Weil [EMAIL PROTECTED] wrote:

 Does anybody know how to extract flv metadata using php(without ffmpeg or
 other binaries)? I can do it on the client side with flash, but I'm
 generating playlists via php and I would like to include the duration of
 the
 movie in the playlist xml file.

 Thanks,
 Brian

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

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

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

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

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

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


[Flashcoders] RE: OT: Extract flv metadata using php

2007-05-31 Thread Brian Weil
Thanks everyone for pointing out flv4php. I looked at using that but there
are quite a few files and I'm trying to keep things as simple as possible.
Flv4php would be overkill in this case. I'll check out the flv module for
id3 and report back. I'm currently using ffmpeg to extract the info but it's
kind of clunky. I'd rather have a pure php method, Ideally a single function
or class file without a lot of other dependancies.

Thanks again,
Brian

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Duncan Reid
Sent: Wednesday, May 30, 2007 9:54 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] OT: Extract flv metadata using php

I found these while searching for a way to insert cuepoint data into FLV via
php, never did get very far though, I have not tried them myself, but if
your a php guy i'm sure you will be able to get something useful out of
them.

http://blog.netxus.es/projects/flv4php

looks like an flv module for getID3, it might very well be included, can't
be certain though...
http://getid3.sourceforge.net/source/module.audio-video.flv.phps

hope this helps some,
Dunc



On 5/30/07, Brian Weil [EMAIL PROTECTED] wrote:

 Does anybody know how to extract flv metadata using php(without ffmpeg 
 or other binaries)? I can do it on the client side with flash, but I'm 
 generating playlists via php and I would like to include the duration 
 of the movie in the playlist xml file.

 Thanks,
 Brian

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

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


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

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


[Flashcoders] Strange ComboBox issues when loaded in a child SWF

2007-05-31 Thread Andy Herrman

The application I'm working on gets all of its UI resources from a
separate SWF.  This will allow us to internationalize/brand the UI by
simply providing different resource SWFs.

Because the UI resources are all in the child movie I have to
construct the UI within the movie clips owned by that movie.  My
testing shows that if the ComboBox (or any other component) is in the
main movie's library I can't instantiate it any of these movie clips,
so I need to have it contained in the resources clip (I prefer this
anyway as it keeps everything in one place).  Unfortunately I've been
running into some weird issues with ComboBox when doing this.

I've found workarounds for all these issues, which I thought others
may find useful.  I'm also interested to know if other people have run
into them and how they solved them.

The first bug I ran into was that the combo box would never open.
Originally I set _lockroot to true on the movie clip that contained
the combo box.  However, in this case the dropdown would always open
down, even if there wasn't enough room in the movie to do so (which
normally would cause it to open up).  I found that doing _lockroot on
the UI resources movie fixed this.

The second bug I ran into was that a focus rectangle would display
around the combo box and the dropdown.  This doesn't display when the
combo box is simply created in the main movie (which I can't do
unfortunately).  Also, the focus rectangle for the dropdown does not
go away when the dropdown is closed, messing up the UI.  The fix I
found for this was to do the following, where cbx is the ComboBox:

   cbx.drawFocus = null;
   cbx.dropdown.drawFocus = null;

The last issue was a fun one.  If there were enough entries in the
combo box to require scrolling, clicking on the arrows in the
scrollbar or dragging the scroll thingy would cause the dropdown to
close (it closed on the release of the mouse).  This only seems to
happen when the combo box is in a child movie.

By digging through the ComboBox code and doing a bunch of tests I
determined that the combo box's onKillFocus() function was being
called after the mouse was released (this never happened when in the
main movie, only when in the child movie).  onKillFocus takes a single
argument, which I think is a reference to the object that was taking
focus.  In this case the argument was always the dropdown itself
(stored in the combo box as __dropdown).

The fix for this is a total hack, but seems to work in Flash 7+ (at
least in windows).  At the very beginning of the code for the movie I
put the following:

   ComboBox.prototype.onKillFocus = function(n) {
 if(n == this.__dropdown) {
   /* Skip */
 } else {
   if(this._showingDropdown  n != null) {
 this.displayDropdown(false);
   }
   super.onKillFocus();
 }
   }

This overrides the ComboBox function to do what it normally does in
all cases except for when the focus is being given to the dropdown.
The only thing I've found that this breaks is changing focus using the
TAB key.  If the combo box is open and you hit the TAB key to change
focus to something else then it won't close.  This was easily fixed by
adding a key listener that closes the combo box when it sees TAB is
pressed.

Has anyone else run into these things?  Any better solutions?  Any
idea why ComboBox is so broken when used in a child movie (Some of it
seems to be related to referencing _root, but not all of it).

For reference, here's the code for my test case.  This goes into one
SWF with an empty library, and it requires a UIResources.swf file that
has the ComboBox in its library:


import mx.utils.Delegate;
import mx.controls.ComboBox;
//import net.hiddenresource.util.debug.Debug;

class MainImpl {
 public static function main(root:MovieClip) {
   ComboBox.prototype.onKillFocus = function(n) {
 if(n == this.__dropdown) {
   MainImpl.log(Got onKillFocus for dropdown);
 } else {
   if(this._showingDropdown  n != null) {
 this.displayDropdown(false);
   }
   super.onKillFocus();
 }
   }

   if(root == undefined) { root = _root; }
   var test:MainImpl = new MainImpl(root);
 }

 private var uir:MovieClip;
 private var cbx:ComboBox;

 public function MainImpl(rootMC:MovieClip) {
   Stage.scaleMode = noScale;
   Stage.align = LT;
   uir = rootMC.createEmptyMovieClip('uir', rootMC.getNextHighestDepth());

   var l:Object = new Object();
   l.onLoadInit = Delegate.create(this, doTest);
   l.onLoadError = function(target, ec) { MainImpl.log('Error: ' + ec); };
   var mcl:MovieClipLoader = new MovieClipLoader();
   var b:Boolean = mcl.addListener(l);
   mcl.loadClip(UIResources.swf, uir);
   //doTest();
 }

 private function doTest():Void {
   log('doTest');
   uir._lockroot = true;
   createUI(uir);
 }

 private function createUI(root:MovieClip):Void {
   root.createClassObject(ComboBox, cbxTest, root.getNextHighestDepth());
   cbx = 

Re: [Flashcoders] IE6: javascript issues w. events calling: getURL/SWFAddress/Object

2007-05-31 Thread Rostislav Hristov

Combining ExternalInterface with getURL is problematic for IE,
especially in the SWFAddress case. Check out
http://www.asual.com/blog/swfaddress/2007/05/18/swfaddress-bad-practices.html

SWFAddress 1.1 has a build-in Analytics tracking support. You can also
download the current development version from the Sourceforge.net
repository, it has a few helpers for actions like window.open().



On 5/31/07, sebastian chedal [EMAIL PROTECTED] wrote:

Hello,

I'm having problems with IE6 and getURL calling javascript code:

getURL
(javascript:void(urchinTracker('+__newURL.parameters.myURL+')););//google
analytics

makes IE6 open a new window and puts the words:

javascript:void(urchinTracker('path/file'));

in the url bar!

a pop up throws errors too [run time errors] when i use:

window.open (...);

I've tried adding void to the js command. My getURL's are always called from
event handlers, not buttons [as I need to catch user activity].

I'm using SWFObject/Address and there I added:

var so = new SWFObject('?= $base ?/core_holder.swf', 'website', '100%',
'100%', '8', '#00');
(...)
so.addParam('allowScriptAccess', 'true');

To the code; but the error persists!

Has anyone seen this problem before???

I'm building in flash 8, it works fine on safari, firefox and ie7+

problem is urgent!
thanks!!!

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

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




--
Asual - open software that pushes the limits
http://www.asual.com/
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


[Flashcoders] simple FLVPlayback with a Class?

2007-05-31 Thread Steven Loe
Hello All,
I'm hoping to use the FLVPlayback component with a class in flash 8 AS2. I'd
like to avoid placing an instance on the stage at author time. 

Unfortunately, the class below does not play video. Any thoughts? I don't need
any UI controls. I'm just looking to play the flv and loop it continuously. 

Thanks for the help!

-Steven

- Begin class FLVPlayer.as -

import mx.video.*;

class FLVPlayer{
var rootRef:MovieClip;
var my_FLVPlybk:FLVPlayback;

function FLVPlayer(rootRef:MovieClip) {
this.rootRef = rootRef; // ref to timeline

rootRef.attachMovie(FLVPlayback, my_FLVPlybk, 10, 
{width:320, height:240,
x:100, y:100});
my_FLVPlybk.skin = none;
my_FLVPlybk.contentPath = barkerVideo.flv;
}
}

code on timeline of my .fla:
var player:FLVPlayer = new FLVPlayer(this);



  
___
You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_html.html
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] Strange ComboBox issues when loaded in a child SWF

2007-05-31 Thread Hans Wichman

Hi,

I found another strange thing in ComboBox today, Ive overriden the
displayDropdown method to open up upwards always. The only thing is
Macromedia changed 2 lines in the combobox class between mx2004 and flash 8,
which caused the overridden component to no longer trigger events.

So when compiling it eg in flash 7, it would work, but when loading a child
clip containing a combobox compiled in flash 8 first, it would no longer
work.

Offending lines is at line 700 in the combobox class. In flash 7 its there,
in flash 8 its commented out.

Normally of course the superclass should be well constructed allowing you to
override only what you want to override, but the methods in the combobox
class make this impossible. This in turn forces you to override the whole
displayDropdown method, which in turn causes it to break due to the
aforementioned superclass changes.

Solution is to use an external assets library as well.

Another issue I found when using comboboxes in subclips etc is that on
loading it a second time, you'd get a small disabled button instead of the
normal dropdown, which is fixed by putting :
Object.registerClass(ComboDownArrowDisabled, MovieClip);
on the first frame of the root timeline.

greetz
JC




On 5/31/07, Andy Herrman [EMAIL PROTECTED] wrote:


The application I'm working on gets all of its UI resources from a
separate SWF.  This will allow us to internationalize/brand the UI by
simply providing different resource SWFs.

Because the UI resources are all in the child movie I have to
construct the UI within the movie clips owned by that movie.  My
testing shows that if the ComboBox (or any other component) is in the
main movie's library I can't instantiate it any of these movie clips,
so I need to have it contained in the resources clip (I prefer this
anyway as it keeps everything in one place).  Unfortunately I've been
running into some weird issues with ComboBox when doing this.

I've found workarounds for all these issues, which I thought others
may find useful.  I'm also interested to know if other people have run
into them and how they solved them.

The first bug I ran into was that the combo box would never open.
Originally I set _lockroot to true on the movie clip that contained
the combo box.  However, in this case the dropdown would always open
down, even if there wasn't enough room in the movie to do so (which
normally would cause it to open up).  I found that doing _lockroot on
the UI resources movie fixed this.

The second bug I ran into was that a focus rectangle would display
around the combo box and the dropdown.  This doesn't display when the
combo box is simply created in the main movie (which I can't do
unfortunately).  Also, the focus rectangle for the dropdown does not
go away when the dropdown is closed, messing up the UI.  The fix I
found for this was to do the following, where cbx is the ComboBox:

   cbx.drawFocus = null;
   cbx.dropdown.drawFocus = null;

The last issue was a fun one.  If there were enough entries in the
combo box to require scrolling, clicking on the arrows in the
scrollbar or dragging the scroll thingy would cause the dropdown to
close (it closed on the release of the mouse).  This only seems to
happen when the combo box is in a child movie.

By digging through the ComboBox code and doing a bunch of tests I
determined that the combo box's onKillFocus() function was being
called after the mouse was released (this never happened when in the
main movie, only when in the child movie).  onKillFocus takes a single
argument, which I think is a reference to the object that was taking
focus.  In this case the argument was always the dropdown itself
(stored in the combo box as __dropdown).

The fix for this is a total hack, but seems to work in Flash 7+ (at
least in windows).  At the very beginning of the code for the movie I
put the following:

   ComboBox.prototype.onKillFocus = function(n) {
 if(n == this.__dropdown) {
   /* Skip */
 } else {
   if(this._showingDropdown  n != null) {
 this.displayDropdown(false);
   }
   super.onKillFocus();
 }
   }

This overrides the ComboBox function to do what it normally does in
all cases except for when the focus is being given to the dropdown.
The only thing I've found that this breaks is changing focus using the
TAB key.  If the combo box is open and you hit the TAB key to change
focus to something else then it won't close.  This was easily fixed by
adding a key listener that closes the combo box when it sees TAB is
pressed.

Has anyone else run into these things?  Any better solutions?  Any
idea why ComboBox is so broken when used in a child movie (Some of it
seems to be related to referencing _root, but not all of it).

For reference, here's the code for my test case.  This goes into one
SWF with an empty library, and it requires a UIResources.swf file that
has the ComboBox in its library:


import 

Re: [Flashcoders] Strange ComboBox issues when loaded in a child SWF

2007-05-31 Thread Hans Wichman

Hi Andy,

one more question, do you load in a clip with all the assets and actually
construct an interface within that library, OR do you use runtime shared
libraries to accomplish this, if and not, why not;).
We are running into problems (as described in the previous post) which
forces us to move to a single library as well, and I'm still pondering which
option to take.

greetz
JC


On 5/31/07, Andy Herrman [EMAIL PROTECTED] wrote:


The application I'm working on gets all of its UI resources from a
separate SWF.  This will allow us to internationalize/brand the UI by
simply providing different resource SWFs.

Because the UI resources are all in the child movie I have to
construct the UI within the movie clips owned by that movie.  My
testing shows that if the ComboBox (or any other component) is in the
main movie's library I can't instantiate it any of these movie clips,
so I need to have it contained in the resources clip (I prefer this
anyway as it keeps everything in one place).  Unfortunately I've been
running into some weird issues with ComboBox when doing this.

I've found workarounds for all these issues, which I thought others
may find useful.  I'm also interested to know if other people have run
into them and how they solved them.

The first bug I ran into was that the combo box would never open.
Originally I set _lockroot to true on the movie clip that contained
the combo box.  However, in this case the dropdown would always open
down, even if there wasn't enough room in the movie to do so (which
normally would cause it to open up).  I found that doing _lockroot on
the UI resources movie fixed this.

The second bug I ran into was that a focus rectangle would display
around the combo box and the dropdown.  This doesn't display when the
combo box is simply created in the main movie (which I can't do
unfortunately).  Also, the focus rectangle for the dropdown does not
go away when the dropdown is closed, messing up the UI.  The fix I
found for this was to do the following, where cbx is the ComboBox:

   cbx.drawFocus = null;
   cbx.dropdown.drawFocus = null;

The last issue was a fun one.  If there were enough entries in the
combo box to require scrolling, clicking on the arrows in the
scrollbar or dragging the scroll thingy would cause the dropdown to
close (it closed on the release of the mouse).  This only seems to
happen when the combo box is in a child movie.

By digging through the ComboBox code and doing a bunch of tests I
determined that the combo box's onKillFocus() function was being
called after the mouse was released (this never happened when in the
main movie, only when in the child movie).  onKillFocus takes a single
argument, which I think is a reference to the object that was taking
focus.  In this case the argument was always the dropdown itself
(stored in the combo box as __dropdown).

The fix for this is a total hack, but seems to work in Flash 7+ (at
least in windows).  At the very beginning of the code for the movie I
put the following:

   ComboBox.prototype.onKillFocus = function(n) {
 if(n == this.__dropdown) {
   /* Skip */
 } else {
   if(this._showingDropdown  n != null) {
 this.displayDropdown(false);
   }
   super.onKillFocus();
 }
   }

This overrides the ComboBox function to do what it normally does in
all cases except for when the focus is being given to the dropdown.
The only thing I've found that this breaks is changing focus using the
TAB key.  If the combo box is open and you hit the TAB key to change
focus to something else then it won't close.  This was easily fixed by
adding a key listener that closes the combo box when it sees TAB is
pressed.

Has anyone else run into these things?  Any better solutions?  Any
idea why ComboBox is so broken when used in a child movie (Some of it
seems to be related to referencing _root, but not all of it).

For reference, here's the code for my test case.  This goes into one
SWF with an empty library, and it requires a UIResources.swf file that
has the ComboBox in its library:


import mx.utils.Delegate;
import mx.controls.ComboBox;
//import net.hiddenresource.util.debug.Debug;

class MainImpl {
public static function main(root:MovieClip) {
   ComboBox.prototype.onKillFocus = function(n) {
 if(n == this.__dropdown) {
   MainImpl.log(Got onKillFocus for dropdown);
 } else {
   if(this._showingDropdown  n != null) {
 this.displayDropdown(false);
   }
   super.onKillFocus();
 }
   }

   if(root == undefined) { root = _root; }
   var test:MainImpl = new MainImpl(root);
}

private var uir:MovieClip;
private var cbx:ComboBox;

public function MainImpl(rootMC:MovieClip) {
   Stage.scaleMode = noScale;
   Stage.align = LT;
   uir = rootMC.createEmptyMovieClip('uir', rootMC.getNextHighestDepth());

   var l:Object = new Object();
   l.onLoadInit = Delegate.create(this, doTest);
   l.onLoadError = 

[Flashcoders] Flex like RSLs in CS3?

2007-05-31 Thread Steve Mathews

I know this comes up with every version of Flash, but this time it
seems Flex does it right, so the question is can I share code/assets
in CS3 (mainly code)?

Basically I recently came on board after a project was started and it
has been built in Flex. But the only part of Flex we 'need' is the RSL
feature, and now the framework seems to be causing some problems. So
we would like to possibly switch over to CS3 and get rid of the Flex
framework.

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

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


Re: [Flashcoders] combo box problem

2007-05-31 Thread Muzak
Don't use getNextHighestDepth() when using the v2 component framework.
Use the DepthManager.

So I'd start by removing whatever hoops you're currently jumping through and 
replace all getNextHighestDepth() methods with 
DepthManager methods and see if it works as is.

regards,
Muzak

- Original Message - 
From: Randy Tinfow [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Thursday, May 31, 2007 6:34 PM
Subject: RE: [Flashcoders] combo box problem


more that I found out:

var nDepth:Number = this.getNextHighestDepth();
trace (this.getNextHighestDepth());
trace (_cbCategory.getDepth());
_cbCategory.swapDepths(nDepth);
trace (_cbCategory.getDepth());

this is that same onComboOpen function I posted before, with one extra 
trace...noticed some interesting stuff here:

1st time:

2
1
2

2nd time:

19
2
19

3rd time:

36
19
19

So getNextHighestDepth is finding the next highest depth, its just the combobox 
won't take that depth.  Any ideas here?


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

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


[Flashcoders] Flash C3 and Embedding resources

2007-05-31 Thread Smith, Philip
Hi there,

I was reading this article on embedding resources here:
http://www.bit-101.com/blog/?p=853 and wondered if the same, or a
similar technique can be achieved when compiling AS3 with the Flash C3
IDE, ie:

 [Embed(source=graphics.swf, symbol=box)]
private var B:Class; 

public function Constructor() 
{
 var square:Sprite = new B();
}

I'm getting an error doing this, and was wondering if this possible, or
is there another alternative to 'embedding assets/creating com graphical
libs' with the Flash C3 IDE?

Thanks,

Phil

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

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