- Home /
Flash build - Resources.as problems
I'm trying to build a Flash version of a game and after cleaning up some other scripts I'm just sitting now on several errors dealing with a Resources.as file. I have no idea where that file is being generated from or what any of these errors mean. I've tried hunting down information about this on Google and all over the place and am just completely stumped. I don't even have any "Resources" folders still in my project. Here are the errors and the lines they're referring to in the actual script:
"Error: Type was not found or was not a compile-time constant: Assembly."
public static function Resources_GetResourceStream_String_Assembly($resourceName: String, $assembly: Assembly): Stream { if ($assembly == null) { $assembly = Assembly.Assembly_GetExecutingAssembly(); } return $assembly._Assembly_GetManifestResourceStream_String($resourceName); }
"Error: Type was not found or was not a compile-time constant: Stream."
public static function Resources_GetResourceStream_String_Assembly($resourceName: String, $assembly: Assembly): Stream { if ($assembly == null) { $assembly = Assembly.Assembly_GetExecutingAssembly(); } return $assembly._Assembly_GetManifestResourceStream_String($resourceName); }
"Error: Type was not found or was not a compile-time constant: Stream."
public static function Resources_GetResourceStream_String($resourceName: String): Stream { return Resources_GetResourceStream_String_Assembly($resourceName, null); }
"Error: Type was not found or was not a compile-time constant: Assembly."
public static function Resources_GetByteResource_String_Assembly($resourceName: String, $assembly: Assembly): CLIArray { var $resourceStream: Stream = Resources_GetResourceStream_String_Assembly($resourceName, $assembly); var $array: CLIArray = CLIArrayFactory.NewArrayOfPrimitive(int, 0, $resourceStream.Stream_Length as uint); $resourceStream.Stream_Read_ByteArray_Int32_Int32($array, 0, $resourceStream.Stream_Length); $resourceStream.Stream_Close(); return $array; }
"Error: Type was not found or was not a compile-time constant: Assembly."
public static function Resources_GetTextureResource_String_Assembly($resourceName: String, $assembly: Assembly): Texture2D { var $texture2D: Texture2D = new Texture2D().Texture2D_Constructor_Int32_Int32(4, 4); $texture2D.Texture2D_LoadImage_ByteArray(Resources_GetByteResource_String_Assembly($resourceName, $assembly)); return $texture2D; }
So yeah any tips would be incredibly helpful here, thanks!
Your answer
Follow this Question
Related Questions
Resources.Load not working in flash build. I Can't find answer anywhere. 0 Answers
3.5 Flash Export - Compiles fine, but no resources 0 Answers
excluding resources when targetting flash 0 Answers
How to get a Texture asset that is in the project and pass it to a function? 3 Answers
Does loading a Resource load that resource's dependencies? 1 Answer