Please Help ... Setting Up .swf Files Back To Back
I hope someone can help me figure this out. I'm creating an animation to teach the alphabet to preschoolers. The first part shows falling (raining) alphabet letters (used flashmatics very helpful code), then a big letter "A" (that takes up most of the screen) comes down into the center (did a motion tween to bring the letter in).
The next part is supposed to switch over to an short (3 seconds) animation of an object that starts with the letter "A" (will have a small letter "A" on the left-hand corner and the name of the object, i.e., "apple" on the right hand corner). Then there will be two more 3 sec animations showing two more objects starting with that letter (for a total of 3 objects).
What I don't know is whether I 1) create each of these in a separate .swf file (raining alphabet with falling "A", object 1, object 2, object 3) and then place them inside a table on my .htm page to somehow play sequentially (how do I do that????)
--- or ---
Find a way to have the animations inside the same file one after the other. I know very little Flash or programming ... I'm just a teacher .... so I'm having trouble sorting out how to do this. I thought I could set up different "scenes" and then have scene 1 go to scene 2, etc. But that's not working for me (the original falling letters won't stop falling through all the scenes no matter what I do and I can't seem to change the background in other scenes because it changes the first one too).
Can anyone help??
Here's the code I have for falling letters (thanks to Zane/Flashmatics):
var SW:Number = Stage.width; var SH:Number = Stage.height; var gravity:Number = 0.2; var i:Number = 0;
var nInterval:Number = setInterval(fall, 1000/24); var aLetters:Array = ["A", "B", "C", "D", "E", "F" ,"G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "X"];//PUT YOUR ALPHABET IN HERE
var aRain:Array = [];
function fall():Void { _root.attachMovie("mcLetter", "mcLetter"+i, _root.getNextHighestDepth()); var mcLetter:MovieClip = _root["mcLetter"+i]; var nIndex:Number = random(aLetters.length);
mcLetter.tLetter.text = aLetters[nIndex]; mcLetter.tLetter.textColor = Math.random()*0xFFFFFF;
//movieclip properties mcLetter._x = random(SW); mcLetter._y = -(random(20)); mcLetter.vr = random(20)-10; mcLetter.vy = 4+random(15); mcLetter._alpha = random(100); mcLetter._xscale = mcLetter._yscale = random(450); aRain.push(mcLetter);
for (var j:Number = aRain.length-1; j>=0; j--) { var currLetter:MovieClip = aRain[j]; currLetter.vy += gravity; currLetter._y += currLetter.vy; if(chbRotate.selected){currLetter._rotation += currLetter.vr}; if (currLetter._y>SH-25) { currLetter.swapDepths(1000);//use this because sometimes components push mc depths to unremovable ones currLetter.removeMovieClip(); aRain.splice(j, 1); } } i++; }
FlashKit > Flash Help > Flash Newbies
Posted on: 11-04-2007, 02:09 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Question: Running Back-to-back Swf Files (and Pre-loading)
I have two SWF files. I would like to play the second one at the end of the first one, or maybe even one or two frames before the first one ends. They are both the same dimensions. I know I can do it with AS, but I am a Flash beginner and not sure how.
Also, file #2 is quite large, so I would like a way to start pre-loading it as file #1 is playing, so that by the time #1 finishes, then #2 will be ready to go.
Thanks for your help!
Can You Use The Back Button In A Browser To Go Back To Go Back In A Flash Movie?
Hi
In html pages it is easy to go back (the back button in the browser) to the last page you were on. But when you have got a flash site in a html page you cannot go back to the last page in the flash site using the 'back' button in the browser. Is there anyway you can change this so that you can use the back button in a browser to go back to the last flash frame?
Setting Mc Back To Location
hi, heres my scripting, i can get the drag and drop to work fine, but if the object is not droped on the mc target i want it to revert to the location on else, which i cant get to work. Please help, Thanks
on (press) {
startDrag ("reda");
}
on (release) {
stopDrag ();
if (getProperty("/reda", _droptarget) eq "/statc") {
tellTarget ("/") {
gotoAndPlay ("A", "atoc");
}
} else if (getProperty("/reda", _droptarget) eq "/statb") {
tellTarget ("/") {
gotoAndPlay ("A", "atob");
}
} else {
tellTarget ("/") {
setProperty (_root.reda, _x, 70);
setProperty (_root.reda, _y, 136);
}
}
}
Setting History.back()...
Ok, here is what I am trying to solve. I have -let's say- a simple flash movie which has a simple red box in the middle of the stage and a stop() action in the main timeline. On frame two there is another stop() "sign" and the red box is green; and on the third frame the box turns yellow, with a third stop().
There is a button at the bottom of the stage that makes the movie go to the next frame (or the first frame if positioned on the last one).
Now I open this flash movie in a browser, and I see the red box. I hit the button and the box goes green. Cool. Then I enter "www.flashkit.com" in the browser address bar and of course I see this website. Then I hit "BACK" and I see the flash movie again, with the red box.
But I wanted to see the green box, because I had it on the green box before going to www.flashkit.com. What is the most practical way to do so?
Setting Movie Clip Back To 1
If I load a movie clip into my main movie, how do I make that movie clip return to its beginning frame if it is unloaded?
Thanks.
Array Sorting - Random With No Back-to-back Repeats
I need help with a complex array sorting method, and I apologize if this concept has already been addressed in the forums. Part of my problem is that I don't know how to concisely describe it, so I can't do an effective forum search.
I start with an input array of strings that will be of varying length and may contain repeat values. I need to randomly sort the array and return an array with the same values, but it should try to distribute values evenly and avoid back-to-back repeats if possible.
(Sorry, that's the confusing part. Hopefully the examples will explain better. Colors are not important, just added to aid visual)
**************************************************
Example 1 (Random order, avoiding back-to-back repeats):
**************************************************
If the input array is
["dog", "dog", "dog", "dog", "cat", "cat", "cat", "bird", "bird", "fish"]
I need to output
["dog", "cat", "dog", "cat", "bird", "dog", "cat", "bird", "dog", "fish"]
but the order also needs to be randomized, sometimes giving me
["fish", "dog", "bird", "dog", "cat", "bird", "cat", "dog", "cat", "dog"]
OR
["bird", "cat", "bird", "dog", "cat", "dog", "fish", "dog", "cat", "dog"]
ETC.
************************************************** ***********
Example 2 (Distribute as evenly as possible if back-to-back repeats are unavoidable):
************************************************** ***********
If the input array is
["dog", "dog", "dog", "dog", "dog", "cat", "cat"]
I need to output
["dog", "dog", "cat", "dog", "dog", "cat", "dog"]
but also randomized, sometimes giving
["dog", "cat", "dog", "dog", "cat", "dog", "dog"]
OR
["dog", "dog", "cat", "dog", "cat", "dog", "dog"]
ETC.
Any help with this would be appreciated. If this type of sorting has a name, let me know so I can look it up.
Using Back Browser Back Button On SWF Loaded Site
I have created a web site that runs on loading different swf files. These files contain navigation and plain content. My problem is that I need to use the browsers back button. I dont think I can do this with anchor tabs. Help meeeee. It's driving me nuts. I don't see any questions out there that address this on a site that is with multiple swf files.
Anybody?
I Just Need Two Movie Clips To Play Back To Back
This is a simple one: I have 1 scene, I've developed two complex mc's and now I want to play them in sequence. In scene one I've placed the first movie with a "stop" action. Inside the end of this first mc I also have a "stop" action. I've then put the second mc in frame two expecting the playback head to advance to frame 2...when i preview the move it just stops after the first mc. Ive tried to replace the "stop" action with "gotoandplay(scene,frame)" at the end of mc one...the first mc just loops. Also tried setting up a second scene with the second mc placed in frame one with a stop "action". Then use the "gotoandplay(scene,frame)"... it just plays the first scene mc.
Thanks for your help.
joe
Playing Swfs Back To Back Seamlessly?
I have an extremely large swf here. 7.1 MB!!! I also have one that is around 5MB!
I am having difficultity playing them on the webpages.
Obviviously they need preloaders which I use, but due to the size (I am assuming) they play slow. The music plays fine but the animation has trouble keeping up and thus it is not entirely in sync.
Would splitting these swfs up into smaller swfs and then inserting code (getUrl or something along those lines?) at the end of each small swf to begin playing the next small chunk of swf work?
Can this be done and done smoothly? So that the small swfs play and play back to back so that the viewer wouldn't even be able to tell?
What are your thoughts? Has anyone been able to do this successfully?
Playing Swfs Back To Back Seamlessly?
I have two extremely large swfs (7.1 MB and 5 MB). I am having a lot of trouble displaying them on the web. The run slow. The sound plays fine but the animation has trouble keeping up and thus it is out of sync. The animation looks slow.
I do use preloaders and have tried loading the entire swf before playing and just loading 1/3 of the movie or 1/2 of the movie before starting, to the same slow play.
I am wondering if it is possible to split these monsters into much smaller swfs and then link them together?
In otherwords, at the end of the first small swf is a code (getURL or something along these lines) to start loading/playing the next section of small swf, etc...
Can this be done seamlessly? So that the viewer would not even know there are multiple swfs and it would play as if one continuous movie?
Has anyone tried this or is this even possible? Thanks.
How Can I Get My .fla Files Back
i spent about 6 months working on a flash website. today i looked at the folder and all my .fla files are gone! i must have overcopied them or something. im absolutely devastated to the point of nearly being in tears.
is there any way i can get the .fla files back from the .swf files i have.
if theres programs that do this could somebody please recommend one.
fingers crossed im not watching 6 months work go down the swannie.
martin Australia
2 Swf Files - Jumping Back And Forth?
I am kinda new to scripting and would like to know if this is possible. Here is my situation, I have two movies (swf files). The first file, which is the main part of the site, has 6 different scenes. The second swf file has 1 scene. On the first swf file you can click a button and it will take you to the second swf file, which is not connected to the first swf file. (The browser takes u to the second swf file through a url.) (on the first swf file, you click a button and on that button I have an action script with the url of a new swf file, which is the second one) But here is my question, can you make the second one go back to the first one in a certain section. For example, When you move to the second swf file and the user wants to go back to the first one in a certain point is that possible?
Let’s say I am at the second swf and I want to go back to scene 3, frame 1 (1st Swf file) and the url to the first swf file is: http://www.firstswffile.com. How would I do that?
Thanks
Back To Back 'getUrl' S -- Can This Work?
Hey there,
I have a movie on which the last frame in my Actions layer asks for two get urls. It basically looks like this.
getUrl ('http://www.mysite.com', _self);
getUrl (javascript:deadCenter('300','200');
It seems to work on some machines but not others. The pop-up window comes up but the first getUrl gets ignored. I'm not sure why.
Any ideas?
Thanks.
2 FLVs Back To Back Same Player
Does anyone know how to set up a video object that will play 2 seperate flvs back to back?
I have 2 flv files and one player. Sometimes I need both to play sometimes only one. But I was wondering how do I have them play back to back smoothly as if they where one flv.
Prevent SWF Files From Being Decompiled Back Into FLA Format
Some programs such as Sothink SWF Decompiler may be used to decompile the SWF files back into FLA format. Even the ActionScirpt inside the SWF files can be decompiled as well! No one can even tell the difference between the original FLA file and the compiled FLA file! What can we do to prevent this from happening? I heard that we may protect the SWF files by using ActionScript Obfuscator. Is it true? How to do that? Please help, I must do something on it.
Edited: 01/20/2007 at 12:36:06 AM by Ng Jackie
For-loop With LoadVars. How To Distinguish Files? (OMG He's Back)
Wow it's been so long... (and I still seem to stumble across the same problems )
Here's the deal. I am working on a game and I want to have the layout of the levels in textfiles.
Each textfile is named "level(n).txt" - where (n) is the number of the level ("level1.txt", "level2.txt", etc).
The level-"data" in those files is simply several rows of comma-seperated values that describe what kind of tile to use at that position. So typically, it would look something like this:
Code:
100,100,200,300,100
100,200,200,200,100
100,300,200,100,100
(and so on - you get the idea)
My question is, how do I use just one loadVars-function together with a loop (other ideas are welcome) to retrieve the data... and be able to tell which data the function is currently loading?
I used to do it like this:set a variable (on _root) as a "distinguisher" of the level number that is currently loaded
load the first level (with a timed call to the function with "setInterval")
assign the retrieved data, if successfully loaded (with the "onLoad" even function)
upon recurrence of the Interval, check if data was assigned (or if assigning failed) and...
load next level ... [rinse, repeat]
My question now really is (without further ado):
Can't I just call the "onLoad" function for the "loadVars" in a loop so it kind of loads all levels at once? If so, how does the function know which level it just loaded?
Or am I doing something wrong?
Here's how I'd like it to work... but it's probably even simpler than this:
ActionScript Code:
gamedata_Arr:Array = Array();distributeValues = function(success) { if (success) { // assign the data (that was loaded) to "gamedata_Arr", // Array-Key = Level Number (how?) }}levelValues = new LoadVars();levelValues.onLoad = distributeValues;// The loop to loadeverythingatonce (whee!)loadLevels = function(howmanylevels) { for (var ln = 1; ln <= howmanylevels; ln++) { var filename:String = "level"+ln+".txt"; levelValues.load(filename); }}loadLevels(3);
Yea... I'm lost... any way to help me?
Back Button In Flash Projector Like Javascript's "history.back"
Please tell me how to make a back button in Flash for projector (exe) file. The back button should function like the javascript's "history.back". I have 100 scenes that points to one target scene. If a user clicks the back button in the target scene, he/she must go to the scene from where he came.
**** I am not looking for named anchors that works for swf file in browser.
Counting Files In A Directory And Passing The Count Back To Flash
Hi there,
Im trying to create a fully automated photo gallery - where my client only needs to upload image (jpg) to a ftp server and Flash / php takes care of the rest.
I´ve found a almost completely automated gallery that only needs to be told how many files it should read from a given directory. How do I make Flash and php read the number of files in a directory and pass that variable back to flash?
The gallery i want to use is located here: http://www.flashkit.com/movies/Scrip...7797/index.php
ANY help will be greatly accepted...
.vinterstille
Counting Files In A Directory And Passing The Count Back To Flash
Hi there,
Im trying to create a fully automated photo gallery - where my client only needs to upload image (jpg) to a ftp server and Flash / php takes care of the rest.
I´ve found a almost completely automated gallery that only needs to be told how many files it should read from a given directory. How do I make Flash and php read the number of files in a directory and pass that variable back to flash?
The gallery i want to use is located here: http://www.flashkit.com/movies/Scrip...7797/index.php
ANY help will be greatly accepted...
.vinterstille
Keyboard Back Button Acting As Browser Back Button
I'm having problems with a Flash MX Sign up form I'm implementing on my website.
The form has a series of frames which take the user through the sign up process, before clicking through to the online payment gateway. Each of these frames is anchored to allow the user to click the browser Back button to go back to the previous frame (rather than the previous movie).
However, the keyboard back button is now acting as a browser back button.... Any ideas why?
Any help with - or solutions to this probelm - would be greatly appreciated.
Thanks in advance for your time.
Regards
Rob
Keyboard Back Button Acting As Browser Back Button
I'm currently implementing a subscription sign up form in Flash MX. All of the frames of the sign up movie are anchored so that the user can click Back on his/her browser and go back to the previous frame of the movie.
However, when the user now tries to delete/amend info (eg, first name, username, etc) on the form using his/her keyboard Back button, it triggers the browser Back button.
Anyone out there experienced a similar sort of problem - ie, why the keyboard Back button is acting as the Browser Back button?
If anyone has any ideas/solutions, I'd appreciate any input.
Cheers
Rob
Play 3 Swf's Back To Back
Hey,
I'm working on a custom videoplayer and was wondering if anyone knows how to play 3 different swf's sequentially? I have a standard intro, the actual movie and an outro.
I keep experiencing strange results and was wondering if someone has done this before.
Thanks!
Back To Back Sound
Last edited by myounis : 2004-12-01 at 00:37.
well, i must admit im a little ignorant when it comes to sound. All i want to do is use onsoundcomplete to gotoandplay (20). After the preloader, my movie stops on a certain frame with sound on it, when its done, i want it to play 20.... thats about it. thanks.
Using Back Button In Flash "like A Browser Back Button"
hey all/reef,
basically this code will work like a browser back button its very simple but "could end up very long" basically it will act "similiar to the browser back button"
Code:
on (release) {
if(page1 = _currentframe){
_root.gotoAndStop("quiz");
} else if (page0 = _currentframe){
_root.gotoAndStop("register");
} else if (page2 = _currentframe){
_root.gotoAndStop("q2");
} else if (page3 = _currentframe){
_root.gotoAndStop("q3");
} else if (page4 = _currentframe){
_root.gotoAndStop("speciality");
}
}
it works when the (page1 = _currentframe){ is rotated with the first if statement...because for somereason it seems to not recognise the "else if's" anybody or reef have any ideas why??
How Do I Go Back?
Hello guys!
Is it possible to play a MC backwards? If yes, how?
Thankful for all help, Daniel.
Back How?
i have a movie with lot of mcs .now i want to put a back button on all the frmaes, to let the viewer go to the earlir scene. now the problem is that the earlier scene could be some frame of some MC, so i cant put a common button with goTo pevious frame action.(i want to avoid checking all the frames and tells and specify the frmaes)Is their any way that i can capture the position of the earlier frame and then use this to goto that frame???just wondering???
*.swf Back To *.fla ?
I found a swf-file that had some really good animations,
but by importing it into a fla-file all actions that are
given to objects are lost, it just works as a movie.
Is there a way to transfer it into a fl-file without losing
all given actions?
GO Back
I've got a small site in one single flash file.
The back button of my browser doesn't take me to my previous view, but to my previous http://address . goTo prev frame doesn't work for me, so i'd like to copy my browsers back butten into flash.
any idea's, becouse I just don't know here to start
cheers
Back To Top
my site is 800 x 1000 and I have a back to top button in the flash, how can I do a html back to top through flash.
Anyone know?
Going Back
how can i tell my movie to go back, when i tell him to go to previous frame, it stops after moving to that frame i need it to continue
I'm BACK
Just wondering if it's possible for a .swf file to load a random image into itself each time the page is loaded/refreshed. It would be ideal if the images were not already pre loaded into the .swf. There is potential for a large number of images and I don't want to make the .swf huge.
I have javascript that does this but I'm not sure how to implement it into Flash, if it's even possible.
thanks in advance.
Help Is Back Again
ok I have few new questions for the Gang
Now that I know how to put flash on my site ( hahaha )
how do i put links on my site ( within flash )?
how do I make a flash page goto the next on ?
How can I change the basic colors,
and put in my own back ground picute in ?
BTW I am using Swish 2.0
thx gang !!!
Back Again
Hey, thanx for suggestion alotan but i looked n found a couple tutorials that were close but still didnt know n enough to write my code.
Concrete surfer thanx a lot for ur offer!! im not gonna bug u personally about it quite yet - il give it another few days, but if i fail il take u up on it if u dont mind.
By the way my menu buttons are jus plain text and not in any boxes and when i said about bouncing - wat i want is for the submenu to slide down from behind the main button while goin from transparent to white as it slides down.
As it is now now ive made all the buttons and placed them into a movie clip n used the _visible script to hide the sub menu and make it appear on a rollover of the main button. I still havent even worked out how il get the submenu to close when another options is selected so ive moved onto tryin to create a script so that i can do transparency effect eg transparency from 0 - 100 as the sub menu slides down.
Thanx a lot for ur help again. hopefully u wont have to hear from me again!! haha
Back
how can I give a button actions for a movie with tell target to go back from where it is and play backwards. (the idea is that on roll out it does not skip to the end frame of the over state but stops where it is and goes back slowly)
i.e.
on (rollOver) {
tellTarget ("my movie") {
gotoAndPlay ("over");
}
}
on (rollOut) {
tellTarget ("my movie") {
prevFrame (????);(and plays backwards until it reaches frame 1 and stops there)
}
}
Help would be appreciated
Go Back From Where They Came
Brand new at Flash - bear with me please.
My user answers a series of questions with right or wrong. Right takes them through the whole movie step by step (in linear fashion). Wrong takes them to an animation section asking if they are sure about their decision. If they answer "unsure" I need to take them back to the place in the movie they came from.
Suggestions?
Back To EXE From SWF?
Is there a way to get back to the main exe file on a CD ROM after loading a movie?
We have our main exe file and a link to a slide show that is an swf file (loadmovie).
We have a back button that should go back to the exe file, but the only way I know to do it is to call the original main swf file.
I'm trying to fit everything on a mini CD ROM, so space is an issue.
Is there any action script that would take us back to the exe file?
Thank you.
Back To Top
I have a flash site that is long (pixel-wise). On long html sites often you are provided with a Back to Top button like the "Page Top" button at the bottom of this page. Is there a way to effectively do this in flash? I have tried a getUrl pointed at an anchor on the html but that only restarts the site. Any suggestions?
site in question:WFofR
Thank you
Take Me Back
Hi, I'm trying to create a rewind button on my main timeline. I was hoping to get a button that would basically allow the user to rewind the movie until they release. On roll out the movie would play forwards again. Well it's the rewinding of the movie I can't figure out obviously. Any help would be great.
Vij'n
How Do I Get Back?
Ok, I have a scene in which I also have a movie clip playing. When I play the movie clip, I want to be able to click a button and exit the movie clip and go back to frame to at the begining of the scene. I have looked al over the boards and tried many things from a gotoandplay aspect and I am still stuck in the movie clip.
Any ideas would be greatly appreciated.
Welcome Back - How To?
Hi All,
Is the following possible? if so how can I do it?
I want to set something up within my flash movie that recognises new visitors and asks their name, which people can either choose to do or not.
If they do enter their name, on their next visit it will say something like welcome back....
Does that make sense?
I have heard that a sharedobject makes this possible but just can not seem to get to grips with the workings of it! does anyone know of tutorial or a source file that does this and will explain it step by step.
Or has anyone done this and is willing to explain the 'dark arts' of shared objects???
Be grateful for any help/ideas/suggestions.
Cheers
D
Aaa....i'm Back
and i have no idea on how to create components
Anyone can help???
Back Again
Im curious,what command would I use in order to make a Movie Clip play then when it hits a certain Frame,load another Movie Clip and play it?Also is there a way to make a Movie pause a bit once loaded before it plays?
Thanks Ahead of Time.
Im using Flash MX to try these things.
Going Back & Forth?
I am using buttons to move the movie backwards and forwards along the timeline.
At the moment I am telling the movie to goto an actual frame (ie frame 35) when the button is pressed.
I would rather the buttons made the movie move forward 5 frames and stop or move back 5 frames and stop - depending on the button.
How would one do this?
Thanks - Joe
Go Back To Where You Came From
Well, it's been a long time since I've had to come calling for help from all you at FlashKit but this one's got me. I know it can be done but am drawing a blank.....
I have a presentation CD Rom that has some 12 scenes in it. All nav items work just fine, the audio synchs beautifully etc. The issue is with the exit button. If user clicks the exit button they are taken to a new scene (the "exit" scene). Here they can either confirm that they wanna go OR they can return to the program (start).
The issue is that we want them to go right back to the scene and the point in the timeline that they clicked the exit button on. Shouldn't be that hard but it's been a long week........
Thanks in advance for all your expertise.
KD
|