Groups | Blog | Home
all groups > flash (macromedia) > november 2003 >

flash (macromedia) : list component mx 2004



ritpas
11/16/2003 9:49:09 PM
Hello,

I used a list component in my flash file.
The component appears, but the items (labels) don't during runtime though they appear properly in author environment.
Does anybody have an answer?
Thanks,

Pascal

PS : other thing : does anybody know how to add a scrollbar under mx 2004? has it been removed?


Dr.Dre'del
11/16/2003 11:00:00 PM
haven't used a list box, though what you're describing sounds like either a security (domain resolution) issue or a type casing issue. If you're pulling content into the list box from outside the swf, make sure the URL in the browser has the exact same domain as the url of your source material (for instance, if you're running on an internal domain of 192.168.0.2, which, as far as your network is concerned is equivalent to localhost, flash does not see them as the same and will quit when it comes to authentication. And if you're pulling in a file called "settings.xml" and you call it in the script with "SETTINGS.xml" it will work in the Flash environment but not once it's in the browser.

As for the scroll bar, I suspect they did away with it in favor of the scrollpane which does mostly the same thing.
The scroll pane component has a few bugs (as do all the others, seemingly). Most notably it needs time to initialize and has no "onLoad" event associated with it, so you need to write your own testers to make sure you're talking to an object that actually exists. This proves particularly ugly when you have the scrollpane on a MC that doesn't exist on the stage, but is added via attachMovie() at some point.

Lastly, I am about to post a request for documentation on the components because I have found answers on boards (such as how to get rid of the borded in the scroll pane via setStyle()) which I have not seen anywhere in the official documentation... so watch that thread for further answers to how to actually use the components.

ritpas
11/16/2003 11:13:42 PM
Thanks for your reply but I fear that you misunderstood my pb.
It has nothing to do with internet, the site is not online, I just want the items to be showed in the swf file which is not the case. The labels appear in the author environment on the stage. In the swf file, it looks as if the items were not visible because the rows are highlighted when pressing on.



Dr.Dre'del
11/17/2003 7:01:56 AM
I see... I'm sorry, why you said it you "See it" in the author environment, I thought you meant that when you preview the movie (CTRL + ENTER) it works, but when you look at the swf in a browser or in a flash player it doesn't.

I suspect that what you're seeing is the result of the same "delay" problem that I described in my answer. How are you getting the data into the list box? Are you using the component inspector? Or are you filling the content in dynamically?

ritpas
11/17/2003 9:11:45 AM
By using the componennt inspector


ritpas
11/17/2003 9:19:29 AM
In fact, I typed the labels which are titles and the datas which are variables : tech1,tech2,tech3 ...
The titles appear in author environment but not in .swf or simply by testing the movie

ritpas
11/18/2003 7:22:23 PM

In fact The list component I used is contained in a masked layer.
I made then a new test.
I created a new document and I conclude the following :
when the list is masked, the labels are not displayed.
When the list is used in a normal layer : the content is doisplayed.
That's the observation but the reason? May be a bug? Anyway I found nothing related to masks in the component documentation.


Dr.Dre'del
11/18/2003 7:39:17 PM
what you're describing sounds to me like the problems I used to see in the old ScrollPane component in MX (not 2004) where the mask would fail on text that didn't use an embedded font.
So, the elements that were to be masked would just hang over the fold as though no mask was present unless the font used in them had all the characters embedded.

If you don't know what I'm talking about, I'll describe in detail. If you have control over the font settings in your list (again, I haven't used the list so I don't know if these are exposed) make sure you embed all the characters.

ritpas
11/18/2003 7:51:41 PM
Thanks for your reply.
It may be the solution, Ididn't think of that. But how do I embed the list item's font?
I didn't find it in the documentation, customization concern only skins.
How did you do it under mx?

ritpas
11/18/2003 7:57:02 PM
Thanks for your reply.
It may be the solution, Ididn't think of that. But how do I embed the list item's font?
I didn't find it in the documentation, customization concern only skins.
How did you do it under mx?

