|
|||
|
The following code gets me zilch in my flex app. Is there an issue with Flex/AS3 or is there another method.
var image = Image.load("c:\\test.jpg"); trace(image.width); trace(image.height); |
|
|||
|
Please copy the swfkit wrapper classes into your flex project directory, and import them by using the following code
Code:
import SWFKit.*; If you still cannot make it work, please send your project to us (support@swfkit.com), we'll help you to solve the problem. |
|
|||
|
Here is a demo app that does not work. My SWFKit folder is in the root. I should also mention that all of my other code using the SWFKit extensions DOES work! So far it's only the images that don't work.
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="creationComplete();"
>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import SWFKit.*;
private var testImage:SWFKit.Image = SWFKit.Image.load("c:\\test.jpg");
private function creationComplete():void {
debug.text += "\r" + "Image: " + testImage;
debug.text += "\r" + "width: " + testImage.IsValid();
debug.text += "\r" + "width: " + testImage.width;
debug.text += "\r" + "height: " + testImage.height;
}
]]>
</mx:Script>
<mx:TextArea id="debug" top="10" left="10" bottom="10" width="350" text=" -------- Application Debug Log -------- " fontSize="14"/>
</mx:Application>
Last edited by Russell2566; 12-16-2008 at 03:07 PM. |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|