Solved

Flash builder 101 tutorial

Posted on 2012-04-10
3
465 Views
Last Modified: 2012-04-10
i'm going through this (in an attempt to my boss to justify using Flash Builder) -
http://www.adobe.com/devnet/flex/articles/build_first_dashboard.html

and i'm hitting a hurdle with

 
	protected function piechart1_itemClickHandler(event:ChartItemEvent):void
			{
				// TODO Auto-generated method stub
				responderSales.token = companyService.getAllCompanySales(event.hitData.item.region);
				var myArr:Array = [];
				myArr[event.hitData.chartItem.index] = 0.2;
				series.perWedgeExplodeRadius = myArr;
			}

Open in new window


Access of undefined property series - but I have this

      <mx:series>
                  <mx:PieSeries displayName="Series 1" nameField="region" field="totals"/>
            </mx:series>

what's it complaining about?
0
Comment
Question by:blue-genie
[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
  • 2
3 Comments
 
LVL 37

Accepted Solution

by:
CyanBlue earned 500 total points
ID: 37827096
Yo!!  :)

I am sure you have figured it out already by now, but that series.perWedgeExplodeRadius is looking for an instance called series which is normally defined with 'id' attribute in the MXML document.
So, as long as you add an id attribute like this, you can avoid the error.
<mx:PieSeries id="series" displayName="Series 1" nameField="region" field="totals"/>

Open in new window

The 'series' in this line, </mx:series>, means the same thing as the package name on regular AS3 project.

CyanBlue
0
 
LVL 39

Author Comment

by:blue-genie
ID: 37827484
hey CB - i think these people create tutorials to confuse poor souls like me :-)
I can't believe i had so much resistance to flex - connecting to a webservice is so easy!! I like it.

I tried creating random id attributes all over the place but i realise now i was being a moron - case of going through the motions without thinking.
got it working perfectly now :-)

tx as always.
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 37827569
Yeah. I created a couple of tutorials just for that purpose. :p

My first real project was basically just that where I have built wcf services that flex frontend consumes.

Have fun. :)

CyanBlue
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

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