This site is optimised for Firefox 2.0 or Internet Explorer 7.

combobox problem...

rson has no avatar
rson
 
Post Count: 29
Joined: Thu Apr 03, 2008 5:16 pm
Location: Pittsburgh, PA
Flash Version: Adobe Flash CS3

combobox problem...

Postby rson on Thu Jul 10, 2008 4:39 pm

I've been searching for some time now about this. I have an external .swf file with a combobox component in it and everything works great until i load it into a parent .swf.

I have seen many AS2 solutions to this by using this._lockroot; but that is no longer supported in AS3. What happens to the combobox is the text does not show up in the viewable area [see screenshots]

Image

Any ideas on what I can do to remedy this?

I have tried copying the combobox onto the parent swf as well, but to no avail...

twiggy has no avatar
twiggy
 
Post Count: 29
Joined: Tue May 06, 2008 3:18 am

Re: combobox problem...

Postby twiggy on Fri Jul 11, 2008 8:48 pm

Code: Select all
Source code goes here. This is how we figure out what's wrong :-)
To do a dangerous thing with style, is what I call art. -Bukowski

User avatar
jrockwell3
 
Post Count: 22
Joined: Sun Jul 13, 2008 5:10 pm
Flash Version: Adobe Flash CS3

Re: combobox problem...

Postby jrockwell3 on Sun Jul 13, 2008 5:16 pm

I'm pulling my hair out trying to solve this one too. I'm having the exact same issue, but rather than with an external swf it's a MovieClip that exists in my library. I've tried both placing the combobox manualy, and building it in with AS. No dice. Below is my function that builds the combobox and then adds it to the MC that is loaded into the main timeline. Any advice would be greatly apprecated.

Code: Select all
function continueContest(Event:MouseEvent):void{

      var comboBox:ComboBox = new ComboBox();
      comboBox.dataProvider = new DataProvider(questions);

      paperHolder.addChild(paperMC);
      paperMC.blankSheet.addChildAt(pageContestMC, 1);
      pageContestMC.comboHolderMC.addChildAt(comboBox, 0);

}


User avatar
JNewhouse
 
Post Count: 52
Joined: Wed Apr 02, 2008 8:08 pm

Re: combobox problem...

Postby JNewhouse on Sun Jul 13, 2008 6:34 pm

since i really cant see what your swf looks like. I really only have one question. Inside your movieclip is everything set to a (0, 0) possition? and when you load your mc or import your swf are you setting the possition to (0, 0) that would place everything at the topleft corner.

sounds simple... many over look... but i only bring it up because i dont have your swf.

User avatar
jrockwell3
 
Post Count: 22
Joined: Sun Jul 13, 2008 5:10 pm
Flash Version: Adobe Flash CS3

Re: combobox problem...

Postby jrockwell3 on Sun Jul 13, 2008 6:56 pm

I'm not setting the positions, though everything is defaulting to 0,0. I just tried fixing everything to 0,0 but still no change. I just PMed you the link to check it out.

User avatar
jrockwell3
 
Post Count: 22
Joined: Sun Jul 13, 2008 5:10 pm
Flash Version: Adobe Flash CS3

Re: combobox problem...

Postby jrockwell3 on Sun Jul 13, 2008 9:34 pm

I'm starting to think this might be a bug/issue with CS3. Has anyone done this successfully; to confirm you can actually use components from an external swf?

rson has no avatar
rson
 
Post Count: 29
Joined: Thu Apr 03, 2008 5:16 pm
Location: Pittsburgh, PA
Flash Version: Adobe Flash CS3

Re: combobox problem...

Postby rson on Mon Jul 14, 2008 2:57 pm

Ok, i wanted to punch myself when i figured out the problem...

The problem was I had a mask over the area where the external swf's were being loaded in. For some reason, the mask blocked out just the text in the combobox area... :|

I didn't post any code because I am not creating this dynamically.

Thanks all for the replies and hopefully this will help one of you :)

User avatar
jrockwell3
 
Post Count: 22
Joined: Sun Jul 13, 2008 5:10 pm
Flash Version: Adobe Flash CS3

Re: combobox problem...

Postby jrockwell3 on Mon Jul 14, 2008 3:38 pm

Son of a... Removing the mask fixes it.

Gonna have to think of a work around though, I need the mask. Thanks, though!

User avatar
yarcub
Moderator
 
Post Count: 1678
Joined: Tue Mar 14, 2006 1:34 pm
Location: Portugal / Entroncamento
Flash Version: Adobe Flash CS3

Re: combobox problem...

Postby yarcub on Mon Jul 14, 2008 5:49 pm

jrockwell3 wrote:Son of a... Removing the mask fixes it.

The component uses system fonts and masks only work on embedded fonts.
Finally the FP10 new text engine will fix a lot of those issues.

rson has no avatar
rson
 
Post Count: 29
Joined: Thu Apr 03, 2008 5:16 pm
Location: Pittsburgh, PA
Flash Version: Adobe Flash CS3

Re: combobox problem...

Postby rson on Tue Jul 15, 2008 12:19 pm

yarcub wrote: component uses system fonts and masks only work on embedded fonts.


I thought it was strange though that only the text in the container portion was not showing and the dropdown text showed up fine...

saulobrito has no avatar
saulobrito
 
Post Count: 1
Joined: Sun Dec 14, 2008 11:42 pm
Flash Version: Adobe Flash CS3

Re: combobox problem...

Postby saulobrito on Sun Dec 14, 2008 11:48 pm

Hi,

Same issue. In my case, the following did the trick:
Code: Select all
package {
   import fl.controls.ComboBox;
   import flash.events.Event;
   
   public class ComboContainer extends Sprite {

      public var iBuggyCombo:ComboBox;

      public function ComboContainer() {
         this.removeChild(this.iBuggyCombo);
         this.addEventListener(Event.ADDED_TO_STAGE, stageHandler, false, 0, true);
      }
      
      protected function stageHandler(ev:Event):void {
         this.addChild(this.iBuggyCombo);
      }
   }
}


Hope it helps,
Regards,

nathanyot has no avatar
nathanyot
 
Post Count: 4
Joined: Mon Jul 06, 2009 7:02 am
Flash Version: Adobe Flash CS3

Re: combobox problem...

Postby nathanyot on Tue Jul 07, 2009 2:49 am

hi can u explain more in detail that how u do the trick?
i m a newbie and i already have a class for my fla, how can i include more than one class for my fla?

thanks!

altair has no avatar
altair
 
Post Count: 1
Joined: Mon Mar 01, 2010 11:55 pm
Flash Version: Adobe Flash CS3

Re: combobox problem...

Postby altair on Mon Mar 01, 2010 11:58 pm

Hi,
i'd got the same problems with combobox and mask but I found a simple solution to this:
just use a new TextField with embedded font, placed over the combobox and change its text on combo change event ;)


Return to Actionscript 3.0

Who is online

Users browsing this forum: No registered users and 5 guests