Dr.Dre'del
11/18/2003 8:02:30 PM
as I said, I wasn't using the list component, and have yet to use it. I was using the scrollpane component and filling it with Movie Clips to scroll which simply had pieces of text on them. If those pieces of text had fonts that weren't embedded the scroll pane worked (it scrolled the movie clips in it up and down) but didn't mask the elements beyond its set borders. I have no idea if any of this pertains to your issue, it just sounded similar to me.

ritpas
11/18/2003 8:13:51 PM
Ok thanks.
Anyway I found out how to embed the listbox's font under mx, the component item called labelField, which a textfield you can embed in the property panel like any other textfield.
This text field is accessible through the library because here, all the itels composing the component are contained in several folders.
Under 2004, obviously the component cannot be customized through the library.



Dr.Dre'del
11/18/2003 8:15:56 PM
ok, so I just tried to put together a list component and it simply doesn't work. It has very few features so it's not as though there's a whole lot you can get wrong here. I tried using both quoted and unquoted values in the data and labels parameters. Nothing.

I am inclined to believe that I'm doing something wrong, though, with the options being what they are, I can't imagine what that is. Very peculiar.


Dr.Dre'del
11/19/2003 12:18:40 AM
I'm such an idiot.

Ok, at the risk of calling you an idiot as well, I'm going to suggest that what you're doing wrong is saving the movie out as flash 6.

When I went to test the list component I was in a flash document that a client had given me that was saved out in MX. So, it didn't work (obviously) and I was at a loss as to what I had done wrong (read above post).

After toiling with a scrollpane for an hour trying to figure out what that was suddenly not working, I finally went to check what version they had saved the file at and voilla.

So... having tested the list component as a flash 7 component, it works perfectly.

File -> Publish Settings -> Flash -> Version pull down -> FLASH 7!!!!!!!!!

I hope that helps, cause I'm all out of ideas and my list works perfectly.

ritpas
11/19/2003 12:55:11 AM
The publish settings are properly set up : flash 7 and actionscript 2.0 as by default.
the list labels are still not visible when masked, it works perfectly when not.
In fact, the key of my pb lays on embedding label's font as you told before, I will investigate that way.
Thanks a lot anyway.
You told me it works fine, I wonder if the list is masked, if it works really fine, isn't?


Dr.Dre'del
11/19/2003 1:00:54 AM
sorry... I thought I'd solved it. Ok, well, I have to say that I guess I don't understand what you're trying to do. You have a list component that you want to apply a mask to? Perhaps if you describe in more detail what you're trying to do, I can come up with an alternative.

ritpas
11/19/2003 1:20:25 AM
Just one simple test :
- you create a new mx 2004 document (the pb happens with flash mx too!!!)
- you add a list component on your stage
- above you create a mask layer conatining a fullcolored shape overlaying the list
- you set the layer containing the list as masked
- you add some labels to your list

=> when testing your movie, you will see that the labels don't appear. The reason why is probably because the font is not embedded. What I want to know now is how to embedd the label's font?

(it happens also with a textarea as well as all the other components)


Dr.Dre'del
11/19/2003 1:26:15 AM
right... well, if it's a font embedding issue then you may be sunk. Your only recourse may be to build your own list box.


ritpas
11/19/2003 1:43:06 AM
no there is a way to embedd fonts.
It is possible with flash mx , why shouldn't it be possible under 2004?
The difference between 2004 and MX is that components are now coompiled, unlike Mx , you cannot now go to the library and customize each item separatedly. I have to found out how to customize it, especially Label textfield.
I think actionscript may bring a solution or cascaded style sheets

erik NO[at]SPAM fuel
12/10/2003 3:07:49 PM
A simple fix might work here. Create a dynamic text field off stage with the fonts embedded in it. If you are using Arial in the component, embed arial into the dynamic text field. That's worked for me on occasion.

- e

AddThis Social Bookmark Button