Solved

Rotate a List component AND STILL view the data.

Posted on 2010-09-22
12
394 Views
Last Modified: 2012-05-10
Hey all,

I have a populated list component in Flash CS5.  I want to rotate it 90-degrees.  But when I rotate it at all, the labels no longer display in the list component.

Any fixes?

Thanks in advance.
0
Comment
Question by:ModifyMe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 4
12 Comments
 
LVL 8

Expert Comment

by:ActionScript_Helper
ID: 33742660
You'll need embedded font for your list to display labels even after rotation.

You can embed a font in library and can set font style of your list component using

yourlist.setStyle("fontFamily", "embeddedfontname");
Or may be you can set font property from properties bar.

Alternatively as per my knowledge, publishing your SWF on Flash player 10 can solve this, as FP10 can show non-embedded rotated text.
0
 

Author Comment

by:ModifyMe
ID: 33745979
Hmmmm, well I tried this:

test_lb.setStyle("fontFamily", "Font 1");

...and it did not work. I am testing a new list component with hardcoded data and manually rotating it 90-degrees, then testing with no luck

Flash CS5-AS3
0
 

Author Comment

by:ModifyMe
ID: 33750642
Well, I've searched quite a bit w/no luck.  I do hope someone can help me resolve this soon.
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Author Comment

by:ModifyMe
ID: 33766900
The attached screenshot is the process that I am doing, with no luck still.
embed.jpg
0
 
LVL 8

Expert Comment

by:ActionScript_Helper
ID: 33767567
Inverse to my expectation list styling works really differently, I did some research and found the following solution.
Try to implement it, it may take some communication to make it to work for you, so feel free to shoot any question.


Here's the process how you'll get embedded font to work with list, and make list rotated:

1. First part is to embed the font (Referring your screenshot):
- In your step 2 (Font Embedding), go to "ActionScript" tab and select the check box saying "Export for ActionScript"
doing this allows your embedded font to be accessible via ActionScript.

2. Second part is to create a custom cellRenderer for your List cell renderer which will use embedded font:
- Create an ActionScript class named "CustomCellRenderer" (At same place as your FLA), and put the following code in it:
=========================
package {
    import fl.controls.listClasses.CellRenderer;
    import flash.text.TextFormat;
    public class CustomCellRenderer extends CellRenderer {
        public function CustomCellRenderer() {
            var format:TextFormat = new TextFormat("Verdana Regular", 12);
                  setStyle("embedFonts", "true");
            setStyle("textFormat", format);
        }
    }
}
=========================

Please note that the font name should be your Embedded font name + Style name (Actual font name + Font Style name)
See this line:
---
var format:TextFormat = new TextFormat("Verdana Regular", 12);
---
"Verdana" is name of your embedded font, concat it with font style mentioned in your step 2 i.e. "Normal", so it should be "Verdana Regular"


3. Now the 3rd step is to use this custom cell renderer for your list component, in your FLA put this code line:
- my_lb.setStyle("cellRenderer", CustomCellRenderer);

4. And now you can rotate the list box :)
0
 

Author Comment

by:ModifyMe
ID: 33773140
I am trying to upload my .fla and .as files onto this post, but I keep getting an error.  I did try what you suggested, but now I get a blinking list component...still no labels.
0
 
LVL 8

Accepted Solution

by:
ActionScript_Helper earned 500 total points
ID: 33776190
Blinking list means.. code has some error..

are you publishing the SWF with AS3?

May be try to upload FLA and AS file on some different location and than share the link here..
0
 

Author Comment

by:ModifyMe
ID: 33782300
Here is the location for the .zip file.

http://jumbofiles.com/fk5agcj6xutm

0
 

Author Comment

by:ModifyMe
ID: 33795045
Please disregard that link I posted just above this post, that site is no good.

Here is where you can get the download of the files I am trying to get to work.

http://www.4shared.com/file/kvaU_IdQ/CustomList.html

0
 
LVL 8

Expert Comment

by:ActionScript_Helper
ID: 33795913
I'll try and let you know the results soon..
0
 

Author Comment

by:ModifyMe
ID: 33805001
I just noticed my .as file was not included in the .zip file...sorry for my disorganization.  Here is that file.
CustomCellRenderer.as
0
 

Author Closing Comment

by:ModifyMe
ID: 33850497
Thank you.
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Convert a Panasonic N3R file to avi 5 400
remove computer from using logon script 17 46
Help to debug powershell script 5 44
BatchFile-Disk Detection 23 31
In this article, I'll explain how to setup a Plex Media Server (https://plex.tv/) on a Redhat (Centos) 7 based NAS with screenshots to help those looking for assistance.  What is Plex? If you aren't familiar with Plex, it’s a DLNA media serv…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Viewers will learn the basics of using Ableton Live's advanced sampler instrument, Sampler. Load new Sampler into an empty MIDI track: Select a sample and drop it into sample window in Sampler: Adjust pitch if necessary with Root Key setting: …
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question