Error: Initializer for 'rotation': cannot parse value of type Number from text'-10'.

Error: Initializer for 'rotation': cannot parse value of type Number from text'-10'.


When I used a code given in an ebook "Getting Started with Flex 3". This is Example 1-1 Starter.mxml given in this book.
Code: 

Example 1-1. Starter.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Image source="@Embed('mypicture.jpg')" height="100"
top="30"
left="30" rotation="−10">
<mx:filters>
<mx:DropShadowFilter />
</mx:filters>
</mx:Image>
</mx:Application>
When I compile this code. Get following error:



When I checked code again and again, then i saw something wrong in code.
Image name should be "myimage.jpg" not "mypicture.jpg".
If the problem is not resolved then Delete all quotes( " ") in this code and type again.
If the problem is not resolved yet then delete minus sign ( - ) in rotation="-10" and type again.
That's it. Your problem is resolved now.

Correct Code:

0 Comments
Disqus
Fb Comments
Comments :

0 comments:

Post a Comment