views:

102

answers:

1

Basically, irrespective of what changes I make to my source, compiling alway yields either a transcoding error, or a missing definition. I'm new to flash so it's difficult for me to understand how to go about fixing the problem. Anyway here is the source. The stack overflow link I always put in all my source, to look at for encouragement every time I feel like banging my head against the keyboard.

// Main.as package { // General imports // http://stackoverflow.com/questions/564756/should-i-just-give-up-on-programming import com.bit101.components.Label; import flash.display.; import flash.events.; import AssetManager;

// Begin external facing class public class Main extends Sprite { public function Main() { var globalFont:String = AssetManager.FONT_PFRONDA; //var myLabel:com.bit101.components.Label = new Label(Main = null, xpos = 25, ypos = 30, text = "Test Successfull"); //addChild(myLabel); } }


// AssetManager.as package { public class AssetManager
{ [Embed(source = 'C:\Documents and Settings\Geko\Desktop\Flash\testclient\lib\MinimalComps_0_9_5_\src\assets\pf_ronda_seven.ttf', fontName = 'PF Ronda Seven', fontWeight = 'normal', advancedAntiAliasing = 'true', mimeType = 'application/x-font-truetype')] public static const FONT_PFRONDA:String; }

}


Currently when I try to compile I get the following error... C:\Documents and Settings\Geko\Desktop\Flash\testclient\src\Main.as(6): col: 31 Error: Definition com.bit101.components:Label could not be found.

and if I remove the comment from "var myLabel" or "addChild lines" in Main.as, then I get..

C:\Documents and Settings\Geko\Desktop\Flash\testclient\lib\MinimalComps_0_9_5_\src\com\bit101\components\Component.as(51): col: 4: Error: transcoding parameter 'embedAsCFF' is not supported by 'flex2.compiler.media.FontTranscoder'

C:\Documents and Settings\Geko\Desktop\Flash\testclient\lib\MinimalComps_0_9_5_\src\com\bit101\components\Component.as(51): col: 4: Error: Unable to transcode /assets/pf_ronda_seven.ttf.

My classpaths are "src", "lib\MinimalComps_0_9_5_\src\assets", and "lib\MinimalComps_0_9_5_\src\com\bit101\components"

I'm using Flex SDK 3.5.0.12683 on Windows XP with FlashDevelop 3.2.1 RTM

Any ideas as to why I'm constantly receiving errors each time I try to build the project?

A: 
C:\Documents and Settings\Geko\Desktop\Flash\testclient\src\Main.as(6): col: 31 Error: Definition com.bit101.components:Label could not be found.

this would suggest that the application can't find the Label class, possible reasons could be a problem with your classes library path, not importing the Label class, problem with the Label class package name etc...

The other two errors have to do with the way your font is embed. "embedAsCFF" requires Flex SDK 4.

In the error message you get a mention to the flex2 compiler.

'flex2.compiler.media.FontTranscoder'

Are you sure to be using the Flex SDK 3.5? I don't use FlashDevelop myself , so I wouldn't know where to look in order to edit the current Flex SDK.

PatrickS
While this didn't solve all my errors it helped me to make the mental leaps that were necessary to the solutions. The import statement and the folder structure for my project were incorrect. The "embedasCFF" error was caused by two lines in the label.as source, the first was for Flex SDK 4, and was not commented, while the second line was for Flex SDK 3 and was commented out. I just commented out the Flex SDK4 line and removed the comment from the Flex SDK3 line.Also, I realized I don't need to type the actual names of arguments when calling constructors.Thanks for the help Wopdoowop.
James
I generally prefer when I find a solution to a problem on my own after someone has set me in the right direction. Happy I could help!
PatrickS