Displaying Flash Movies Randomly
Hi All,
I have a question regarding flash.
I want to develop my project with the flash.
My project scenario is, I have a total no of 60 (.swf) flash movies and are about to take 4 to 5 minutes each, my aim is to display 20 .swf files randomly at a time on the screen.
i.e., if we click on a button for the first time, it should display a 20 flash movies on the screen and when we click for the second time it should display other set of 20 flash movies it may or may not repeat the previous ones. It means every person should be displayed with a different set of flash movies, no two persons can get the same set of movies. The movies should be randomly selected.
Could you please direct me to meet my scenario.
Thank you for your precious time.
Adobe > Flash General Discussion
Posted on: 11/13/2007 10:59:06 AM
View Complete Forum Thread with Replies
Sponsored Links:
Displaying Flash Movies Randomly
Hi All,
I have a question regarding flash.
I want to develop my project with the flash.
My project scenario is, I have a total no of 60 (.swf) flash movies and are about to take 4 to 5 minutes each, my aim is to display 20 .swf files randomly at a time on the screen.
i.e., if we click on a button for the first time, it should display a 20 flash movies on the screen and when we click for the second time it should display other set of 20 flash movies it may or may not repeat the previous ones. It means every person should be displayed with a different set of flash movies, no two persons can get the same set of movies. The movies should be randomly selected.
Could you please direct me to meet my scenario.
Thank you for your precious time.
View Replies !
View Related
Displaying A Set Of Flash Movies Randomly
Hi All,
I have a question regarding flash.
I want to develop my project with the flash.
My project scenario is, I have total no of 60 (.swf) flash movies and are about to take 4 to 5 minutes each, my aim is to display 20 .swf files randomly at a time on the screen.
i.e., if we click on a button for the first time, it should display a 20 flash movies on the screen and when we click for the second time it should display other set of 20 flash movies it may or may not repeat the previous ones. It means every person should be displayed with a different set of flash movies, no two persons can get the same set of movies. The movies should be randomly selected.
Could you please direct me to meet my scenario.
Thank you for your precious time.
View Replies !
View Related
[F8] Displaying Movie Clips Randomly In Flash
Hi,
I have a question regarding flash.
My project scenario is, I have total no of 60 movie clips (Quick time) and are about to take 4 to 5 minutes each, my aim is to display 20 movie clips randomly at a time on the screen.
i.e., if we click on a button for the first time, it should display a 20 movie clips on the screen and when we click for the second time it should display other set of 20 clips, it may or may not repeat the previous ones. It means for every person it should be displayed with a different set of movie clips, no two persons can get the same set of movies. The movies should be randomly selected.
Could you please tell me what i need to do. and i was new to the action scripting. can you please write the script for this.
Thank you for your precious time.
View Replies !
View Related
Randomly Play Movies Within Flash Movie
I have one large photograph and want to have other smaller photographs playing randomly over top in different positions as movie clips/slide show. I've made three different movies within main movie of these smaller photos. Is there a script that says something to the effect "alright play movies one, pause 5 seconds. play movie 2..." and they pplay whereever I dragged them to on screen?
View Replies !
View Related
Randomly Load Different Movies INSIDE A Movie? Flash 4 Or 5
Is it possible to randomly load/display movies inside a .swf? For example, I'll use a simple java ticker effect with say 10 sentences.
Can you randomly have let's say #3 scroll, then fade out (as an independent movie), then when it's done, have another random sentence, let's say #7 scroll, then fade out. And it just keeps randomly looping through those 10 sentences?
I've looked around for a tutorial, but can't find anything.
View Replies !
View Related
Displaying Webpages In Flash Movies
Hey guys, this is my first time posting in the forums.
I'm trying to make a comic site, complete with calendar archive and blog, but last I heard this is pretty hard to do in flash, and I'm not that good to pull it off. I could probably use Iframes, but I don't want to. So I've got an idea. Here's what I plan to do. Visualize a flash movie, something like this:
Code:
______________
| __=__=__=_| <=navigation
| | | buttons
|__| |
"shout=>| | | <=content
box" |__| | area
--------------
See that, the content area is in the flash movie. So is the "shoutbox". What I want to do is make it so that when you click on one of the navigation buttons, an external webpage is displayed inside the movie, and when you click on a hyperlink inside said webpage, it also loads in the content area. Kinda like an Iframe knock off. I've seen this done before, and there's even flash based browsers out there. Now what I'm also trying to do is get the shout box to refresh all on its lonesome, without refreshing the rest of the flash site "shell". I dont think many people have done this, since google has given me nothing. Any help will be appreciated.
View Replies !
View Related
Can Movies Be Randomly Loaded?
I have a client who wants 5 HTML-formatted + linked text chunks to load randomly each time the page is loaded. I know it's possible to load text strings randomly from an external text file, but that seems to preclude the HTML formatting. Is it possible to randomly load movies on a page load?
View Replies !
View Related
Randomly Load Movies
i have a simple card game where the user chooses a card and i have created 4 movies where in one of the movies the cards are wrong. how can i randomly cycle through these movies so the user chooses once and the next time round it could be the right answer or wrong answer for that matter?
~confused~
View Replies !
View Related
How To Randomly Play Movies
hi!
I have 8 movie clips on the main timeline (all clips just have some text that fades in and out). Is there a way of playing these clips in a random order? ie: clip1 plays, then clip5, then clip8, then clip3 and so on...
if anyone can help that would be grand!
thanx in advance
:O)
View Replies !
View Related
Randomly Play Movies...
Hey,
This is for flash5 by the way...safe.
Ritey-HO...Basically...
Iv got (for example) 4 movie clips...
I wnt these movies clips to play on the main stage in a random order, wiv random lengths of time between them...
So maybe...Movie_1 plays...pause for a second...Movie_4 plays...pause for 0.32 seconds....etc, etc, etc...
Please sum1 tell me how...
So I need summit to randomly select from a predefined selection of movieclips...Not jst randomly play ne movie clip that mite be in the .fla...Thanxs y'all...
Bye,
Mike :|
View Replies !
View Related
Help How To Randomly Load Movies...
Hi all,
I am developing a Flash site with a specific area designated to load a different little movie each time the user goes to a new section on the site... i understand completely how to load a specific movie with each click, but does anyone know a simple script i can add that will randomly choose from a dozen or so movies, so that each experience is different?
I remember coding in HTML that does this... any help for Flash MX?
much thanks,
jason
View Replies !
View Related
Randomly Loading Movies?
Hi, I suck at AS, and I cant figure this out, using the loadMovie command, I want to dynamicly load a random movieclip to my website everytime it is accessed, so theres always something new to look at in the header, anyways, can someone please post the correct syntax for this operation? Thanks for the help
View Replies !
View Related
Randomly Select And Display Movies?
Hi again
I need help with something I need to do guys
Here's what I want...
I want to make a flash movie that includes more movies in it and will start out normally (with a specific starting movie) when the page first loads. Then when the starting animation/movie finishes and stops and just keeps displaying the final image of the animation... I want it to randomly select one of the movies and play it every few seconds. Once it finishes playing each movie, I want it to reverse-play it and get back to the last image of the starting movie. Then after a couple of seconds I want it to again randomly select another movie and play it and the same thing to happen with every movie
Now, I know how to make a movie that includes other movies in it and to play them... but I've no idea how to do the random select and play thing and also how to reverse-play afterwards and the rest.
So could somebody explain please?
Thanks
View Replies !
View Related
Randomly Placing Attached Movies..
Here's what I have:
ActionScript Code:
var place:Number = random(200);
for (i=0; i<4; i++) {
_root.attachMovie("ae_mc2", "ae" + i, i);
//set the location
for(x=0; x<4; x++) {
_root["ae"+i]._x = i*place+x;
_root["ae"+i]._y = 380;
trace(_root["ae"+i]._x);
}
I don't want the attached movies to be placed evenly. I want the four clips to be placed along an x axis of which the limit is 530, at random positions as well as not overlap each other. I will eventually put this into a function so that new movies can be attached at certain points so I d
I've been through numerous attempts but I can't seem to get the code that utilizes a random number through each loop interation instead of the same random number for all?
In other words, how can I force a random number throughout each loop cycle?
Probably just numbed out..thanks
View Replies !
View Related
Loading Into Different Movies Randomly. Is It Possibly
I have some movie clips and i'd like to add some variables to them.
Is it any at all possible to load variables into movie clips in random order. That is: each time they load, they load into the movie clips a different order.
Does this make even remote sense to anyone? Has anyone heard of a problem like this before?
HELP
View Replies !
View Related
Loading Into Different Movies Randomly. Is It Possibly
I have some movie clips and i'd like to add some variables to them.
Is it any at all possible to load variables into movie clips in random order. That is: each time they load, they load into the movie clips a different order.
Does this make even remote sense to anyone? Has anyone heard of a problem like this before?
HELP
View Replies !
View Related
Randomly Place Movies On Stage - Mx 2004
ok. i have been trying for 2 days to get this one thing right on this project i am working on.
i need to randomly place 8 movie clips on the stage, in fixed positions. they need to remain in place while the frame is loaded. but when the frame is reloaded, they need to be randomly placed again.
maybe someone could help me out with this. it is driving me bloody nuts. thanks a lot.
scriptjet
View Replies !
View Related
Randomly Loaded Movies That Positions Other Clips In An Ordered Sequence.
Hi,
I've got a BIG problem that i'm getting nowhere with.
I've got an array with references to 7 swf files.
3 of the 7 swfs get selected and loaded into the flash movie individually through button actions.
I have 7 movieclips on the left side with the _alphas set to 0%, each clip represents information on the loaded swf.
I added code into the swfs to load a movieclip onto the left side of the main movie.
But becuase the swfs are loding in randomly, what i get is big spaces between the loaded clips.
My problem is : how do I load the clips in an ordered sequence, even though the swfs are loding in a random way.
I know I'll need to do it another, in a more intelligent way than simply changing _alpha.
Any help / tips would be great
Lel
View Replies !
View Related
Displaying Movies
Hello Guys and gals
Iwas wondering if anyone had any ideas if there was a wayin which i can have my flash site always display in 1024 x 768 resolution? I am not sure if this is possible,any ideas would be greatly appreciated.
Also I have a preloader which seems to work fine on high speed cable internet....however I am doing the website for a friend who is on dialup --he sz that the site takes over 5 minutes to load before it will play! Does this sound like a reasonable time to wait for phone line when viewing a Flash site with a fairly simple intro? The flash site main movie consists of about 155 frams total with various MC through out the main movie timeline. The site also has a couple mpeg files for sound. It is for a band and I am going to add about 5 other mpegs for music samples.
My preloader currently uses the following preloader code:
loadedBytes =_root.getBytesLoaded();
totalBytes =_root.getBytesTotal();
if (loadedBytes < totalBytes){
percentageOutput= int((loadedBytes / totalBytes) * 100);
_root.loaderbar._xscale = percentageOutput;
gotoAndPlay("preload_loop");
}
else {
gotoAndPlay("begin_movie");
}
Please tell me if there is a way I can speed things up..or if things seem to be in order for best results??
Thanks guys..
View Replies !
View Related
I Need The Code For Displaying Movies
hi,
my question is to diplay random files , and i have given the code as
mcMain.btn1.onRelease = function() { //btn1
myContent.load("assets/fvg/FlashVideoGallery.xml");
var movieArray:Array = new Array("holes.swf","slideShowFinal.swf","publish 1.swf",
"publish.swf","animated_gradient 1.swf","mutplShpTwn.swf",
"fadeUpNDownFinal 1.swf","invisibleFinal 1.swf","fish.swf",
"mtnTwnTxtFinal.swf","instances_done 1.swf","seaweed 1.swf",
"fadeUpNDownFinal.swf","mutplShpTwn 1.swf","snooze.swf",
"snoozeFinal 1.swf","mtnTwnTxt2.swf","snoozeFinal.swf",
"soundOnOffFinal.swf","inputText.swf","menuFinal.s wf",
"slideShow 1.swf","instances.swf","p4.swf","preloader 1.swf"
"staticText.swf","siteComplete.swf","p2.swf","p3.s wf",
"slideShow.swf","slideShowFinal 1.swf","preloader.swf",
"stopAndPlay 1.swf","stopAndPlay.swf","loadMovie.swf"
"nav-bar1.swf","motion_tween.swf","inputText 1.swf",
"projector.swf","dynamicText.swf","projector 1.swf",
"instances_done.swf","getURL.swf","boom.swf",
"sequenceFinal 1.swf","mtnTwnTxt21.swf",
"invisibleFinal.swf","animated_gradient.swf",
"castle 1.swf","bkgdSound.swf","seaweed.swf","untitled.swf ",
"v1.swf","motionGuides.swf","sequenceFinal.swf ",
"siteComplete 1.swf","castle.swf","loadMovie 1.swf",
"gotoScene.swf","fish 1.swf");//these are the 60 flash movies
var movieTotal:Number = movieArray.length;
var randomMovieTotal:Number = 20;
var randomNum:Number;
for (var i:Number = 0; i < randomMovieTotal; i++) {
randomNum = random(movieTotal);
_root["movieHolder"+i].loadMovie(movieArray[randomNum]);
}
but its not working for me.
and one more question is "where i need to store all these movie files. either in samefolder where the flash file is placed. or make it as a seperate folder and or in the flash file library".
and one more thing is "how can i place these 20 files in a order like declaring the dimensions on the screen.
do i need to put in a CSS.if yes how can i do this."
i was new to the flash
please can any one help me out.
Thank You.
View Replies !
View Related
Best Way Of Displaying Multiple Movies
Hi,
I am having a bit of trouble getting my head round the best way to display and control multiple separate movies. Do I use flash for everything or htmil for some of it.
Let me explain, basically I have 5 different movies each with their own preloader. I can easily put these onto their own separate html pages (index1, index2, etc.) and call each page (and hence each movie) using simple html popup menu in dreamweaver. Works great, each movie and corresponding preloader runs fine.
On to the bit that is doing my head in. I would like to do away with the htmil popup menu to call each page/movie and replace it with a separate flash movie containing buttons to do the same trick. This additional movie would be displayed on screen regardless of which of the other 5 movies are displayed. I would also like this movie to have its own preloader.
What is the best way of going about this. Will I have to use 2 frames in dreamweaver - 1 for the changing movies 1-5 and a second for the control movie along the bottom? If so I presume their is a target frame option in flash that I can add to the buttons?
Or is there a simpler, more elegant, all-flash solution to this?
Any help much appreciated.
Antonio
View Replies !
View Related
Flash 8 Dynamic Map Displaying XML Data, Problem With Displaying Text
Hello everybody...
I'm working on a project in which viewers can see a map with state parks highlighted as buttons. onRollOver a caption pops up displaying the name of the park, acreage and feet of shoreline. onRelease a movie clip is loaded into a holder. The data is being stored in an XML file integrated with a content management system... The AS for displaying the caption works fine, but I cannot get the XML data to display in the dynamic text fields contained within the caption MC. There are 37 buttons that need to display the popup and I am looking for some advice on how I can effectively navigate the XML nodes and display the data accordingly in the text fields. Below is my current code, I have not yet added the onRelease function because, I'm pretty sure that i'm going to run into the same issue that i'm having with the caption popup... The last obstacle will be that the caption is only displaying 3 of the child nodes, while the MC loaded into the holder will be displaying 7 of the child nodes. I'm guessing that using the attributes property and modifying my XML would be the easiest... but i'm relatively new to integrating XML data into Flash and am trying to minimize the work that I create for myself. If anybody could point me in the right direction, i would be immensly appreciative. Pura Vida. ~Anthony
//1st frame AS for the first button, and loading XML
var xmlPath = ("xml_mapinfo.xml");
/////////////////////////////////////
var locID:Number = 0;
/////////////////////////////////////
startDrag(this.caption, true);
/////////////////////////////////////
btn_1.onRollOver = function (){
set ("locID", 1);
RollOver();
ShowData();
}
btn_1.onRollOut = function (){
RollOut();
}
/////////////////////////////////////
function RollOver (){
trace("rollOver occured");
_root.x = 1;
this.caption.words = "Word!";
trace ("Location ID = " + locID);
}
function RollOut (){
trace("rollOut occured");
set ("locID", 0);
_root.x = 0;
this.caption.words= " ";
trace ("Location ID = " + locID);
}
/////////////////////////////////////
function ShowData(){
this.caption.location_txt.text=contentMain.owner['1'];
this.caption.acreage_txt.text=contentMain.acreage['1'];
this.caption.acreage_txt.text=contentMain.shorelin e['1'];
}
/////////////////////////////////////
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
owner = [];
interest = [];
town = [];
established = [];
acreage = [];
shoreline = [];
thumbnail = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
owner[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
interest[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
town[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
established[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;
acreage[i] = xmlNode.childNodes[i].childNodes[4].firstChild.nodeValue;
shoreline[i] = xmlNode.childNodes[i].childNodes[5].firstChild.nodeValue;
thumbnail[i] = xmlNode.childNodes[i].childNodes[6].firstChild.nodeValue;
}
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(this.xmlPath);
//AS on actual caption MC
//////////////////////////////
onClipEvent (enterFrame) {
if (_root.x==1) {
this._alpha = 80;
} else {
this._alpha = 0;
}
}
_
View Replies !
View Related
Flash Displaying Of Html Not Displaying Spans Right
I have a swf that calls a php script. The script outputs html and then the html is displayed in a dynamic text box. The textbox is set to display html.
My problem is this. The
HTML Code:
<b>Concealed Weapon Law </b>
will print bold on the dynamic text field, but
HTML Code:
<span style="font-weight: bold;">Badges</span>
will not display bold on the dynamic text field.
I have an admin section built that allows a user to use a wysiwyg editor (js) to create the text and it does the span style way.....
I have no way of changing that or I would.
Is there a way in flash to recognize that span style info to print out bold?
View Replies !
View Related
MCs Appear Randomly From The Library And Move Around Randomly
Hi
Onmy stage I have a MC, and when I click it a random MC from the Library should appear and move around randomly.
I'm using this to make it move around randomly http://www.kirupa.com/developer/acti...dom_motion.htm
But I can't figure out how to make the random MCs appear from the library.
And should I put the random moving script on each of my ten MC?
Hope somone can help.
Best regards
Jost
View Replies !
View Related
Controlling Flash Movies From Within Other Flash Movies, Contained With Frames...
ok, the title was a bit of a mouthful but hey, i was wondering if anyone could shed some light on this problem :
i know how to control content being loaded into frames, from within a flash movie (using get url) but, i'm not sure how to go about calling various parts of a flash movie that is situated within a different frame with the html page, from the one it's being called from.
so, for example, say i have a set of buttons within one flash movie, that when clicked moves the timeline in the other flash movie (within a different frame) to frame 5 or whatever. see what i mean?
would it be something like this?
on (release) {
getURL("name of html page.html", "name of lable/ number of frame within timeline", "name of frame flash movie is contained within");
}
View Replies !
View Related
Flash Exe Randomly Crashes
I have a flash application that is published as an .exe file that is running on a dedicated windows xp machine 24/7. The problem is that it is crashing randomly (most of the time days between crashing). It seems to be when the application is idle as well and I don't get any sort of errors when it crashes, it just goes back to the windows desktop. Does anyone have any ideas how I can debug this? It doesn't seem like flash applications keep log files or am I wrong.
View Replies !
View Related
Playing A Flash Movie Randomly
To whom it may concern:
This is what I need to do:
Each time you click on a external link in a flash movie the linked window will open in a separate window and a flash pop-up window will load in yet another window.
For instance every 1000 click to the external link a pop up window will appear but only once a month. So I guess I would need to be able to reset the code.
Also, along with have the pop-up occur on the 1000 click, in addition I need to be able to assign another click amount (example 450 clicks) which changes every month.
Also, what is some good link tracking software? Does statcounter.com do this?
Please help. Thank you.
-Mark Roffer
View Replies !
View Related
Flash Randomly Stopped Working
I have been using Flash MX 2004 for a while now, and it randomly stopped workin on my login account, I am currently a poweruser, and it wont load up, but when the admin logs on it works fine, I now need the Admin password eveytiem I need to use flash.
What setting can be changed that will allow me to use flash, without having to sign in as admin all the time???
Thanks in advance
Damo
View Replies !
View Related
Playing A Flash Movie Randomly
To whom it may concern:
This is what I need to do:
Each time you click on a external link in a flash movie the linked window will open in a separate window and a flash pop-up window will load in yet another window.
For instance every 1000 click to the external link a pop up window will appear but only once a month. So I guess I would need to be able to reset the code.
Also, along with have the pop-up occur on the 1000 click, in addition I need to be able to assign another click amount (example 450 clicks) which changes every month.
Also, what is some good link tracking software? Does statcounter.com do this?
Please help. Thank you.
-Mark Roffer
View Replies !
View Related
Flash Movie Randomly Restarting
This flash movie i have finsihed now keep jumping back to the first frame randomly and for no reason that I can see.
the movie thats bin loaded is a container, frame one has the lil intro in and that then uses a _root.gotoAndPlay when it reaches its end to make the container move to the next frame which there contains the main site bit.
View Replies !
View Related
Get Images Randomly In Flash Through A XML File
Hello All,
I want to get some images randomly through a XML file for this type of work i have a folder called "images" in which i store some images and i create a xml file and the code is :
<gallery>
<image main="images/pic2_1.jpg" />
<image main="images/pic2_2.jpg" />
<image main="images/pic2_3.jpg" />
<image main="images/pic2_4.jpg" />
<image main="images/pic2_5.jpg" />
<image main="images/pic2_6.jpg" />
<image main="images/pic2_7.jpg" />
<image main="images/pic2_8.jpg" />
<image main="images/pic2_9.jpg" />
<image main="images/pic2_10.jpg" />
</gallery>
I want to get these images in my flash file randomly from my "images" folder
so that the client can add and remove photos as they require only by change the name of images in XML file .
Now i want the action script code for this type of work.
Is this possible? Any help on this issue would be greatly appreciated.
View Replies !
View Related
Flash Randomly Stopped Working
I have been using Flash MX 2004 for a while now, and it randomly stopped workin on my login account, I am currently a poweruser, and it wont load up, but when the admin logs on it works fine, I now need the Admin password eveytiem I need to use flash.
What setting can be changed that will allow me to use flash, without having to sign in as admin all the time???
Thanks in advance
Damo
View Replies !
View Related
Playing A Flash Movie Randomly
To whom it may concern:
This is what I need to do:
Each time you click on a external link in a flash movie the linked window will open in a separate window and a flash pop-up window will load in yet another window.
For instance every 1000 click to the external link a pop up window will appear but only once a month. So I guess I would need to be able to reset the code.
Also, along with have the pop-up occur on the 1000 click, in addition I need to be able to assign another click amount (example 450 clicks) which changes every month.
Also, what is some good link tracking software? Does statcounter.com do this?
Please help. Thank you.
-Mark Roffer
View Replies !
View Related
Loading Randomly Generated Files Into Flash
Hello all -
I've created a folder of video and/or images. i have saved all of these files as individual .swf (flash) files. On the splash page of my website, I've embedded a different .swf file called splash.swf. I would like splash.swf to string together a series of randomly selected video/image files from the aforementioned folder. I have no idea how to do this. I was thinking that the easiest way would be to set up splash.swf as a series of single keyframes, with each keyframe scripted to load a random file from the database, thus creating a sort of randomly generated narrative of video/images. In theory, this sounds like something possible, but in terms of the actual scripting involved, I really don't know how to go about doing it. I'm also thinking that it might be easier if I creatd some sort of database using ColdFusion. All of this is pretty nebulous at this point, though. If anybody could help me, I would be much obliged. Thank you for your time.
Cheers
John
View Replies !
View Related
Flash Video Playhead Randomly Disappears
Hi there guys,
I have adjusted my buffer time for a few flash videos in the "parameters" of each video to 2 seconds. Which is fine, but I now have an issue where I sometimes loose my video playhead, meaning I cant scrub. Only sometimes though. But eird thing is, it will always appear once the video has played through once.
It seems tempramental, sometime it appears, sometimes it doesnt.
Any ideas? Is there a simple script I can add to set the Buffer Time rather than in the "parameters" itself???
View Replies !
View Related
Flash Question - Cool Lil Tile Map And An Mc Moving Thru It Randomly
g=this
g.s=4
function draw(m, c){
with(m){
lineStyle(1, c, 0); beginFill(c, 40); moveTo(0, 0)
lineTo(g.s, 0); lineTo(g.s, g.s); lineTo(0, g.s); lineTo(0, 0); endFill()
}
}
function tile(x, y, t){
c=(t==0) ? '0x000000':'0x999999'
r=(t==0) ? 0: 1
d=createEmptyMovieClip(x+'t'+y, g.k)
d.r=r
with(d){ _x=x*g.s; _y=y*g.s }
draw(d, c)
g.k++
}
g.lib=new Array()
g.map=new Array()
g.lib[0]=[[0, 1, 0],
[1, 1, 1],
[0, 1, 0]]
g.lib[1]=[[0, 0, 0],
[0, 1, 1],
[0, 1, 0]]
g.lib[2]=[[0, 0, 0],
[1, 1, 0],
[0, 1, 0]]
g.lib[3]=[[0, 1, 0],
[0, 1, 1],
[0, 0, 0]]
lib[4]=[[0, 1, 0],
[1, 1, 0],
[0, 0, 0]]
g.lib[5]=[[0, 0, 0],
[1, 1, 1],
[0, 0, 0]]
g.lib[6]=[[0, 1, 0],
[0, 1, 0],
[0, 1, 0]]
g.lib[7]=[[0, 1, 0],
[1, 1, 1],
[0, 0, 0]]
g.lib[8]=[[0, 0, 0],
[1, 1, 1],
[0, 1, 0]]
g.lib[9]=[[0, 1, 0],
[0, 1, 1],
[0, 1, 0]]
g.lib[10]=[[0, 1, 0],
[1, 1, 0],
[0, 1, 0]]
g.map[0]=[[1, 5, 5, 5, 5, 8, 5, 5, 5, 2],
[6, 1, 5, 5, 5, 7, 5, 5, 2, 6],
[9, 10, 1, 5, 5, 5, 5, 5, 7, 10],
[6, 6, 3, 5, 5, 5, 5, 2, 1, 10],
[3, 7, 5, 5, 5, 5, 2, 6, 6, 6],
[1, 5, 5, 5, 8, 5, 4, 3, 4, 6],
[9, 5, 5, 5, 0, 5, 5, 5, 5, 10],
[3, 2, 1, 5, 4, 5, 5, 5, 5, 10],
[1, 5, 5, 5, 5, 5, 5, 5, 5, 10],
[3, 5, 5, 5, 5, 5, 5, 5, 5, 4]]
g.map[1]=[[1, 8, 8, 8, 8, 8, 8, 8, 8, 2],
[9, 0, 0, 0, 0, 0, 0, 0, 0, 10],
[9, 0, 0, 0, 0, 0, 0, 0, 0, 10],
[9, 0, 0, 0, 0, 0, 0, 0, 0, 10],
[9, 0, 0, 0, 0, 0, 0, 0, 0, 10],
[9, 0, 0, 0, 0, 0, 0, 0, 0, 10],
[9, 0, 0, 0, 0, 0, 0, 0, 0, 10],
[9, 0, 0, 0, 0, 0, 0, 0, 0, 10],
[9, 0, 0, 0, 0, 0, 0, 0, 0, 10],
[3, 7, 7, 7, 7, 7, 7, 7, 7, 4]]
function create(w){
g.m=w
for(i=0; i<g.map[w].length; i++){
for(j=0; j<g.map[w][i].length; j++){
for(y=0; y<g.lib[g.map[w][i][j]].length; y++){
for(x=0; x<g.lib[g.map[w][i][j]][y].length; x++){
tile(x+j*3, y+i*3, g.lib[g.map[w][i][j]][y][x])
}
}
}
}
}
create(1)
function checker(m){
g.p=new Array()
if(_root[m.x+1+'t'+m.y].r==1){ g.p.push([m.x+1, m.y]) }
if(_root[m.x-1+'t'+m.y].r==1){ g.p.push([m.x-1, m.y]) }
if(_root[m.x+'t'+m.y-1].r==1){ g.p.push([m.x, m.y-1]) }
if(_root[m.x+'t'+m.y+1].r==1){ g.p.push([m.x, m.y+1]) }
choose=random(g.p.length)
m.x=g.p[choose][0]
m.y=g.p[choose][1]
}
function organ(){
c=createEmptyMovieClip('organ', g.k)
c.x=1; c.y=1
c.onEnterFrame=function(){
this._x=this.x*g.s
this._y=this.y*g.s
checker(this)
}
draw(c, 0xcc3300)
g.k++
}
organ()
ok, there r types of tile pieces like corner pieces which r explained in the lib thing (the movinf thing can go on 1s and not 0s) so then i make a map of these pieces and its parsed. whenever a 1 or 0 is added, it has the name x+t+y, its x, a t to seperate it and its y. also, its given a variable r to tell what kind it is to something later. ok
now the moving thing. it checks the x and y of the tiles around it in the cardinal directions, and if they r 1's its inputed into an array. it chooses a random index in the array, takes that x and y and goes there. c/p the code into u re flash. it works for like seconds then immediately goes intot he upper rite corner, 0, 0. whats wrong?
View Replies !
View Related
FLASH 8: Ensure No Repeats W/ Randomly Loading SWFs
I'm loading in random SWF files into a header file with the following code:
ActionScript Code:
loadMovie("headers/coldfx.swf","swf_mc");var movieArray:Array = ["headers/coast.swf", "headers/coldfx.swf", "headers/enervest.swf", "headers/fairplay.swf", "headers/interpipe.swf", "headers/mantra.swf", "headers/westin.swf"];function loadSwf() { swf_mc.loadMovie(movieArray[Math.floor(Math.random()*(movieArray.length-0))]);}function startMyInterval() { myInterval = setInterval(loadSwf, 30000);}startMyInterval();
I would love to be able to ensure that the same SWF is not loaded twice in a row.
Also I would like to be able to trace the loaded SWF. Is it possible to load the name of the currently loaded SWF into a variable or something?
Thanks!
View Replies !
View Related
Opening Flash Movies From Flash Movies In New Window
i am pretty new to flash......i know very little about actionscripting......here is my dilema.....i have a flash site that will contain 5 flash movies that i want people to open to see my work......i want them to open in the center of the screen in their own window with no controls except to close window.......they are various sizes....and i want then to open in window that fits movie size......so far all i can figure out is how to make them open in a new html page.......sorry if i rambled here but wanted to be as discriptive as possible......any help would be appreciated as i have a sick family member who would like to see my work before they pass away.......
View Replies !
View Related
[Flash 8]How Can I Control A MovieClip Move Randomly In The Stage Every Five Seconds?
Hi all,
I am having trouble on my Flash assignment which due on Monday, for the assignment, I am goingt to make a game, similar to the classic aracade game, Asteroids. They provided some basic code for the timing and rotation of asteroids, the behavior of the asteroids is appear randomly (but not moving) in the stage every five seconds with rotation, that's already been done by the code provided.
Now I need to modify the behavior of the asteroids so that when they appear, they:
spin in a random direction at random speed and size
move in random direction at random speed.
I feel really helpless, because programming is my weakness...
I hope someone can help me to solve this problems...
Thank you very much~~
View Replies !
View Related
Creating Game In Flash MX 2004 -- Need To Make Words Randomly Appear With Scenes
I am creating an educational game in Flash MX 2004. I'm strictly a designer, not a developer so I draw a complete blank when it comes to anything ActionScript related.
This little game I'm trying to make is to teach high school kids vocabulary words in Spanish. I have an intro scene and then a scene for each vocabulary word. In this case, the words are names of animals. There are animal-shaped buttons. The student is supposed to click on the animal button that matches the word that appears with the scene (and if correct a sound file of the word is played and the button shows a check mark in the "hit" state or a buzzer and a red "x" in the hit state on an incorrect answer.) I have the basic design set up-- all the scenes, the buttons, sounds, rollovers for the buttons, graphics, background and so on.
After an animal button is pressed, correct or incorrect, the scene is supposed to go to a countdown scene (5 seconds) then on to the next word.
My problem is that after the student pushes the "start" button on the intro page, a word is supposed to appear randomly, without repeating. I can't figure out how to call a random scene or movie clip. I have individual words on each scene, so there are nine words -- nine scenes with the word in the upper left corner and the buttons showing correct or incorrect states for the word.
I'm also clueless when it comes to a 5 second count down timer -- I tried several things that I couldn't get to work so I just made a scene that counted down with a different number every 30 frames in the timeline (and set it to 30 frames per second.) So after each scene, the timer needs to be shown then it needs to randomly move to another word.
For someone who knows ActionScript, this will probably be a piece of cake, but I just can't figure it out. I'm a genius when it comes to the artsy part of design and an idiot when it comes to scripting, so I would really appreciate simple, step-by-step, spoon-fed answers. I have trouble jumping from "A" to "B". When people give me script, I have no idea what to do with it-- put it in the timeline? Where?
If you need more info, or can't visualize this, I can send you screen shots of the scenes.
If anyone can help me out with this, you will have my eternal gratitude!
View Replies !
View Related
Flash Index Page Randomly Opening Numerous Pages In Browser
I have created an index page in flash and the rest of the website in Dreamweaver. The index page contains 4 buttons linking to specified sections of my site.
when i open the index page in the browser, it proceeds to open hundreds more of these pages. I am guessing i have created a loop somewhere without realising it.
I have used a simple code in action script for each of these buttons. I have tried the following:
on (press) {
getURL("about_us.html", "_self");
}
on (release) {
getURL("about_us.html", "_blank", "GET");
}
and variations of these but cant seem to get it to work the way it should.
Can you help?
Many thanks
View Replies !
View Related
Help With Making A Flash Form/Saving Text To File/and Displaying In Flash
I'm trying to make a flash movie that has a form (with a textbox, textarea, and a submit button) that would save to a file and display it in a textbox. This is going to be a small site so MySQL isn't required.
I'm trying to do this completely in flash, without any outisde html forms. I know you can use php in flash but I wasn't sure how (and i've searched). And I'm not sure how to go about with making forms in flash. Is this possible, and are there any similar tutorials you could point me to?
Regards
View Replies !
View Related
Flash Not Displaying In IE
Hey everyone,
I recently added a flash banner to a site but the flash is not displaying in IE. It will display fine in FireFox but not IE. This is happening on more than one PC. I have tried using various other snippets of code but I just cannot get it to display.
One note, if I have the html file on a local computer, it will display fine, once I upload it, the swf will not display.
Does anyone have any suggestions?
Thanks in advance for your help!
Wes
View Replies !
View Related
Just Displaying Flash In Asp
hi all
a really simple problem that i cant seem to work out, my flash animations refuse to show up when im using asp, i dont think its the linking of the file issue as the pages show up fine on my network server just not on my external web server. the files look like they are loading as in i.e is showing progress all but really slow progress. it only seems to be doing this under asp (not net) pages. example code:
HTML Code:
<%
IF Session("userlevel")=1 THEN
Response.Write("<td align='left'>")
Response.Write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='500' height='118' id='banner'>")
Response.Write(" <param name='allowScriptAccess' value='sameDomain' />")
Response.Write("<param name='movie1' value='winticketsbanner.swf' />")
Response.Write("<param name='quality' value='high' />")
Response.Write("<param name='bgcolor' value='#ec3c21' />")
Response.Write("<embed src='winticketsbanner.swf' quality='high' bgcolor='#94a1c3' width='500' height='118' name='intro' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />")
Response.Write("</object>")
Response.Write("</td>")
ELSE
Response.Write("<td align='left'><img src='images/officialsite.gif'></td>")
END IF
%>
Thanks for any help
alex
View Replies !
View Related
Displaying Php In Flash
im sure its a simple problem i am having but i still need some help, here is the problem i have some script to write to a text file using php.. is as follows
(mouse action)
ActionScript Code:
on (release) {
time = new Date();
url = "./store.php?time="+time.getTime()+"&myGroup="+
escape(myGroup)+"&myScore="+escape(myScore);
loadVariablesNum (url, 0);
nextFrame();
}
This from what i understand adds the data to a php file which is as follows...
PHP Code:
<?
// store the variables passed by POST
$fp = fopen("data.txt", "a");
if (!$fp) die ("cannot open the file");
fputs($fp, "&myGroup=".$myGroup, 4096);
fputs($fp, "&myScore=".$myScore, 4096);
fclose($fp);
?>
this saves the text to a file called data (it appends the file everytime someone enters details!) after a few goes this is the contents of data.txt
&myGroup=sam01&myScore=score01&myGroup=sam02&mySco re=score02&myGroup=sam03&myScore=score03
ok so thats fine, now all i need is to is display them results from the text file in flash as
sam01 score01
sam02 score02
sam03 score03
any ideas?? it should just load in a dynamic movie clip should it not, one after another??
sorry for the long post
sam
View Replies !
View Related
Displaying XML Value In Flash
I'm having trouble setting the value of a dynamic text field (elevation) equal to a value from an external XML source.
Here is a snippet of the XML source:<?xml version="1.0" encoding="utf-8"?><WeatherReport xmlns:xsd="http://www.w3.org/2001/...">
<station>
<elevation>6</elevation>
</station>
<WeatherReport>
I load the XML source into Flash using:var weatherQuery = http://www.bgxcomponents.com/webservices...;var weatherXML = new XML();
weatherXML.ignoreWhite = true;
weatherXML.onLoad = displayResults;
weatherXML.load(weatherQuery);
Then I try to set the dynamic text field "elevation" equal to the "elevation" value in the XML using the following code, but nothing happens:
function displayResults() {
elevation.text = airportXML.WeatherReport.station.elevation.text}
PLEASE HELP!! THANKS!!
View Replies !
View Related
|