Default Random Starting Frame Everytime The Video Is Loaded
Im looking to for my flash video to start at a random keyframe everytime the video is loaded.
I have about 20 layers with images transitioning into each other.
ex: http://www.uniquefood.ca/whyuniquefoods.html
The file: https://pearlwhitemedia.sharefile.co...87eda4505c43d2
Anyone have any actionscript that could generate such an effect?
Thanks in advance
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 01-24-2009, 03:50 PM
View Complete Forum Thread with Replies
Sponsored Links:
Random Starting Frame Everytime The Video Is Loaded
Im looking to for my flash video to start at a random keyframe everytime the video is loaded.
I have about 20 layers with images transitioning into each other.
ex: http://www.uniquefood.ca/whyuniquefoods.html
The file: https://pearlwhitemedia.sharefile.co...87eda4505c43d2
Anyone have any actionscript that could generate such an effect?
Thanks in advance
View Replies !
View Related
- Random Image, Everytime Movie Is Loaded -
I have A Flash Movie that will be uploaded onto the web.
I am trying to write a script where everytime a user comes onto the site, they are given a different background image.
The way I figured it will work is Something like this:-
* There are 5 hidden background jpeg images numbered 1 to 5
* When frame 1 is entered, a random function will call a number
between 1 and 5
* The jpeg image corresponing to that image will be showed.
Does anybody have any knowledge of this and advise me on the scripting?
View Replies !
View Related
Random Starting Frame
I have a simple Flash movie with a series of still pics fading from one to the next. I want to use it in a web page masthead and I would like the movie to start on a random frame. Is there some simple AS3 code I could use in the first frame that directs the movie to immediately jump to a random starting point within the 220 frames contained in the movie? Help for a newbie would be much appreciated.
View Replies !
View Related
Stopping Or Starting A Movie Clip At A Random Frame
hi,
i am loading random movie clips into 4 seperate empty movies, i now need a way to get these random clips that i am loading to play for a random amount of time and then load the next clip.
if i assign it a random number and get the clip to loop, then compare the number to the current frame of the movieclip and if true, tell it to stop and move to the next random clip...would this work?
i have no idea how to write the code for this
any help would be great
thanks
View Replies !
View Related
Random MC's Everytime SWF Is Played
Word to ya motha's
I have a 'snail racing' game where there is ONE user controlled MC and the other THREE MC's are running on there own timeline.
But the thing is i dont want the other 3 'opponant' MC's to be the same all the time because when a user comes back they will realise that there are only 3 mc's that always play the same.
How do i make the movie load random MC's everytime i load the SWF? (so that the competition is a little different)
Thankyou for the help in advance
Gav
View Replies !
View Related
"Random" Starting Frame?
I'm not sure on how to describe this error, but here goes.
On frame 1 in the actionscript in my flash app, there is a gotoAndPlay(6) (after some other code). Currently, this works fine, effectively starting out the app on frame 6, thus with a highlight on the middle icon (link to the app below).
However, when I change some attributes to the app, the starting frame changes seemingly at random. I add a dynamic textbox, the starting frame changes. I change the textbox to static, it changes back. I replace the background image, it changes to another starting frame. Very frustrating.
Another strange thing is that the playhead seems to be somewhat unsure as to where it really is. When the graphic at one point started on frame 5, I put a trace text on frame 6 along with a trace printing the _currentframe. The trace comes out indicating that _currentframe is indeed 5, even though this code only exists on frame 6! Crazy.
Here's a link to the .fla:
http://www.randomitem.com/Exjobb/SWF/forwebtest.fla
I'm very grateful for any input at all on this, as it's becoming a big problem. Guesses are fine too, if you don't have the time to check out the code :)
Thanks!
View Replies !
View Related
[F8] Things Get Reset Everytime I Go Back Into A Frame
I have two frames: in the first one is an mc that is a holder for a dynamic animation. The second frame has other stuff. The problem is that whenever I go from the second frame back to the first frame, the animation gets reset. I want it to start once, and just keep going from there on.
Here's the code within the holder mc:
Code:
for(i=0; i<8; i++) {
mc = this.attachMovie(type, 'MC'+i,
this.getNextHighestDepth());
mc.onEnterFrame = function() {
if( this._x < -175 ) {
this.remove();
numClips--;
}
this._x -= speed;
};
}
this.onEnterFrame = function() {
if( numClips < 8 ) {
mc = this.attachMovie(type, 'MC'+rem,
this.getNextHighestDepth());
mc.onEnterFrame = function() {
if( this._x < -175 ) {
this.remove();
}
this._x -= speed;
};
numClips++;
}
}
View Replies !
View Related
Creating Poster Frame In Video Being Loaded Via XML
I have a FLVcomponent with a playlist that is being populated by an XML file.
If a video loads and is not set to auto play there's just a black screen. I would like to set a poster frame for the videos. How would I do this? I tried using the "preview" parameter but it just says "unable to load flv:. Does anyone know how I can achieve this or if I'm doing soemthing wrong..
The videos are streaming.
Thanks
View Replies !
View Related
Detecting From A Parent When A Loaded Video Hits It Last Frame
Hello all.
Here is my scenario. I have a base movie that has some play controls and stuff that all works fine. I also have a empty movie clip object that I load swf files into on the fly that just play straight. What I am trying to do is detect from my parent movie when the child hits its last frame so I can unload it and load another. any ideas about how to go about this to steer me in the right direction? Oh I thought I should mention that I am not creating the child swf's, they are being deleiverd to me and the only script they contain is a stop in the last frame of the movie.
Thanks alot,
Mike
View Replies !
View Related
Random Starting Point
Is there a way to make a listing of 10 different phrases that appear as an introduction on a page to randomly start with a different phrase every time someone comes to the page and then just run through the rest?
View Replies !
View Related
Random Starting Of Easing Eq.'s
Hi all, am curious how to go about randomly starting dynamic scripted tweens. I have a fla with a bunch of bees in it and they need to move randomly at different times.
I have the following on each bee instance::
Code:
onClipEvent (load) {
start = this._x;
change = 615;//this is variable
duration =150;//this is variable
t = 0;
}
onClipEvent (enterFrame) {
t++;
if (t <= duration) this._x = Math.easeInOutQuad(t, start, change, duration);
}
And all the bees are on the main timeline.... So how can I randomly start them? I am assuming some sort of setInterval method?
Any help is greatly appreciated!
Many Tnx!
View Replies !
View Related
Starting Image At A Random Spot?
Hi, I have a cloud I want to have rain coming out of it at random spots.I created a single rain drop and need to know the script to start it at random spots within the cloud. Does anyone know the script or could lead me towards a good tutorial. I looked here on FK but couldn't find what I was looking for, Thanks everyone.
View Replies !
View Related
Random Starting Movie Clip
Hi everyone, I guess this is a newbie question, not sure about that...so here's my little problem:
I have got this movie clip in my flash movie that is to start at random times over and over again, actually it's a bubble animation, bubbles running up the movie. To make it look more "natural" the movie clip of each bubble should start playing at random times.
My problem ist that I don't know too much actionscripting except the usual "on mouse - play - stop" :-/
So if anybody could help me out on how to create randomizers and using them to start movie clips I would be glad, I've been browsing the tutorials-section for hours but didn't find anything equivalent.
Thanks in advance, folks
View Replies !
View Related
Random Constrained Starting Point
ok guys i need some help here.
Below is the pattern of the stage. i need to animate 10 stars starting from anywhere within a constrained area on Z to anywhere on X. i can animate the stars randomly from Z to X but how do i constrain the starting point for Z. anyone?
--------------------------- X
000 000 000|0000/0000/000
0000 000 00|000/0000/0000
00000 000 0|00/0000/00000
--------------------------- Z
|--------------|
constrained area for starting point on Z
thanks.
damian
View Replies !
View Related
[F8] How To Create A Random Starting Point?
I have several move clips that I have set up in one flash file so when the first clip is done it goes into the second one. However, I want it to randomly start at the beginning of any one of my clips, meaning that it starts at frame 300 and next time refreshed/loaded it starts as 850 and next time 1? Does that make sense? Any input would be great!!
View Replies !
View Related
[CS3] [F8] Repeatedly Starting A MC At A Random Time
Hi there,
I have a test website at www.designamite.ch/flash/ if you press the section "Buch" you'll see a book floating down and some fingers which appear. I made the fingers tap through a gotoAndPlay action on the last frame which directs to the fourth frame. So it skips the part were the fingers slide in.
I've been given this AS
Code:
var rand = Math.floor(Math.random() *20 ) +1;
rand *= 1000;
intervalID = setInterval(runn, rand);
function runn() {
_root.createEmptyMovieClip("con",1);
_root.con.loadMovie("tapping.swf");
}
sadly I don't know where to put the AS to make it work. Should it be on the main timeline, on the MC itself, or somewhere completely different?
Once the fingers have slided onto the book, the tapping should be at a random pace.
If you wanna have a look at the fla, it's at www.designamite.ch/flash/spheres.fla
Thx
Tim
View Replies !
View Related
Starting Flash At Random Labels
Hello folks,
I have a very simply flash animation that just fades in/out about a dozen logos, and I want the flash to start at a random label each time it is loaded. What would be the best way to develop that?
Thanks in advance.
View Replies !
View Related
Starting Video In As3 Slides
im making a presentation and i decided to use slides. now, i imported video to stream from a server. by default, its set to auto play. witch causes it to play even if im in the first slide and the video is in the 9th.i made it have no controls so that it would be cleaner. here is the problem when i get to this 9th slide the video has ended! and I'm just seeing the first slide. i change the property of auto play to "off", so now i gotta make it play through actionscript while in slides. im not sure if this is possible, but im sure that i can use the actions window while in slides. so please tell me how to start a program with as3 in slides. i haven't moved to as3, in fact there was practically nothing i didn't know how to do in as2, now i'm a newb. i dont even know how to use the simplest functions, they all use as3 classes it seems.
View Replies !
View Related
Starting Flash Video
Currently I am using timelines in Dreamwaver to control a sequence of actions. I want it to start a flash video. I have it starting the video when it first is encountered. But I want it to restart the video. How can I do this?
thanks for any comments.
Robert
View Replies !
View Related
Delay Starting A Video
hi, i want to know if theres a way in chich i have a camera recording video to the server and have some delay in start playing that video, for example 1 minute after start recording the video i start playing it.
is this possible ??
thanks
View Replies !
View Related
Mute Video By Default
Hi Guys,
Im trying to mute the my_FLVPlybk by default when the player starts.
I can set the voulme to 0 alright but then the mute button doesnt restore it to 100 when I press it.
I want the video muted and one single mute button available to un-mute it.
Any ideas?
Cheers
View Replies !
View Related
Specify A Starting Frame?
Greetings,
Is it possible to specify a starting frame for a flash movie in the OBJECT or EMBED tags?
The situation that I am specifically referring to is a site where I have two different flash movies playing in two different frames. One movie is a navigation bar with a few submenus. The other movie is a map that is in the main frame of the site. I want the map movie to be able to load or control the other movie. I figured the easiest way would be to specify the starting frame on the navigation movie when it loads. I have been experimenting with passing variables to the movie and then using an IF/ELSE logic tree to simply gotoandplay() the frame that I want, but the logic doesn't seem to be working.
Is there a way to just send a starting frame number in the OBJECT or EMBED tag? If so, I can do all my logic with PHP and just send the correct tag to load the movie at the frame I want.
Any help is appreciated,
-Pete
View Replies !
View Related
Starting At A Different Frame
i want to send people a link to my flash site but i want to take them to a specific section of the site....since my site is all run/contained in one swf - how can i do this since the url for the whole site is always the same?
thanks
View Replies !
View Related
Starting From A Different Frame
Hello there, this is my first post here, i have had a look through the archieves but was unsuccessful.
I'm wondering if i can start from a different frame by giving some parameters to flash via a link, or is there another way this can be done..?
thx...
View Replies !
View Related
Problem Starting Sounds From Random Script
Hi I am using the following script to declare and play random sounds
All the traces work fine, however the sounds still do no play. Any idea?
var boumarism1 = new Sound();
boumarism1.attachSound("boumarism1");
var boumarism2 = new Sound();
boumarism2.attachSound("boumarism2");
var boumarism3 = new Sound();
boumarism3.attachSound("boumarism3");
var boumarism4 = new Sound();
boumarism4.attachSound("boumarism4");
var boumarism5 = new Sound();
boumarism5.attachSound("boumarism5");
var boumarism6 = new Sound();
boumarism6.attachSound("boumarism6");
function randomBoumarism(mc) {
var rNumber:Number = int(random(5)+1);
var boumarismSelected = "boumarism"+rNumber;
mc[boumarismSelected].start();
trace('bourarism called');
trace('Boumarism Called = ' +boumarismSelected)
}
View Replies !
View Related
Starting Up Loaded Swfs
Hi,
I've got a swf which loads variables from a database when it starts. I wanted to embed it in another swf with the loadMovie action.
The embedded swf is coming up okay in the outer swf, but it's not performing any of the first frame load actions.
Any ideas how I start it running? This is my first attempt at embedding swfs within swfs so I'm probably missing something obvious.
View Replies !
View Related
Starting A Movie When 50% Loaded?
Can someone help me on figuring out how to load a movie at 50%? I am using the following code to preload and play at 100%.
Code:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
Thanks!
View Replies !
View Related
Video Starting At Specific Time?
I'm working on a teaching site and don't have any previous experience with Flash, so I was hoping someone could help me with 2 questions:
1) Is it possible to start a video at a specific time?
2) Is it possible to start a video mid-way through the movie?
Here's an example of what I'm talking about:
Say we want to play a 15 minute video and we want it start at 2:00pm. If someone goes to the website at 2:00pm, they'll get to see all 15 minutes of the video. If someone goes to the website at 2:05pm, the video will start at the 5-minute mark and they'll only get to see the final 10 minutes of the video.
Is this possible?
Thanks!
View Replies !
View Related
Recording To Non-default Video Codec
Hello,
I would like to record the flv from the client application in the flash7 codec no matter what version the user has. Reason for this is I need to convert the movi to different formats and the software we are using to accomplish that is unable to convert the latest codec.
Is this at all possible, and if it is, how? I can't find an answer to this on the net anywhere, please help.
Mark
View Replies !
View Related
Starting On A Specific Frame...
hey guy's, maybe someone here can help.
i have a MovieClip with 40 frames.
i was wondering when i load that movie clip can i make it start on a specific frame eg. let's say frame 30..instead on frame 1........
can this be done??
Any help would be greatly appreciated, kind of urgent.
thanx heaps
mdesign
View Replies !
View Related
Starting Movie On Last Frame
This seems like it should be easy, but because I don't know what I'm doing, it's not. :>
Here's the situation. When a visitor goes to index.html at my site, a Flash movie with preloader plays. At Frame 99, a script launches another page (welcome.htm) in the same browser window. On this page, and every other page in my site, the last frame of the movie (101) is the navigation menu. So I don't want the entire movie to play on these pages. I want it to start on Frame 101.
Here's the action script:
Frame 99: getURL ("welcome.htm");
Frame 100: Flag = "2";
gotoAndPlay (101);
Frame 101: stop ();
Here's my HTML:
index.html:
<PARAM NAME=movie VALUE="pieceofeight.swf"> <PARAM NAME=loop VALUE=false> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=medium> <PARAM NAME=salign VALUE=T> <PARAM NAME=wmode VALUE=transparent> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="pieceofeight.swf" loop=false menu=false quality=medium salign=T wmode=transparent bgcolor=#FFFFFF WIDTH=755 HEIGHT=231 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
welcome.htm
<PARAM NAME=movie VALUE="pieceofeight.swf?flag=2"> <PARAM NAME=loop VALUE=false> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=autohigh> <PARAM NAME=salign VALUE=T> <PARAM NAME=wmode VALUE=transparent> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="pieceofeight.swf?flag=2" loop=false menu=false quality=autohigh salign=T wmode=transparent bgcolor=#FFFFFF WIDTH=755 HEIGHT=231 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
Instead of starting the movie at Flag 2 (Frame 100), the movie is starting at the preloader when welcome.htm is launched.
What am I doing wrong?
Thanks in advance for your help.
Devon
View Replies !
View Related
Starting .swf In Specific Frame?
I want to do the following:
If I open a specific html-page on my site, there is a flash-menu on it. I want to start that flash-menu in a specific frame, which I enter on the html page. I know it can be done, but I don't know how. I use this to enter the frame-value in the html:
Code:
<EMBED SRC="flash/movie.swf?frame=11"
So I want the menu to start at frame 11 when the page is opened instead of frame 0.
Now I need to read this variable "frame" in the first frame of the flash-menu. But I don't know how to do this. Can anyone help me please?
View Replies !
View Related
Movie Not Starting From Frame 1
Problem:
Well when my preloader finishes, its supposed to go to the next scene, but it doesnt play the next scene from frame 1. I dont understand why, heres my code:
loadedbytes=getBytesLoaded();
totalbytes=getBytesTotal();
loadedkbytes=Math.ceil (loadedbytes/1000);
totalkbytes=Math.ceil(totalbytes/1000);
if (loadedbytes == totalbytes) {
nextScene();
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}
Any ideas?
~DW~
View Replies !
View Related
Starting A Movie At A Particular Frame.
I am making a website that contains various works of art. I want it to work like this: When the user clicks on a button (paintings, for example) I want thunbnails of those paintings to appear. Then, when a thumbnail is clicked, a popup window will appear with closeup versions of the thumbnails. In that popup movie are "next" and "previous" buttons so the user can scroll through all the paintings.
My question is this: How do I get the popup movie to start on the frame that corresponds to the thumbnail that was clicked? For example, if thumbnail #6 is clicked, and the closeup version of that painting is located at frame #20 in the popup movie, how do I get the popup to start there? Is it something in conjunction with the "get URL" action?
ALSO, how can I make the popup window close by clicking a "close window" button?
Thanks for reading.
View Replies !
View Related
Starting A Movie At A Particular Frame.
I am making a website in Flash MX that contains various works of art. I want it to work like this: When the user clicks on a button (paintings, for example) thumbnails of those paintings will appear. Then, when a thumbnail is clicked, a popup window will appear with closeup versions of the thumbnails. In that popup movie are "next" and "previous" buttons so the user can scroll through all the paintings.
My question is this: How do I get the popup movie to start on the frame that corresponds to the thumbnail that was clicked? For example, if thumbnail #6 is clicked, and the closeup version of that painting is located at frame #20 in the popup movie, how do I get the popup to start there? Is it something in conjunction with the "get URL" action?
Thanks for reading.
ALSO, how can I make the popup window close by clicking a "close window" button?
Thanks for reading.
View Replies !
View Related
Starting At A Frame From The <embed> Tag
Hi,
Is it possible to start a flash movie at a certain scene from an attribute in the <embed> tag?
My site has a flash movie front end, but a html navbar. I would like the link in the navbar to point to a page with the same movie on it, but playing from a different point. Perhaps there is a way to do this without using more than one page?
Any help much appreciated.
View Replies !
View Related
Starting Swf In Frame 3 Or 6 By Url Input
how do i get a swf file to start in frame 3 or 4 or 5.
i would like to this by adress bar ( url )
like www.macromedia.com/movie.swf&frame3 that it starts at frame 3 when something like this is typed.
or can i make a swf with action script in it that opens a other swf that start at frame 3 or 4 in the same frame.
i need this because i want my movie to be enter at a topic that can be given by a user. like if i send a email a can make a link in it that makes my movie start at frame 3 because that the topic my email is about and they dont nee to see the rest of the swf
View Replies !
View Related
Frame Starting Point
Hello,
Ive built a site with flash mx nav, is it possible to have the flash movie start from differnt frames on different pages? The problem being an image is displayed on click but when th new page is loaded the flash file returns to the start.
many thanks
todd
View Replies !
View Related
Starting A Movie In A Different Frame
hi all
what im trying to do is when a button is clicked on one site, it loads a different url movie in the same window, but after it has loaded up it starts at a certain frame on the timeline.
i was told this would work but it didnt:
on (release) {
getURL(" url ", " frame name ");
im not sure i've explained it very well but any help would be welcome.
cheers
View Replies !
View Related
[MX] Starting A Movie On A Different Frame
I've made a movie -- called "pix.swf" -- with about twenty images which dissolve every few seconds, and loops continuously.
This same movie will play on differrent sub-pages of a website, but I would like it to start on a different image for each different page it plays on. So I've made 12 little "loader" subfiles, each of which contains a variation on the following code:
_global.movieVar = 1;
loadMovieNum("pix.swf", 0);(That's for loader1; loader2 creates variable 2, loader3 creates variable 3, etc.)
Then on my main "pix" movie, I've got this in the first frame:
if (movieVar == 1) {
gotoAndPlay(60);
}
if (movieVar == 2) {
gotoAndPlay(111);
}
if (movieVar == 3) {
gotoAndPlay(160);
}
if (movieVar == 4) {
gotoAndPlay(210);
}
etc. So my plan was for each subpage to have a "loaderX.swf" which would open pix.swf on the specified frame.
This worked great when I created a sort of prototype, using different colored shapes. But when I then copied the code into the Flash that contained the jpg images, it didn't work. Whether I play loader1 or loader9, it always starts at frame 1 of "pix.swf"
Why does this work with shapes but not bitmaps? This might not be the best way to do what I need to do -- any other suggestions would be most appreciated!
View Replies !
View Related
Starting A Movie At A Different Frame
I'd like to have a movie start at a different frame the second time it is viewed on the same visit. In other words, if they view the same movie a second time by leaving the page and then coming back to it, I would like that movie to jump to a different frame and play.
View Replies !
View Related
Starting .swf File At A Certain Frame?
New user to this forum and flash AS in general, so hello to everyone.
I was wondering if there was a way to have a .swf file start at a certain frame?
I'm using the code below and it loads the .swf file fine only it starts at frame zero instead of what I want to be frame 680. I was wondering if there was anyway to have it start at frame 680 instead of 0?
ActionScript Code:
var myloader2:Loader=new Loader();
stage.addChild(myloader2);
backbutton.addEventListener(MouseEvent.CLICK, clickbutton);
function clickbutton(myevent:MouseEvent) {
var myrequest:URLRequest=new URLRequest("Vignelli.swf");
myloader2.load(myrequest);
}
Any help is very appreciated, even a not possible to do.
View Replies !
View Related
|