ActionScript 2.0 :: Loading Image With Random Sizes But Same Place?

Dec 17, 2006

i have a swf with a list of images on the left and what i want to do is when i click in the image , it will creat an empty movieclip and send an image inside.i know how to do this, but the problem is that i have a 300x200, 200x300 and another sizes, but the max width and hiehgt is 300x300, so i need a 300x300 movieclip and my dificultie is to make the images stay exactly in the middle of the invisible movieclips o they dotn load around places i dont want to .im trying with this:

creating clips
this.createEmptyMovieClip("containerFoto", this.getNextHighestDepth());
containerFoto.createEmptyMovieClip("foto", containerFoto.getNextHighestDepth());
var fotoLoader:MovieClipLoader = new MovieClipLoader();[code].....

in this code the problem is that im notgettting the width and hieght of the image.

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Random Image Loading Via XML

Apr 25, 2005

i'm trying to randomly load images via xml but my output window keeps saying "undefined".

[Code]...

View 8 Replies

ActionScript 2.0 :: Random Image Loading Via XML?

Apr 25, 2005

i'm trying to randomly load images via xml but my output window keeps saying "undefined".

Code:
function loadXML(loaded){
if(loaded){
xmlNODE = this.firstChild;

[code]....

View 12 Replies

Actionscript 3.0 :: Image Loading In Random Order Using XML?

May 26, 2010

I'm currently doing up my flash gallery and there something bugging me.I'm using XML to load my images dynamically and would like the images to appear in a horizontal manner.

image1 - image2 - image3 - image4 etc.

however, everytime i run the swf, the order of the images are randomized.

Code: Select allvar portraiture_images:XMLList;
var portraiture_total:Number;
var container_portraiture:MovieClip;[code].....

as my images are of different width, I made use of the imageWidth variable to keep track of where the X co-ordinate should be for the next image.

View 2 Replies

Random Image Loading For Athletics Website

Jun 21, 2010

I'm an intern for a small college and have been given the task of designing the athletic departments intro page. Nine different sports teams need to be represented (football, volleyball, cross country, etc.). I have all the visual elements in place but I need action script to work for bringing up a randomly selected picture from a pool of pictures for each sport. In other words, after the slide show cycles through each of nine sports, how can I make it so a different picture is displayed the next time through (for each sport). Or if the page is refreshed, a different image is displayed. My boss is not familiar with flash and needs a folder that she can put images in for each sport after I am finished with my internship.

View 5 Replies

ActionScript 2.0 :: Random Image Loading From Txt File?

Sep 30, 2003

I want to have a background image that randomly loads from a list of *.jpg files in a txt file. The txt file is to be edited by user (to add a new image) without accessing the code contained in the .fla, and the txt file gives the location of the images.

View 5 Replies

ActionScript 2.0 :: Random Image Loading From Txt File

Sep 30, 2003

i am having major brain burp... I want to have a background image that randomly loads from a list of *.jpg files in a txt file. The txt file is to be edited by user (to add a new image) without accessing the code contained in the .fla, and the txt file gives the location of the images. It is possible I know - but my old head isn't working. I need this for a charity that I do free work for;

View 5 Replies

ActionScript 3.0 :: Flash Image Loading In Random Order Using XML?

May 26, 2010

I'm currently doing up my flash gallery and there something bugging me.

I'm using XML to load my images dynamically and would like the images to appear in a horizontal manner.

image1 - image2 - image3 - image4 etc.

however, everytime i run the swf, the order of the images are randomized

Code:
var portraiture_images:XMLList;
var portraiture_total:Number;
var container_portraiture:MovieClip;

[Code].....

as my images are of different width, I made use of the imageWidth variable to keep track of where the X co-ordinate should be for the next image.

View 3 Replies

Professional :: Transition Between Two Different Sizes Of The Same Image?

Apr 20, 2010

Im currently working on a project where I have a 92x92 pixel image that needs to tween into a 711x300 pixel image.  The images are the same but cropped to these sizes via photoshop, imported into flash, then converted to graphic symbols.  I want to have the 92x92 image tween into the 711x300 image.
 
I say tween, but the two tweens aren't working correctly, I can't seem to find a "crop" like function in flash that will let me adjust the large image for when its supposed to be small, then have it tween between the two sizes as i need them to.

View 2 Replies

IDE :: Photo Gallery Using XML - Image Sizes

Sep 9, 2009

How can i fix the ImageHolder (Movie Clip size) that holds the images loaded into it. At the moment I have sized the photos to the size I want, but if a photo is not that "Specific" size it will overlap my text next to it... How can I fix the size of this movie clip to show the images without it blowing out my design? I have sized all the images to: 230px x145px If they are not this size the design will not work, I need to fix the window to 230px x145px

View 1 Replies

ActionScript 2.0 :: Loading Random Image Into MovieClip (Scale 100 Percent)

Oct 27, 2004

I am trying to load a random image into a movie clip that will scale 100%. Then have the content MC noScale and stay the same. If I insert a picture into the bg movieclip, it scales and shows up no problem. Soon as I try to load a random image into the bg movieClip the picture just does not show up!! But what is even weider, is that I have it set up that if the picture is 100% loaded for another MC to play, which it does! So the picture is there, but it's invisible? And no the picture is not progressive.

Code:
Stage.scaleMode = "noScale";
Stage.align = "LT";
bg.onResize = function() {
this._width = Stage.width;
this._height = Stage.height;
[Code] .....

View 1 Replies

Place MC,s At A Random Place

Sep 21, 2009

i tried it all but cant solve it on my own. i have 10 different MC,s. they shall appear by hitting a key on the keyboard. all i want them to appear and play on a random place.

all then 10 MC,s are deticated to 10 different keys on the keyboard. (so by hitting the "A" on the keyboard shall place and play MC "A" at a random place..

View 18 Replies

ActionScript 2.0 :: [F5] - Random Loading Image Layer - Can't Move On With The Page Or Site

Sep 1, 2003

I've tried 3 different scripts for a random loading image layer and none of them work. Does anyone have code/script for this that will work for Flash 5? I'm totally hung up at this stage and can't move on with the page or site until I have this aspect resolved.

View 12 Replies

Data Integration :: Any Way To Change Image Sizes (From XML) In Flash?

Sep 7, 2006

I am creating a slideshow within Flash that uses XML data pulled from a database. Is there any way to manipulate the image size from within Flash? I am going to use the slideshow for a plasma display, and have clients uploading image files at random, which are then added to our database. I need each image to be 16:9. I know the easy way to control this would be to give the clients size requirements - we will do this in the future - but unfortunately there are hundreds of images already in the database that are already odd sizes. While it's clearly possible to change the size of the movie itself, is there a way to force each image that is imported from the XML to be a particular size - say 800 x 450 or 1200x 675 or 1600 x 900? (i.e. -- can I force the XML generated image to fill up the whole screen/browser window, regardless of what size it is?) It does not matter if the image gets distorted or stretched.

View 1 Replies

Data Integration :: Will Flash Optimize Image Sizes

Jul 15, 2008

I have a question about the optimization of pictures placedin a Flash stage.If I put a big sized pictures (for example: 1024 x 1024) andif, in the final result, the picture is downscaled on the Flashstage (for example : 200x200 pixels), once the swf is created ,will the picture be as heavy as before it was downscaled, when theflash web site will be loaded in browse

View 2 Replies

ActionScript 2.0 :: Xml Photo Gallery - Image Sizes And Quality

Aug 23, 2006

I've been working with the xml photo gallery tutorial on this site, and pretty much have it the way I want, except I am having some serious issues with the image sizes and quality, and cannot figure this one out.. The problem is that when the jpg images are loaded in dynamically they look horrible in quality. I searched and searched for an answer to this and couldn't really find anything that I had already tried... The only thing I could really think of was to rebuild my site at a larger scale and publish with 'match movie' instead of 'percent'.

After all that work... I'm having something very crazy going on, but it should help diagnose the problem.. When I rebuilt the site and re-did the images to match the exact pixels, for some reason now they are super big. I've looked at my code and can't see any scaling going on.. I don't know what is happening, so I'm going to supply all available resources:

[Code]...

View 5 Replies

ActionScript 3.0 :: MC,s Shall Appear On A Random Place?

Sep 21, 2009

i am pretty new to actionscript. i tried it all but cant solve it on my own. i have 10 different MC,s. they shall appear by hitting a key on the keyboard. all i want them to appear and play on a random place. all then 10 MC,s are deticated to 10 different keys on the keyboard. (so by hitting the "A" on the keyboard shall place and play MC "A" at a random place.

View 1 Replies

Flex :: Place An Image By Dragging And Placing It In The Drag Proxy Image Position

Mar 23, 2010

I found examples in adobe site only to position the object where the mouse pointer is. But i have to place the image in the position of drag proxy image.

View 1 Replies

ActionScript 1/2 :: Song's Start In Random Place?

Oct 18, 2009

I made flash player and i used that tutorial: HERE. Everything is good, but when one song is ending, next song's start is delay about 1-2 sec. You can say that is nothing in flash mp3 player, but if each other song is one short speaker sentence(there are about 10 one by one) it may be nervous. how to delete that delay? I don't need to have xml playlist. Just i want to start one by one(all playlist is about 300-400 loop/songs/mp3 files) without delay.

Now I think there is no way to delete that delay(how i can do it), but i have another idea. I will make one big file from 10 or 20 of that smaller, but i need to have in my player one thing more. When user will press start button, song won't start at 00:00/xx:xx but in random place. You know what i mean ? It will not start at start but somewhere else, in random place(maybe 00:21/xx:xx or 02:47/xx:xx or 01:02/xx:xx).
 
[Code].....

View 3 Replies

ActionScript 2.0 :: Movieclip Which Is Added To The Stage Every Second At A Random Place?

Sep 9, 2009

I have a movieclip which is added to the stage every second at a random place.i want all instances of this movieclip to move to the postion x=100px and y=200px on the stage at a rate of 5px.im not sure how to code this, i would like the code to be in as3 if possile as i do not know as2.

View 2 Replies

ActionScript 1/2 :: AttachMovie - Place At Random Locations On The Scene

Feb 26, 2010

I've got a small issue with attachMovie. I've got an array with references to movie clips which I want to place at random locations on the scene. Here is my function:
 
[Code].....

The thing here is that the trace of "mc" in the beginning returns the correct movie clip reference, but "mc_clothes_holder.mc" after the attachMovie returns "undefined".

View 4 Replies

ActionScript 3.0 :: Generating A Random Number With One Decimal Place?

Mar 2, 2011

I looked everywhere on the internet and couldnt find how to generate a random number that had one decimal place.I am trying to generate numbers between 12.0 and 13.0 randomly.Below is my code... I know its wrong because of Math.round and Math.random, but i cant seem to find anything that deals with a decimal place.

addEventListener(Event.ENTER_FRAME, fl_EnterFrameHandler_1);
function fl_EnterFrameHandler_1(event:Event):void{volt.text = Math.round(Math.random()*(1)+12).toString();}

[code].....

View 3 Replies

ActionScript 2.0 :: Random Place / Color And Size For A MC / When A Press Button

Jun 29, 2011

I wanted that, when I place the mouse on the button, a movieclip appears, but in a random place in the screen, with a random size and a random color and plays until all its animation is complete, and then disappear.How can I do that? I don't know even where to start!

View 5 Replies

ActionScript 3.0 :: Generate Random Movieclips And Then Place It On A Correct Base?

Feb 12, 2011

I am making a flash toy in which the user correctly places an object to its correct base. I've managed to get object preplaced onto the stage to snap to the right base. But now I'm trying to get randomly generate a single object from each array I've made to be placed on the stage and to be placed on the correct base.[code]...

View 1 Replies

ActionScript 2.0 :: Pixel Effect - Position Shape At Random Place On Stage

Apr 13, 2006

I am trying to make a so called pixel effect in witch I want to make a shape only from pixels that are positioned in some random place on the stage. And all these pixels move to a certain point and create that shape. I've been looking into BitmapData Class but I don't now if that is the best way to do it.

View 2 Replies

ActionScript 2.0 :: Place 35 Movie Clips In Random Order On Stage In Specific XY Coordinates?

Nov 12, 2009

I have 35 movie clips named mcMyObject1, mcMyObject2, etc. to mcMyObject35Each time the playhead enters the frame this code sits on, I want all of these 35 movie clips to be placed on the stage in random orderI want each one of these 35 movie clips to land on one of these X coordinates: 57, 187, 317, 447, 577, 707, 837 and on one of these Y coordinates: 53, 183, 131, 443, 573. (It's a 7 x 5 grid)Movie size is 1024 x 768Here's my code, which doesn't work:

stop();
var myXArray=[57, 187, 317, 447, 577, 707, 837]; //cordordinates for x
var myYArray=[53, 183, 313, 443, 573, 573, 573]; //cordordinates for y

[code]......

View 8 Replies

ActionScript 3.0 :: Loader+Math.random - RandomNumber Not Loading Random Images?

Feb 26, 2012

why is this code NOT loading a random image, despite tracing random number?
 
package {
import flash.display.Loader;
import flash.display.Sprite;
import flash.events.*;
import flash.net.URLRequest;
import flash.display.MovieClip;

[Code]...

View 3 Replies

ActionScript 2.0 :: Putting Data Into An Array Via XML And Then Selecting At Random An Image String To Load In A Pic At Random

Feb 11, 2009

I've been putting data into an array via XML, and then selecting at random an image string to load in a pic at random. But whilst doing this, I wanted to remove the String from the Array that I have just used, so I don't get repetition of the same image in the output. I initially thought that pop would remove the string I had just used - But of course it Removes the last value in the Array instead, which doesn't really help.

Ok - so how about randomizing the data once inside the Array, after it has been pulled in from XML!? That way I can load in the 'last' image, and then pop it out! Keeping a randomized selection of images each time 'it' is loaded

View 2 Replies

ActionScript 2.0 :: Load Random Movie (but Loading A Random Xml File Instead)

Aug 17, 2007

im playing with the load random movie (but loading a random xml file instead) based on the wonderful tutorial from front page and was wondering whether anyone can show me the work around/upgrade to AS2 for this bit of script since im publishing to Flash 8 /AS2 and it doesnt work:

[Code]....

View 5 Replies

ActionScript 2.0 :: Loading Random XML Nodes / Math.random Not Working

Sep 27, 2009

I am now using the code for my background image which will rotate when you enter a new gallery.I can't get it to randomize.[code]I have tried adding: Math.floor(Math.random() * total); and it almost works. It seems everytime the last node is called it stops working (also at other random times, haven't found a pattern).

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved