Pleez Help With Random Keyframe Ques.
I have four different movie clips on four different keyframes (2-5) the first key frame has a clip with an invisible button over it. WHat I would like to achieve is onMouseover of the button in the first frame......I would like the playhead to randomly gotoAndStop on of the other frames (2-5). To give the illusion of random movement. The on mouseout return to the first keyframe. any help greatly appreciated....either a .fla I can study or some AS would be great.
FlashKit > Flash Help > Flash ActionScript
Posted on: 05-28-2003, 10:49 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Play Random Keyframe To Keyframe In MC
Hey all i am creating a game now this is complex but i have been told by my fellow actioncript co worker that its doable, What it is i have a game "Reaction Tester" and It is inside a car going along the road so its psudeo 3d and i have the "walls" and road sorted now i want a movie clip in the road to throw out random objects From a Movie clip, now i will call them from frame names, say..
frame 1-10 is a tween with a box coming down and then frame 11-20 is a cat and frame 21-30 is a hole in the road Etc i want it to call a random frame to frame, to play can anyone help, thanx in advance
Random Keyframe
Hi all.
Im once again having problems with action script...probably just syntax problems, but nevertheless I need help.
I have a MC with 13 event sounds laid out with labels 0-12. I want to (either button or frame acion) generate a random number 0-12 lets call it "varnum" and use If (and if else) statement to tell the MC to go to corrisponding frame label. jeeese...Im bad at explaining this
Ok..better...I have 13 event sounds and I want to randomize their play on a particular event. Hope that makes sense.
Thanks!
Random Loading To A Keyframe
I have searched the web and found nothing about how to "random load to a keyframe" in Flash. I need to know how to code this in Acioncript 3.0. I need frame 1 to have the code in it and it needs to "random load frame 2 or 22 or 42" when the user refreshes the webpage. I need help on this immediately. It should be simple enough to do for Actionscript programmers but for this graphic designer it is not. Please help.
Thanks.
FMX - Random Keyframe Select
Hello all, i think i may have a challenge for you. I would like to have a flash movie load to a random keyframe in a timeline when the page loads.
Basically, i'd like to set up a timeline with say 10 movies. When the page loads, i'd like the flash to randomly select from some predetermined keyframes (obviously where each movie starts) and when that movie ends, jump to another section of the timeline. This way, the loading of the movies is somewhat seamless and it looks like i've made 10 different flash movies.
Even if it's not possible to all load from the same timeline, i'd like to have it play the first movie, then when it reaches an ending frame, it loads another random movie from a directory on the server, and then keeps going and going until it can't stand it anymore.
Any suggestions?
Play Random Keyframe
I am wanting to add a script to a button so that when you click on the button it plays a random keyframe. For example i have 5 animations. at frames 21, 31, 41, 51, 61, and 71.
When the user clicks the button i am wanting it to randomly play one of the above keyframes. Is this possible or is it pretty complicated?
Replies Appreciated.
Cheers!
FMX - Random Keyframe Select
Hello all, i think i may have a challenge for you. I would like to have a flash movie load to a random keyframe in a timeline when the page loads.
Basically, i'd like to set up a timeline with say 10 movies. When the page loads, i'd like the flash to randomly select from some predetermined keyframes (obviously where each movie starts) and when that movie ends, jump to another section of the timeline. This way, the loading of the movies is somewhat seamless and it looks like i've made 10 different flash movies.
Even if it's not possible to all load from the same timeline, i'd like to have it play the first movie, then when it reaches an ending frame, it loads another random movie from a directory on the server, and then keeps going and going until it can't stand it anymore.
Any suggestions?
Play Random Keyframe
I am wanting to add a script to a button so that when you click on the button it plays a random keyframe. For example i have 5 animations. at frames 21, 31, 41, 51, 61, and 71.
When the user clicks the button i am wanting it to randomly play one of the above keyframes. Is this possible or is it pretty complicated?
Replies Appreciated.
Cheers!
Random Keyframe On Mouse Click
I've searched everywhere and I can't find the answer.
I've got 10 keyframes with a image on each one. When the user clicks the button i'd like it to go to a random keyframe.
I know its simple but I cant figure it out.
Cheers.
Random Keyframe On Mouse Click
I've searched everywhere and I can't find the answer.
I've got 10 keyframes with a image on each one. When the user clicks the button i'd like it to go to a random keyframe.
I know its simple but I cant figure it out.
Cheers.
Random Keyframe On Mouse Press
Sorry for asking a stupid question, I couldn't find any answers while searching the forums.
The problem is - say i've got 10 keyframes, each keyframe has a picture on it. I want it to randomly pick a keyframe when the user clicks the mouse (each keyframe will have a stop command)
Its for a teacher so she can ask the pupils questions about the image, they wanted it random.
Thanks for any reply.
Cheers
Diff Btwn Blank Keyframe And Keyframe?
Hi all,
I'm a first time Flash user who is currently floundering in her attempt to learn Flash MX. Burning question of the hour: What's the difference between a "blank" keyframe and a keyframe? In which circumstances should I use a blank keyframe? How about a plain ol' keyframe?
Thanks for your help!
[AS3] Determine The Last Keyframe/if A Frame Is A Keyframe
i'm making a game and to score some extra performance im rendering every frame of every entity into an array of bitmapdata's the first time the frame is seen, and it works well, but its wasting alot of memory because we have alot of animations, and most of them are double framed at least, so more than half of the bitmaps could be ignored if there was a way to determine if a frame is a keyframe or not
but it seems theres no simple way of doing this (like mc.lastKeyFrame) so i was wondering if anyone had a solution to this problem
thanks
Pleez Help
i have a button inside a movie clip #2, and mc#2 is inside movieclip #1. mc #1 is on the main timeline. i want that button to play a movie clip that is inside mc #2 (same frame as button) on realease.
i tried
on (release) {
picturespv.gotoAndPlay(2);
}
where picturespv is the instance name of the movie clip i want to play. any ideas?
thanks
_currentframe (pleez)
Hi all. I've posted a message last week about this and i'm still trying to solve this situation. I dunno, my logic says it should work, but it doesn't as i want!
It's pretty simple, there's a movie with 3 squares of 3 colors and 3 buttons outside the movie, 1 for each color. in the MC (named "rgb") there are 6 different motion tweens to represent the transition between the colors. I want the MC to show the color you choose with an horizontal move to the chosen color.
Here's a link to my post with an attached file.
http://flashkit.com/board/showthread...hreadid=549053
Thanks in advance!
Button Help, Pleez
I am a n00b at Flash MX and need a lil help. If I create a button in Flash, how do I use that button in Dreamweaver MX, or can I ??
Key.getCode Problem Pleez Help
Hi folks!
I want to build a SMS-Messenger in Flash. The user can type 160 Chars. A textfield variable shows the remaining characters. Okay, the problem is, that only the chars a-z and 0-9 plus some special characters (like !., etc) should be count. Backspace, Shift F4 etc-Keys must not be count.
I tried to solve this problem with following code:
onClipEvent (keyDown) {
// 65 to 90 is the alphabet plus 0-9
if (Key.getCode > 64 && Key.getCode < 91) {
_root.maxCount--;
}
}
This Code doesn't work, i don't know why (maybe I'm totally weird now, after spending the whole night on that problem), if I delete the if-clause it works with all keys. Very suspect?!
Thank you for your help!
Pleez Help With Onclipevent Prob
Okay let me see if I can explain this.... This is a snippet of the code.
onClipEvent (load) {
inhalt = "About";
text = "All youever wanted to know about me but was afraid to ask";
skal = 0;
}
onClipEvent (enterFrame) {
if (skal == 1) {
_y = _y+(30-_y)/6;
_alpha = _alpha+(200-_alpha)/6;
}
if (skal == 0) {
_y = _y+(125-_y)/10;
_alpha = _alpha+(100-_alpha)/6;
}
}
The menu works but when I want to use the geturl command it is inherited by all the instances. I want each instance when clicked to pull up a different url in the designated frame (this works thanks ya'll). I have tried splitting the instances into separate mc, but they still seem to inherit the geturl from the first instance. I hope I did not confuse you guys. If you can help I would greatly appreciate it. Let me know if you need more info.
Flash/Html Help Pleez
ok here is what is goin on:
I am working on a website that has frames (a left one, with all my buttons and stuff, and my right one..or the main one containing all the information) As some people may know you have to put in all the target=_parent and all the other good stuff just to make something come up in your main frame properly. Well what i want to do is have a flash movie on the left (this movie will have all my buttons and stuff in it) and another flash movie in the main window. The hard part...When you click on a button in the LEFT window, it plays a new flash movie in the main (or RIGHT) window. I THINK this has somethin to do with the loadmovie scripts and stuff..but i'm a little bit of a newbie and have questions about it. can anybody help me with this? if you have no idea what i'm talking about then just holla back and i'll try to make myself more clear
A Navigation Question Pleez Help
Okay let me explain this first. each button opens a corresponding animated opening door. If you button 1 door 1 opens and remains open. Now from there if I press button 3 I want door 1 to close then open door 3. Its like the button has to know to play the remaining of any open door animation that may be open and the play the appropriate animation. This is what I do not know how to do. Could someone pleez help me. Let me know if you need more explanation.
Scrolling Buttons.....help Pleez?
i need to create a scroller that scrolls thumbnail images that when clicked on ...opens up a bigger picture
elsewhere .
i'm a noob.....does anyone know of a good tutorial or fla file that can help me? a little less on the AS if
possible.
pleeez.....i'm losing my hair!!!!
Preloader To Load .jpg Pleez
Hi
First happy new year to you.
I am in need of some help. I have a container that loads a .jpg and I was wondering how i can do this with a preloader. Can some one just point me in the right direction. I found a tutorial but there is a bug in 2004 that doesnt make it work (so the tutorial says).
I really appreciate the help
How Do I Get A Pop Up Window From A Flash Button? Help Pleez
this is a two part question, my first one is how do i place my flash on my webpage sized the way i want it?(i'm very new to this)
I am trying to make a very simple "stereo interface" where users can flip thru songs and push a button to play what they want to hear, but i DONT want my interface to disappear
and open a full size window when they click a play button, how do i make it open a custom sized pop-up window that doesnt close the flash page?
PLEEZ HELP!!! I dont know what to do? :/
Can't Resize Main Window - Help Pleez
I am taking the tutorial and want to resize the program window so I can view the help window and program windows simultaneously. All of a sudden the program window won't resize (the help window does). I am highlighting the program window, of course. Ever seen this? Can you suggest something pleez. THANKS!
Scenes / Swapdepths / Levels Problem HELP PLEEZ
An interesting problem and one which is probably no sweat for someone with bundles of experience with swapdepths...
I put together a game which makes use of dynamically changing swapdepths on the avatars to give a kinda 3D effect...level one went great.
Want to now do the next lot of levels for the game, so thaut I'd use scenes to keep things neat and tidy.
Unfortunately I found that, although the instances I use in scene one dont exist in scene 2, it seems that because of the swapdepths Ive used on em, they flagrantly intrude upon the next scene regardless.
Cool I thaut, I'll put together a function which removes all instances from that scene before moving to the next scene which I did. My guess was that on 'play again' - ie returning to the first scene and hitting the AS in the frames in that scene, the instances would be reinitialised and would work as expected. Not so - what I got instead was a mess. Some of the instances worked as expected, some did not. Therefore I guessed that the function removing all instances was probably not the best way of doing things.
Can anyone give me any clues as to what I should do to prevent this overlap between scenes when using swapdepths?
Your help is greatly appreciated.
Edward.
Gonna Kill The Preloader Then Shoot Myself PLEEZ HELP
I have tried oh so very hard to get some preloaders to work, but alas, 3 different types of preloaders refure to actually work when I publish to html.
Oh, believe me they work fine when I ctrl-enter and preview the movies, but when I publish to html or post it to my website, I just get the first scene showing the tweened animation of the loader bar, but the loader bar just repeats itself again and again, and shows "O bytes of 0 loaded".
What am I doing wrong??
Main movie has only 1 frame. This frame has a mc in it. (Lets call it mc_1). In mc_1, there is also only 1 frame, but many layers (Some which have their own mc's).
I've tried using the bar preloader (which uses getbytesloaded etc) and it works fine when doing the ctrl-enter test, but as mentioned, when trying to publish, it doesn't work.
I'm frustrated as this is holding up my site going live.
Any help out there????
I would really really appreciate it.
Pleez Help Simple Load Movie Problem
I have been working on this site for the longest time and I know everyone will be glad when I finish so I can stop posting so much on this board. But now I need to know what I'm doin wrong.
What I wish to acheive is to have my main movie load a clip into the top left portion of my screen (where I have a movie clip already in the area). I have put code in the MC and on the Main Movie, but it always loads into the center of the screen and not into the MC.
Please, if someone could help me with this I would greatly appreciate it forever and ever.
I have included an example FLA & SWF to show what I'm trying to do since my FLA is too big cuz it contains MP3's.
Bueno Suerte!
Btw, Flash 5 format!
Pleez Help Simple Load Movie Problem
I have been working on this site for the longest time and I know everyone will be glad when I finish so I can stop posting so much on this board. But now I need to know what I'm doin wrong.
What I wish to acheive is to have my main movie load a clip into the top left portion of my screen (where I have a movie clip already in the area). I have put code in the MC and on the Main Movie, but it always loads into the center of the screen and not into the MC.
Please, if someone could help me with this I would greatly appreciate it forever and ever.
I have included an example FLA & SWF to show what I'm trying to do since my FLA is too big cuz it contains MP3's.
Bueno Suerte!
Btw, Flash 5 format!
Nav Ques
Hey guys I seem to remember a thread regarding how to make this kinda of NAV :
http://dopepope.com/ntps/Build_onff/
Anyone remember the thread or have a link on a tutorial to dup that kind of load jpg and have the window resize automatically...thanks all
_parent. Ques
im trying to load an external jpg. and the file name of this jpg is the name of the mc 2 levels above the command.
if u dont understand this is thi code im trying to use
Code:
x = _parent._parent._name;
loadMovieNum("x".jpg, 1);
i also tried putting th eparent crap in the load move itself like this
Code:
loadMovieNum("_parent._parent._name".jpg, 1);
and its still not working. any one able to give some advice
AttachMovie Ques
Hi -
I'm using the code below to bring mcs from the Library to the stage. It works fine until I tried to add the x,y at the end.
I thought there was a way to include _x and _y coordinates to the same statement as the attactMovie. Is there?
TIA the correct way to accomplish this.
jl
Attach Code
mc_btn2.btn2.onRelease = function():Void {
attachMovie("Q2WithGame","Q2Game",this.getNextHighestDepth,[_x=45,_y=110]);
};
Simple AS 1.0 Ques
AS 1.0
I have this code in a keyframe on the main timeline:
var score = 0;
if (score == 2500){trace("winner")}
Othe stage in the maintimeline i have a dynamic text field I labeled "score" in the var box. The instance name is "pts" but i wasnt sure if i needed an instance name anyway here. The score box works fine as far as keeping score but when it reaches 2500, I dont get my trace. What am I missing? Thanks
-Chris
Stupid Ques
hello new be ere (welsh) i got a prob wanderin if some1 could help im tryin to get a news page that updates ive got this off yahoo
this
so now tryin to use it but flash does ntlike it im prob doin some thing stupidly wrong now on the verge of not botherin
PLEASE HELP
Attaching MC Ques
hi.. anyone out there can give me a tutorial which teaches attaching a MC to another MC?? urgent..
Stupid Ques
hello new be ere (welsh) i got a prob wanderin if some1 could help im tryin to get a news page that updates ive got this off yahoo
this
so now tryin to use it but flash does ntlike it im prob doin some thing stupidly wrong now on the verge of not botherin
PLEASE HELP
Flash Ques
please can you explane me how can I make this file like on this site:
http://www.t-s-k-b.com .You go on this site and press SAKUBA WORKS and then button Painting/Drawing
I would like to make a picture gallery like in Painting/Drawing: So how I can make when the mause on the button to show small image of the picture and when I press the image to open the picture how is on the site(not in a new window)?
Please tell give me advice how could I make it!
thank you
Another Loading Ques
Is it possible to make the movie load let's say... only the 1st 2 frames of movie that has 8?
Button Ques
Ok real dumb ques..I have this animation..u can dl it from here: www.zeroxposur.com/test/nav.fla
So what I want to do is have 5 buttons fade in ..onto the bar as it finishes its animation..but I dont know how to do it.. Can anyone point me in the right direction. Thanks
Easy AS Ques.
ok so I have a flash doc..theres a an MC called target on mainstage that has the entite site in it (doing a fullscreen centered website)..now I have MC nav buttons on the stage (inside target). Inside one of the nav buttons I have a line of AS that says
ActionScript Code:
this.onRelease = function(){
_root.target.loadMovie("bioresume.swf", "loader");
}
Now im not sure If im doing that right..but what i want to happen is; after u release the button, load the ext swf into the empty MC called "loader". But what seems to be happening is it loads the ext swf but everything else on the site disappears. See I originally had this as my AS cause i thought this made sense but it ends up not doing anything:
ActionScript Code:
this.onRelease = function(){
loadMovie("bioresume.swf", "loader");
}
So if anyone knows what I did wrong, much appreciation. Heres the site link if u want a visual:
www.josephsernio.com/test
Easy As Ques.
Ok for some reason the end of this code doesnt work.. on release, i want it to take me to frame 2..and it wont...btw this a movie clip that has button properties through AS:
stop();
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
this.onRelease = function(){
gotoAndStop(2);
}
MC Loader As Ques.
im working with the moviecliploader AS..so a button loads an ext SWF and also has a percentage loader .. so on my mainstage i have a loader mc (instance name "loader")and a holder mc (instance name "holder")..heres my AS on the main timeline:
var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();
mclL.onLoadProgress = function(target,loaded,total) {
loader.percent.text = Math.round((loaded/total) * 100) + "%";
}
mclL.onLoadInit = function() {
loader._visible = false;
loader.percent.text = "";
}
mcl.addListener(mclL);
Now i have another MC that houses about 20 or so buttons..so within the buttons MC i have say this for one of the buttons:
b4sub.onRelease = function() {
_root.loader._visible = true;
_root.mcl.loadClip("LevisCampaign.swf",holder);
And unfortunetly it doesnt to load the ext. swf..did I code the _root incorrectly?
Thanks for your help.
Fscommand Ques
Hi all, I was working with fscommand, when it struck me what FSCOMMAND stands for.
"Future Splash Command"
Can anybody confirm this, or am I mad, lol
Later
ORANGE900
Send From One Keyframe To Another Keyframe
In one keyframe I have a script that read a PHP file to show some text.
But I also get some information that I like to show in next keyframe too.
Is that any easy and nice way to do that or do I need to use alot of variable
LoadVariables Button Ques
Hello all. I have this code attached to a button calling up a different text file to a dynamic text field and it works fine, except I'm having to hit the button "twice" for it to work. Can't figure out why. Can someone enlighten me please?
code:
on (release) {
scrolltext = scrolltext1;
loadVariables ("scrolltext1.txt", scrolltext1);
}
Thanks in advance
Easy - Pong AI Ques.
Ok just to see if I could do it(never really got into game programming) I tried to make a pong game everything works so far but I have a problem with this:
Flash code:
PHP Code:
onClipEvent(enterFrame) {
if(_global.cspeed == 0) {
}else{
if (this._y != _root.ball._y){
if(_root.ball._y < this._y){
this._y -= _global.cspeed;
}else if(_root.ball._y > this._y){
this._y += _global.cspeed;
}else{
this._y = this._y;
}
}
}
}
The problem is that instead of moving smoothly up the screen it looks like it s shaking up and down really quickly, but I would like it to be smooth.
Please help.
Movie Clip Ques
Hey i just started doing flash yesterday and i am doing a text fade
I made the motion tween and and everything and when i go to control and play everything is smooth but when i go to test movie nothing it just stays the same and doesnt fade :> plz help me
Movie Clip Ques
Hey i just started doing flash yesterday and i am doing a text fade
I made the motion tween and and everything and when i go to control and play everything is smooth but when i go to test movie nothing it just stays the same and doesnt fade :> plz help me
Quick Mask Ques
Im sure this is an easy one.. on the foofighters website http://www.foofighters.com When U click a button that flourish/swashy graphic looks like it is unwinding or growing rather. I would like to get the same effect.. Its obviously a mask of some sort. I know who to mask, im just figuring its a mask that is animated somehow. Anyone have an idea? Appreciate any insight into this. Peace
-R
Quick Actionscript Ques.
Ok so im building a portfolio website and basically if you click on the art image it goes tothe next art image..I have it set up so the art images are buttons and when u click it, it is coded to goto next scene..On one scene however the art image is a movieclip (fading effect)...now how do you write the actionscript so if you click on the movieclip it goes to the next scene? I dk im right but...my guess is to put the MC within a button symbol? But I dk. Thanks guys.
|