I'm putting a flash site together with a stage size of 800 x 600px but I have a background image that I want to use in the same Flash file, the size = 1350x800px(jpg) that I want to stretch/compress to whatever screen resolution the viewer has. So I need 100% width & height, I've gone through the forums but can't figure this out.I'm on Flash 8, Win 7 and Dreamweaver 8.
I am looking at the SimpleButton entirely wrong. Here's what I'm doing (inside of a MovieClip):
[Code]...
the close_btn.width and height remain 0. Am I supposed to just rely on the DisplayObject members of the SimpleButton completely and ignore width/height/x/y or what?
I have a Flash CS4 Professional version installed in my machine. Here is my problem.
1st - I'm importing an image to stage and set the width and height to match the image. (everything is good, no problem) 2nd - I am using the FLVPlayback components build-in from Flash CS4. It does load the video and everything. (everything seems good) 3rd - Publish the video to my local drive (everything seems good) 4th - I could play the video from my local pc and it loads fine and fast 5th - Upload everthing from my local folder to the Web server, it does display the background image but not the video. It has a white blank screen. What is going on? I copy the exact folder from local to server. What have I missed? How could I make the video to load?
function onComplete(e:Event):void { xmlData = new XML(e.target.data); var image:Array = new Array();
[Code].....
I flash playr i see images loading over itself But in output imageLoader.width: 0 allthumbs_pos: NaN WHy imageLoader.width=0; How get width of my images?
I have built a very simple Flash gallery in CS4 using AS2. It calls the images from an XML file and works great. The problem is that the captions underneath the images are in a fixed width text box. They look fine underneath horizontal images, but I want to have the text shift in when a vertical image is loaded, and is narrower.
I'm constructing a book of sorts in Actionscript 3 (FlexBuilder) and am trying to size an image dynamically according to the dimensions of it's source file. But, I've found that if I don't explicitly state the width and height of an image, they trace as 0.
So that I can scale down an image to fit within a given space, how do I get the width and height of a source image?
I have created some movie clips dynamically using createEmptyMovieClip. Then I am loading images into the clips using the MovieClipLoader. In the onLoadComplete of the loader I am trying to position the clips based on the _width and _height.
I would think that since the clips are loaded as indicated by the OnLoadComplete firing they would have a _width, but it comes up as 0. What gives?
Error "TypeError: Error #1009: Cannot access a property or method of a null object reference. at Show/displayImage() at Show$iinit()" public function displayImage(imgPath:String,imgWidth:Number,imgHeigt:Number,imgXPos:N umber,imgYPos:Number) { var request:URLRequest = new URLRequest(imgPath); var loader:Loader = new Loader(); loader.load(request); loader.x = imgXPos; loader.y = imgYPos; addChild(loader); trace(loader.content.width); }
I'm loading some images from a web service and use a MovieClipLoader to load the image. In the onLoadInit() I set the new width and height of the image. ( This must be done after the image is completely loaded )
My problem is that the image has poor qualtity. The quality around the edges isn't as the original image. Is there a way to improve the image to just scale as movieclip._width and movieclip._height isn't the best way to go.
is there a way to get a jpg's image and height (before dynamically loaded) within flash? the only way i could do it was to load the image into a containerMC, but i would like to do it before the image loads. the only other way i could think of was to send the image link to a php script and returning its height/width to flash.
I'm doing an image gallery from xml file, and the thumbnails have diferent sizes. Around the thumbnail there is a border, both are diferent movie clips (thumb and border). they reside inside a main movieclip wich is being duplicated.
So I need to resize the border according the new size of the thumb movieclip, but flash actually gets the value from the starting value of the thumb, not the size after the file was load on to it.
I just thought flash would read the new value if i set the var for the width after the load movie, but that ain't happening =(.
My code so far:
Code: function createButton(newObj, thumbNode, bigImageNode){ duplicateMovieClip(thumb_base, newObj, depthCount++); var tempName = eval(newObj);
I create a simple .As file with following score code: Code: package{ import flash.display.Loader; import flash.display.Sprite; import flash.events.MouseEvent; import flash.net.URLRequest; public class AS3_Project1 extends Sprite{ private var sprite:Sprite; [Code] ..... And the image wont appear but if i remove the sprite.width = 500; line and I can view the image? what going on?
Is there a way to get a jpg's image and height (before dynamically loaded) within flash? The only way I could do it was to load the image into a containerMC, but I would like to do it before the image loads. the only other way I could think of was to send the image link to a php script and returning its height/width to flash.
What I want to happen is a movieclip of text aligns 20px to the right of the loaded img, similar to what padding does in css, the code I am using is: textFields._x = (picture._width+20); textFields is the movieclip of text and the image is loading into picture
What actually happens is the the text aligns to picture._width but before the image the image has loaded or I am not telling it the right place to look for ._width
I have a movieclip (containter_mc) , which i then load a .jpg image into with actionscript. but when i try to set the height and width (setProperty(containter_mc,_width,200) it changes the image size, but does not make it to the specified size...
Is there a way to specify/change the height and width of an image loaded from an xml file that will be placed within an empty movieclip? The movieclip will resize with the webpage, and what I want to do is make sure the images resize proportionally with the movieclip, but I can't seem to figure it out.
I am able to load images into my file by designating their locations in an XML file using AS3. I'd like to be able to determine the width and height of the individual images without having to manually enter each one into the XML file.I think once I reach this point, I'll be able to figure it out on my own:I want to be able to load an image to the stage and trace its width.
I can put 10000 x 20000 image in flash overlapping the stage, only part of the image which cover the stage will appear.I want to achieve similar effect in HTML.I have an image 600 x 3000 and my browser body width is like 1280px.I want only 1280px width of the image to appear on the HTML page and the rest of the image will be hidden.
In my Flex application, I've got a component that extends UIComponent where I'm loading images at runtime and try to display them. I've tried lots of different approaches (using beginBitmapFill(), using different containers), but I can't get things to work as I want. The problem seems to be related to the width and height properties of the image, which aren't updated correctly.The idea is:
var sprite:Sprite = new Sprite(); addChild(sprite); var im:Image = new Image();[code].....
The image's width and height doesn't seem to be correct when it's loaded. I get width==0 (and nothing is displayed), but the property $width seems to be correct. How can I assure that width and height of the loaded image is updated?
i'm trying to access the width and height of an image that is added to the stage via a custom LoadImage class. the trace results are 0 even though the image displays correctly.
//frame script var image:LoadImage = new LoadImage("myImage.jpeg"); addChild(image);
I am loading an image into a movie clip via AS3, and what I want to do is center the image inside the movieclip. The problem is that I can't seem to grab the width value of the image being loaded. Below is what I'm doing:
imageLoader = new Loader(); imageLoader.load(new URLRequest(event.target.name)); screenBox.screenHolder.addChild(imageLoader); trace(this.imageLoader.width);
When I trace the width, it always comes back at zero(0) even though there is an image inside the imageLoader. What is it I need to do to find the actual width so I can center the image?