ActionScript 2.0 :: Randomizing Movie File On Browser Reload?
Apr 18, 2002
I'm a newbie at programming and had performed serveral search on the net without much useful results. For all you programmer guru out there, please lend me a hand if you can.I am using flash version 5.0. I have 7 flash movie files within one working flash file and only 4 movie files gets display on an HTML page at a time. I need a script that will randomize the appearance of the movie files each time the browser gets refresh. But the script should only randomize 2 of the 4 movie files.
So for example, say I have movie files named 1 to 7. On browser load, I have movie file, 1,2,3 and 4 displayed. Now when a user refresh browser, I want movie file, 1 and 4 to be replaced by either movie file 5,6, or 7 (ie. random diplay of file).This might sounds confusing or I might not be explaining it well, but if you go to www.standpipe.com you will see what I mean. Look at the Case studies section, there are 4 movie files being displayed.
View 3 Replies
Similar Posts:
Jun 3, 2004
I am interested in designing a web-site with the primary purpose of displaying various poems and songs I've written over the years. The premise is simple: I need some actionscript which will detect the number and names of text files in a certain directory, and randomly pick one of them, then load it into a text field and format it with CSS. The user should simply have to reload their browser to get another randomly loaded poem. I've only taken one Flash class (very light on AS) and not at all knowledgeable on making 'universal AS' and usually hard-code everything. My apologies if something similar has been asked before..
View 14 Replies
Sep 16, 2010
When I deploy a new .swf file in an HTML file as shown below, I have to clear the browser cache before the new .swf file loads in the browser. Is there anyway to force the browser to load the .swf file when I replace it with a new one on the server.
<embed type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.adobe.com/go/getflashplayer" allowscriptaccess="sameDomain" name="Prototype" bgcolor="#869ca7" quality="high" id="Prototype" src="/flex/Prototype.swf">
View 3 Replies
Apr 12, 2009
i'm working on a project that uses php and xml to link my database information with flash. I've successfully allowed flash to read the xml contents. I need to randomise the data i retrieved from the database, so my xml content will change everytime i refresh the browser. However, i realised that the flash content didn't change like the xml content. The script to read the xml is written on the 1st frame of my 1st scene. Is there a way to read the xml again everytime i refresh the browser or re-enter the scene?
View 2 Replies
Jul 30, 2010
After searching the internet I found myself back here for the right answer. I've updated an swf for a client andin IE it won't reload without clearing the cache files. I know this is a common problem, but I couldn't quit figure out the best way to go about fixing it. I'd like to just add some actionscript to the swf if possible.
View 1 Replies
Aug 27, 2009
I have a flash in my page, In my flash there is a movieclip that has a click event..the time you click it, it will navigate you to the other page..
My question is.. Is there any function or anything that can reload the page, without reloading flash?
View 6 Replies
Mar 18, 2010
Just wondering if its possible to reload a swf into itself without hitting the browser refresh? Essentially, by clicking a button, I want to start the swf over, so all the variables are reset etc, without having to do this within the browser.
View 9 Replies
Mar 28, 2007
how could I get a Flash File to call a Javascript Function / Send a Variable back to a browser which Javascript could read?Basically working on something where as, currently at any moment during the web page is open Flash receives a variable.. Needs to process that, then call a Javascript Function in the page or if this can't be done, sends a variable back to the page which javascript will listen for every 500ms or something like this...
View 7 Replies
Oct 18, 2010
I have a file with several movie clips and I want every time swf loads the different movie clips plays.
View 2 Replies
Apr 15, 2009
I have been trying to figure out the best way to load content into a container on an .php page which has three different .swfs already loaded - one is an mp3 player which I do not want to stop playing (this will obviously happen on a page refresh). The objective is to keep a flash menu for navigation given it's nice animation capabilities, but load page content into a container underneath. There are JavaScript files out there that work in conjunction with php (ajax) to accomplish this, but once I throw flash into the mix everything goes sideways. I know you can include js with the ExternalInterface.call function, but this only solves the js portion not the php bit.
View 1 Replies
Mar 12, 2012
know if it is possible to randomize data that is imported from a .CSV file so that it displays as dynamic text in Flash?Or if there might be a thread I could be pointed to? I'm creating a Flash program that can display "flash cards" with terms and their definitionsThe terms and definitions are in their own columns of the .CSV file.Currently, I can display in the dynamic text the data from each column (term and definition), however if I call them particularly. I was wondering if there was a way for me to do this randomly?
View 2 Replies
Sep 2, 2009
I am desperately trying to make the movies in the attached file resize with the web browser but anchored to the white line on the left. The coloured buttons should not resize but move left or right to align with the edges of the pictures.
View 3 Replies
Jan 10, 2011
I have a problem with action script.How can I reload/update xml file per 5 minutes in actionscript?isn't there someway i can do to complete the script?[code]...
View 2 Replies
Oct 27, 2009
I'm trying to show a loop of SWF/JPG files in an existing SWF file. A timer decides when to load the new file and the external files are showing and scaling correctly during the first loop, but when the loop has run once I get really odd values on the external files with the Loader.height and Loader.width properties. The files have the following height values during the first loop: 278, 286, 278 and 787. During the second loop they all of a sudden have the following values, and of course don't scale correctly: 101.05, 786.8, 101.05, 2165.15.[code]...
View 0 Replies
Jul 10, 2008
Tell me how to reload the movie itself, same like we embed a swf file on a web page, click browser's reload button so the flash movie reset to its original state?
But I want to do this from within the movie, when user click "reset" button, all the previous created instances will be released from memory. I can delete each object manually, but lots of work involved, also not sure if the resources are really free.
View 8 Replies
Mar 20, 2009
I have a slide show swf file in AS3 that gets the paths froman XMlL file. The problem is that I change the XML file every dayand unless a viewer empties their cache, they get the old slides.There is a technique where you add ?mathRandom() code at theend of the XML path inside the .swf file, but from all I have readand believe, this only adds to ones cache and could irresponsiblyfill a viewers cache.Does anyone know a way to use actionscript 3 inside the .swffile to force a reload of the XML file if the browser has beenopened for the first time?
View 1 Replies
Apr 5, 2008
i have an xml file that is regenerated every 10 mins. I am trying to use the setinterval to reload my xml file in flash but cant get it to work?? Is what im trying do do possible? or is there a better way of doing it?
[Code]...
View 1 Replies
Sep 7, 2010
1,How reload Movie Clip...?
2,when we remove a Movie Clip,children and all instance object are also removed from stage but it still use memory of server.
View 1 Replies
Dec 22, 2010
I would like to ask a newbie help, How could I reset a movie when it already ended. I am aware it needs to know when the movie finish ,and if it finishes then load the movie again. I know this is very simple but I need help on this .
The code that I use to attach movie is this:
var my_loader:Loader = new Loader();
my_loader.load(new URLRequest("tellyin intro2.swf"));
addChild(my_loader);
View 1 Replies
Jun 13, 2009
I'm trying to create a method of saving data to disk in Flash.
Uploading the data to a PHP server works... well enough I guess. The issue is that when I go to reload the data, the file has been cached, and so I can't load the saved changes.
Is there a way to force flash to reload a file? Or clear it's current cached version?
View 3 Replies
Jul 8, 2009
This seem like a silly question but as far as I've found: It's impossible to reload an xml file from a remote location while the SWF is running.
For example, I have a kiosk project that will run 24/7 (with a restart each night). I have an "calendar events" loading off an XML file that I want to keep on a webserver so I can update the kiosk by editing the XML file. However, the SWF caches the first XML file and keeps reusing it. I'm testing this by triggering a function that reloads the XML file with a button click.
I found trick that concats a unique ID to the file name which prevents using the old file but that means I'll have an ever growing list of XML files in the Temporary Internet Files folder.
View 7 Replies
Nov 14, 2009
I am trying to create something in which even when the flash file is already loaded and never closed, it will update itself. All the variables that are changing are pulled from a text file and loaded using
myData = new LoadVars();
myData.onLoad = function(){
and then I set all of the variables of the text equal to dynamic text fields. My question is: Is it possible to have it reload this text file (reset the text fields to the new variable) every so often?
View 3 Replies
Jun 29, 2009
I have an aspx page with a flash movie (gallery) that calls another aspx page which gets the info form a database and returns XML that the movie uses to populate the gallery with. Currently I have it use a query string that is passed through the flashvars so it will get the right info on post back. Is there a way I can reload the movie and pass the variable into flash without a postback? For instance the page doesn't reload, just the flash with the correct set of images.This is the JS used for the movie:
Code:
Select all<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
[code]....
View 1 Replies
Jul 12, 2006
Does this command exist? I can't seem to find it. I want to basically reload a movie clip on command, and I'm debating taking that part and putting it into an external .SWF file and unloading and reloading it, but that seems silly..
View 5 Replies
Jun 10, 2009
I've been making a game and want it so you can play again - when I try and send it back to frame 1 (it's preloader) it doesn't really work. I was wondering if there was a way of basically refreshing or reloading the whole swf file?
View 3 Replies
May 2, 2004
what would i have to do to prevent "submenu.swf" to reload when it's already loaded. this is the as i use:
on (rollOver) {
if(this.content == Number(this.content)){
loadMovieNum("submenu.swf",this.content);
} else {
this.content.loadMovie("submenu.swf");
}
}
View 6 Replies
Feb 27, 2009
I'm working on my website and I have one main swf file with the loader, and other four swf. files with home, about, contact and work.This is the code for the main one
Code:
var holdercontent:MovieClip = new MovieClip();
holdercontent.x = 0
[code]........
View 2 Replies
Mar 22, 2010
I believe this can be done using share objects but, have search and search and i cant find a concrete or simple answer to follow.
I have use this and does not look good when viewing image on laptop (768 as height)
What i am looking to do is create 5 pages with the same flash header. Links will be below the movie. When people click on the links a new page opens (same window) without reloading the flash file.
I think i need a code to put in my first frame to store a cookie but cant find the code.
View 1 Replies
Sep 26, 2009
Im trying to make it so that when the swf is refreshed/reloaded, it resumes on the frame that it left off on, not restart.
View 7 Replies
Feb 18, 2009
I am trying to get a random swf to appear on a page (5 movies possible).How can I code this in AS3?
View 7 Replies