ActionScript 2.0 :: [fmx04] Loading Images Randomly And Put Them In _x And _y Coordinates?
Jul 31, 2004
problem with loading images randomly and putting them in the right _x and _y coordinates.I have a swf file with in the first frame a button with this code :
I have a problem with loading images randomly and putting them in the right _x and _y coordinates. I have a swf file with in the first frame a button with this code :
on (release) { filename = ["image-01.jpg", "image-02.jpg", "image-03.jpg"]; path = "images/"; i = filename.length;
[Code]....
the image gets loaded and placed correctly when played from the harddisk. the problem starts when i upload the swf to the internet, then the image won't be centered but the left upper point of the image is placed at x=640 and y=230
I am trying, with this code, to first, shuffle the order of the images in the array so their loading sequence is never the same when the page is reloaded.Then, im trying to have the shuffled array open one at a time, image by image, at a set interval.
Code: Array.prototype.shuffle = function() { for (i=0; i<this.length; i++) {
I have this function that moves the cursor automatically to random points. I want to know how I can make them move to 4 specific points (x,y coordinates) instead.
I am assuming I need to create an array of the of some sort with the x,y points and tween them but have no idea how to go about this.
Code:
function autoMoveObject() { if (!mouseControl) { var moveObjectX:Tween = new Tween(cursor, "_x", Regular.easeOut, cursor._x,
I have three Flash movies (all the same pixel size) that I want to use on the home page of my website which is built in MX 2004.
How often the movie changes is not critical, but I think once an hour will be fine. What's the best way to get Flash to automatically change the movie every hour and where should I attach any code - to an Actions layer in movie no. 1?
As a summary, here's what I want to achieve;
12.00pm - movie no. 1 plays 1.00pm - movie no. 2 plays 2.00pm - movie no. 3 plays 3.00pm - movie no. 1 plays again
...and so on for 24 hours until you get back to 12.00pm when movie no. 1 plays again.
I am loading in new swfs using the comboBox component which is all working fine with the following code:
HTML Code: comboListener = new Object(); comboListener.change = function(evtObj){ _root.empty_holder.loadMovie(evtObj.target.text + ".swf",3); } myComboBox.addEventListener("change",comboListener );
What I want to do is instead of it loading into the empty_holder MC, load straight in to replace the parent swf.The reason being that all the buttons underneath, in the parent swf are still active when the new one loads in. If a completely new swf cant be loaded, is there some code that can just deactivate the parent swf?
I'm working on co-developing a game in flash, which involves, among other things, designating a path along which an image has to travel. Basically, it collects mouse coordinates, and needs to move the image to each set of coordinates in order. My co-developer insists that it needs to be done with trigonometry.Or is there some simpler method to move an image/movie clip/etc. cleanly to a given position on the stage?
I wanted to modify the XML Portfolio Tutorial to be able to create a grid of images with the thumbnails.I'm not sure how to control the x and y coordinates of the thumbnail images using the method shown in the tutorial.
May I noe if there is any flash example or anyone noe how to make images cycling very fast,then one of the images will zoom out for a while, then continue the procedure again but now display out another image.... Something like random letter cycling..
I want to be able to create an swf that loads in images randomly from a database of several thousand pictures, like the example that I have linked to. Is this possible?
I am designing a website and have for locations I would like to load a random image from the same folder. Goals we'd like to accomplish with this:
1. We want images to load randomly from same folder 2. We don't want any duplicate images on the page at any one time 3. We have different size movie clips they are loading into.
Is there a way to accomplish this? What script do I use to resize the .jpg to fit whatever movieclip it's loading into and how to I tell it not to load an image that is already loaded in another movieclip?
I have images which I have been broken to resize them to suit my design. What happens is that every now and then when I re-enter my flash movie these images turn red and I have to do the whole image imputing and breaking apart process once more.......
URL...that has videos in the work section (click work, then the tv icon or the radio icon at the bottom of the page) that will randomly not load.THe weird thing is that the files have never moved, and yet, the same computer on the same ISP using the same browser that could view the videos 2 days prior, suddenly cannot.I'm also having an issue where the flash won't even load on startup randomly.This had happened one time in the past, and I took the page from a test area of the site and put it live, and it solved the problem. So my last ditch plan z is to make a mirror to link to in case the videos aren't loading for a user.
I have menu.swf which loads an external SWF (longmenu.swf)longmenu.swf has a long background on stage, which scrolls according to what the user clicks. It works fine on it's own with tweenLite. But what i need to do is to have menu.swf controls to which part of the background it scrolls or appears at once an item on menu.swf is clicked.
im trying to create a flash file that is randomly showing different objects/images, i believe i have the correct codes although i have encountered an error.
My site loads a .swf into a blank movie clip when the site loads.target.loadMovie("coachGameDay.swf");
When a viewer loads the site again, I want a different .swf to load. Or if I hit the refresh button on the browser, I want different .swf to load. Giving it the appearance of .swfs loading randomly.
i can now load my movies randomly.however new problemo. they load half way down the page, so i only see the left corner edge. This seems like a registration problem?
I want to make a navigation bar that loads image buttons randomly. Ex: (you can see the non-random version at the bottom of the page onI have 5 slots. I want to randomly load an external swf into an empty button in each of the slots. I do not want the same button to load in more than one slot. I'm thinking I need to use arrays? (which I don't know too much about.) Can anyone point me to a useful tutorial?
I am currently trying to load a movie clip in the main SWF. Got that done.Then call and replace the first movie clip with another, got that done too.This is for a menu i am making, I am not too great in action script. I am working in AS2.Problem is after I call the second external movie clip into the main SWF, it all stops working.Is there a way I set this up that no matter what it keeps loading and unloading the external movie clips? This is what I have so far.[code]This starts with the "king_menu.swf" already loaded, i have it unload it and load "dqueen_menu.swf" to the call point named "load_king".I am guessing I need to have a universal call point for all my external movies to load and work in a random chain.
I want to create an array of loaded xml for the following:
ActionScript Code: var xmlQuestions:XML = new XML(); System.useCodepage = true;
[Code].....
What I want to achieve is so I can load 5 different xmls and place them into an array. All 5 random xmls will be placed in an array then I wish to trace them
I have a FLA site built in AS2 that once you get to the home page it plays one song and only one song. If I want to set up so that when the user clicks back to the home page from anywhere else in the site it plays a different random song (there are 8 total).
So in other words when you initially land on the home page it will play Song 1 every time. But when you click back to the home page from anywhere else on the site, it randomly plays the 1 of the 8.
I have it so that Song 1 plays every time initially but I don't know how to set it up in AS2 to have it randomly play songs when you click back to the home page from deeper in the site.