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?
i know this has proberbly been covered before, but how do i do this:i want my script to run a function only after an image has loaded using loadMovie is that possible?
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);
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 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.
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 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?
I am loading in a list of thumbnails from an XML file. The images are not always square but one of the dimensions is always 50pixels, whether it be height or width. Occasionally an image IS square. I am creating a 52x52 sprite and adding the loader image as a child to this sprite centrally. To do this I need to know the dimensions of the loaded images. (the loader object). Everything loads, parses and displays as it ought to, I just cannot find the width/height of the loaded image. Pics1List is an XML file.
ActionScript Code: var imageLoader:Loader; var request:URLRequest; for (i = 0; i < (pics1List.picture.length()); i=i+1) { var picture:MovieClip = new MovieClip(); imageLoader = new Loader(); [Code] .....
As you can see, I tried a few different things and frankly in the end just tried each combination I could!. The closest I got was when I used imageLoader.contentLoaderInfo.width and the error message was "The loading object is not sufficiently loaded to provide this information." which is why I added the event.complete function. However, this function never triggered so I commented it out.
Is it possible to change the height and/or width of an MC after it loaded an image (xml)?
I made an upload page for images and a xml file to read the records from the database. So any image size is possible. but it must be like 100x100 pixels (just an avatar kind of size).
Do i need to do that with php or is it possible with A.S. 2??
I have a frame that plays and checks and prints the width of a movieclip, but the movieclip is constantly changing size, so I would like the textfield to show the movieclip width as is scales. I would assume I need to create a method of looping the code that checks the width, maybe a setinterval?
I'm loading external swf and I want to check it's stage width and height, do you know how to do this? I dont want to check the width and height of the swf because it changes depending on which frame is currently playing in this swf...
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?
I am having an issue with pulling width and height from an external swf.
I can load it ok, and place it ok, but I want to shrink it when I place it and that is where the problem occurs. Here is the abridged code. The odd thing is that if I move the width and height lines inside the function, it works. Trouble is every time you click that tab the swf shrinks a little more.
Code: //------------------Calling the external SWF and loading it------------- var myRequest:URLRequest = new URLRequest ("images/filter.swf"); var myLoader:Loader = new Loader();
There are 50 movies loaded sequentially. From Q1 thru Q29 I want to attach a particular title (mc) to the main movie and then for Q30 thru Q40 another and so on. The file is on an Learning Management Sytem so I'm using SCORM [code]...
I an running a website in flash and whenever the user comes onto the page, if he clicks a button before the SWF has loaded the file acts strange sending them to the wrong page. I am almost certain that the solution to this would be to halt my actionscript until the entire file has loaded in the browser.
Is there any way to get the real stageWidth of an loaded swf? The problem comes when the loaded swf has some elements outside the scene. In this case content.width becomes bigger then the scene. My code looks like this:
I am loading several movies into a main movie. I'm using moviecliploader class.loadMovie with a listener object.On LoadInit sets the dimensions and position of the loaded movie.With one of the movies this works fine, but with the other, as soon as I set the width, the movie disappears and on tracing the width following setting it it turns out to be 0.I've just returned to actionscript after a month and I have a memory like a sieve. I'm sure I remember this happening before but I can't remember what I did.
I am building a website in which the nav bar has an animation on the "home" frame and not on the others. It works all nice until I come back to "home" and then my nav bar bugs. So I am thinking the best way to "refresh" the nav bar would be to removeChild(); and then add it again... but then when I go to the other frames (pages) it disappears. If I run addChild(); to every pages.. then it duplicates it and becomes buggy. Is there a way to run an if() function that would check if the nav bar is already there and addChild only if it is not there?