import utils.Util fails?

I am following the tutorial from the Adobe Flex 2 : Training form the source book
and have followed the instructions provided but I can't seem to get that utils.Util package imported.
Below is part of the code I have and the error i'm getting this error everytime I try to use Util

1120: Access of undefined property Util.

Any guidance appreciated.
Thanks

<mx:Script>
	<![CDATA[
		import utils.Util;
		import mx.rpc.xml.DataType;
		import mx.collections.ArrayCollection;
		import mx.rpc.events.ResultEvent;
		import flash.net.FileReference;
						
		
		private function populateForm(event:Event):void {
			var selectedNode:Object = event.target.selectedItem;
			if(selectedNode.@prodName != undefined) {
				Util.presetList(unitID,"unitID",selectedNode.@unitID);
				prodName.text = selectedNode.@prodName;
				cost.text = selectedNode.@cost;
				listPrice.text = selectedNode.@listPrice;
				description.text = selectedNode.@description;
				isOrganic.selected = Util.yesNoToBoolean(selectedNode.@isOrganic);
				isLowFat.selected = Util.yesNoToBoolean(selectedNode.@isLowFat);
				imageName.text = selectedNode.@imageName;
				
			} else {
				resetForm();
			}
		}
 
		
	]]>
</mx:Script>

Open in new window

CoreNeterAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

julianopolitoCommented:
This is probably a class that came with the book (in cd exercises), and you should have your project pointing to the folder with that package, or just copy the utils folder into your project folder. this is not a standard flex class.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CoreNeterAuthor Commented:
Ah I see, I was going crazy over this because it seemed there was a package called flash.utils,
Thanks for the heads up, i'm reading from an ebook and don't  have the project files.
0
gdzillaCommented:
Hey CoreNeter,
I don't know if you're still interessted in this problem. But the Util - class can be found in one of the excerpts on the adobe website itself.

Just download one of the example lessons and copy paste the folder you want :)

http://www.adobe.com/devnet/flex/articles/tfs_excerpts.html

0
spamsickleCommented:
People are running into the same problem with the Adobe Flex 3: Training from the Source book.

I'm going through that book without opening the CD-ROM, and the first time I actually need the 2 functions from the custom Util class in in chapter 6.  I've simply coded my own "custom" versions of the actionscript.

For Util.presetList, I coded:


					// my version of missing Util.presetList
					for(var i:Number = 0; i < unitID.dataProvider.length; i++)
					{
						if(unitID.dataProvider.getItemAt(i)["unitID"] == selectedNode.@unitID)
						{
							unitID.selectedIndex = i;
							break;	
						}
					}

Open in new window

0
spamsickleCommented:
People are running into the same problem with the Adobe Flex 3: Training from the Source book.

I'm going through that book without opening the CD-ROM, and the first time I actually need the 2 functions from the custom Util class in in chapter 6.  I've simply coded my own "custom" versions of the actionscript.

For Util.yesNoToBoolean, I coded:

					// my version of missing Util.yesNoToBoolean
					isOrganic.selected = 
						(selectedNode.@isOrganic.toLowerCase() == "yes") ? true : false;
					isLowFat.selected = 
						(selectedNode.@isLowFat.toLowerCase() == "yes") ? true : false;

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Flex

From novice to tech pro — start learning today.