Makeing All The Pieces Fit, Making 1 Long 1
Dear; Helper People
I'm super close to finishing, but Its not loading all that nice. Some dont load and its slow.
What I had done was make 6 different sections, meaning.
I made one part of the movie, saved it. Then opened a new file and made the other part of the movie.
I tried to link them togeather using 'loadmovie' but its not really working. Some frams load, and if they do its like 5mins later.
How can I make it into a nice long con't movie, with out waiting for super lots of loading?
-Thanks
FlashKit > Flash Help > Flash ActionScript
Posted on: 05-26-2002, 09:57 PM
View Complete Forum Thread with Replies
Sponsored Links:
Making Long-running Scripts Iterative?
If you have read this article you would have seen the authors suggestion to "make sure that any functions that could run long are iterative".
I want to be clear on exactly what this means and hope someone can clarify it for me.
I ask because I have run into issues when I know that a script is pretty darn long but I know that it will finish at somepoint - I just have a lot of calculations to make and scenarios to go through, but Flash will crap out on me and give up.
Is the author suggesting that you just put a timed interval on the function each time every ".X" seconds or something?
That's what I'm guessing, but I'm just not sure. Any information, insights, or even code examples would be greatly appreciated.
Mike
Pasted below is the complete paragraph that discusses this issue:
Quote:
Long-running scripts can cause the dreaded “A script is running slowly” dialog to pop up. This is incredibly unprofessional in a game, and if the user hits “Yes” on the dialog, it will break the game, because it kills all scripts from then on. For the downloadable version, it’s possible to set the timeout before this dialog comes up by hacking the SWF. Better still, though, is to simply make sure that any functions that could run long are iterative. A level generation function will need to return back to the system every once in a while so Flash doesn’t think that it has hung. Remember that there are machines of all kinds out there – have such a function return to Flash no later than half a second per increment, just to be safe.
View Replies !
View Related
Help With Makeing A Menu Please
Ok I am basicly wanting to make a menu in my flash movie, well i have having a problem stopping the sceen where the bg stays and dosent leave untill the play button or another button is pressed. I also have music in this sceen for intro music. I want that to continue playing till play is pressed if i can get any help at all i would love it thanks oh i have flash mx pro 2004
View Replies !
View Related
Makeing A Curser
ok heres the deal ive got this constantly looping animation now what i want is to see the constantly looping animation instead of my mouse while running my website but i can worry about that later for right now i was wondering if anyone can tell me how i would show my animation instead of my mouse? i dont know if this is the right thread to ask this so if it isnt pleasee rederect me to the correct one thanks alot for your help guys
View Replies !
View Related
Serious Need Of Help In Makeing Links
I am using a template to make an autorun flash file off a cd.
I highlighted text and went in to the chain button and typed the
location of the file I did not make a button as I dont know how to do it.
The file is located in the same folder as the flash file.
All I did was type in Exampledocument.pdf
On my computer this works great I click adobe pdf reader loads life
couldn't be more perfect..............LOL
BUt on everyone elses computer it loads there internet browser
why I have no freaking clue. Then it doesn;t even load acrobat in the browser
it just opens iexplorer and says can not find www.exampledocument.pdf
Not sure how this happened but I really need to get this working
can someone please tell me where I went wrong.
I need to know how to link to a file in the same folder as my flash file
and to launch it externally in the program it was created in IE: adobe acrobat
not open a browser window, or search for links that don't exist....
MAN IM A NEWBIEEEEEE
View Replies !
View Related
Please Help Me Decide: RPG Makeing
Hello, im new to this forum, but i have an important question.
A friend and I are planning on makeing an RPG. She is doing all the drawing and concept work, but i need to put it into a program. The whole idea is to make it a siggy RPG, so i need to know how to time events and such, I've done quite allot of work with flash, and I do webdesign with HTML and PHP.
Any help or comments would be great apriciated.
View Replies !
View Related
Makeing A Movie Pause
JUst wonder how to make a movie pause, then play, without user interaction, basically, i wan to animate some text and content comming in, the for it to stay there for about 20 seconds, then for it to go and new text to come in. I know i can do this by ading in keyframes, but i know theres a better way, seeing as this program can do everything short of robbing a bank so as to save me working in the first place!
thanks,
Tony
View Replies !
View Related
Makeing Games Using Flash Mx
im new to flash mx but i want to make a game like this http://www.freewebs.com/fiddlesticks/gravity%20test.swf but i need to know how to make the birds fly away when you jump on the roof and how you make the gards follow you
would you use action scripts
(keep in mind i have only been using flash for 2 months and i have never made a game before, the simpler the better )
View Replies !
View Related
Makeing A Flash Counter
Hi all, I've got a rather interesting question. I want to make a swf file that uses a txt file to store and retrieve from, a number. Each time the swf is loaded, the number retrieved is increased by one and the new number is saved to the same txt file. The next time the swf is loaded, it retrieves the new number from the txt file and increases it by one and then saves that new number to the same txt file and so on. Anyone hear know of a way to do this?
Thanks loads,
Game Shark Man X
View Replies !
View Related
[F8] Question On Makeing A Game.
Hi, My question is, I'm trying to find an easy way to make an inventory list for a rpg game. Like, when I walk over something it adds it to a text box I made and tells the quantity of the item, But the problem I obviously ran into was, I needed to find a way to make it so if I already store something in the first Slot, I needed to have the next object that is obtained go into the Second, and so forth.
So far i was able to get this,
Code:
onClipEvent(enterFrame){
if (this.hitTest(_root.player)){
if(_root.itemSlot == 1){
_root.item1 = "Gold x20";
_root.gp = 20;
_root.itemSlot = 2;
;
} else if (_root.itemSlot == 2) {
_root.item2="Gold x20"
_root.gp = 20;
}
And its the same for the other item except the Label for it is "Sword x1".
But what I need is an easier way for if I have more then 10 items in my list.
and labeling their quantity.
My best guess on this is for me to use an Array but i'm completely stuck on how exactly im going to make life easier for me with having 10 or 20 slots. That sure would be a lot of if statements that would go on every object that can be obtained. =
If there's anyway anyone could help me, I'd gladly appreciate it.
Thank you =]
View Replies !
View Related
Makeing Loading Screens?
Im working on my first project (a cartoon), and want to learn how to make a loading srcreen (for while the cartoon is loading (after completion)). So if anybody knows how or knows where I can learn let me know!
View Replies !
View Related
Makeing Loading Screens?
Im working on my first project (a cartoon), and want to learn how to make a loading srcreen (for while the cartoon is loading (after completion)). So if anybody knows how or knows where I can learn let me know!
View Replies !
View Related
Makeing People Shoot Back
Can someone who makes games with flash tell me how to make people you are supposed to kill, shoot back, harm you, and take a bar off your health bar? and also end the game when the healthbar is gone? If someone could make a .fla document explaning this that would be super, but as i know most of you are busy so any help would be appreciated.
View Replies !
View Related
Makeing Actionscript More Portable *Word*
I found a descent tutorial on www.bit-101.com about gravity. I have used it to create/modify a movie that basicly does what I want it to do.
http://www.mdeering.com/flashkit/Polariod.swf
Now I want to use the same actionscript on all of the files that are in a directory or better yet listed in an XML file. The final goal is to have a stage full of small Polariods that come in one after anouther.
I have done some basic tutorials on xml but I need some help on getting started putting this together. I'm realy not to sure about how to approach the structure of the code and what goes where.
Here is a link to my current .fla and the photos.
http://www.mdeering.com/flashkit
Thanks in advance for any feedback.
View Replies !
View Related
Sounds Takes Two Long To Long.. Why?
I have some sound loading from an external file, I don't understand why it takes so long to load... www.janav.com.
If you check my website three of the albums have songs...
album 6,7,8 have sound attached... but when you click you have to wait few seconds for the sound... I want to make my sound to load as fast as
www.benwisch.com website.
Any suggestions..?
I am not using linkage nor action script to load the soung I only used this code ..
on (release) {
stopAllSounds(); //to stop all previous sound
loadMovieNum("PaulinaRubio_Paulatina.swf", 2); // to load the picture first
loadMovieNum("music/paulina_music.swf",3); // to load the sound after the picture..
}
should I being using action scripts instead (like the kirupa tutorial), will this load very fast.
One more thing, the song is like 2 megabytes... should I use part of the song and then loop it.??/
Any suggestions will be appreciated...
Thanks,
Jana
View Replies !
View Related
Sounds Takes Two Long To Long.. Why?
I have some sound loading from an external file, I don't understand why it takes so long to load... www.janav.com.
If you check my website three of the albums have songs...
album 6,7,8 have sound attached... but when you click you have to wait few seconds for the sound... I want to make my sound to load as fast as
www.benwisch.com website.
Any suggestions..?
I am not using linkage nor action script to load the soung I only used this code ..
on (release) {
stopAllSounds(); //to stop all previous sound
loadMovieNum("PaulinaRubio_Paulatina.swf", 2); // to load the picture first
loadMovieNum("music/paulina_music.swf",3); // to load the sound after the picture..
}
should I being using action scripts instead (like the kirupa tutorial), will this load very fast.
One more thing, the song is like 2 megabytes... should I use part of the song and then loop it.??/
Any suggestions will be appreciated...
Thanks,
Jana
View Replies !
View Related
Long Long Load Time?
okay, I'm fairly new to Flash (newbie style) but I made a nice movie but when I load in into a page (with dreamweaver) it takes forever to load. The movie (.swf) is only 3k .... so whats the deal??
help?
'~-,_www.sketchmilitia.com_,~'
View Replies !
View Related
Help In Makeing Autoloop Scrollable Thumbnail Images In Photogallery
hi everybody,
i have a vertical photogallary in which thumbnail images part i need auto scrollable,in which image is loading through XML,
http://www.evascrivosalon.com/salon.html
this site will take time to load be patient...friends...
this is the which i used in it........
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
thumbnails = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
thumbnails[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.UP) {
prevImage();
} else if (Key.getCode() == Key.DOWN) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 100;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 50;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 25;
tscroller.onEnterFrame = function() {
if ((_root._xmouse>=thumbnail_mc._x) && (_root._xmouse<=thumbnail_mc._x+thumbnail_mc._widt h)) {
if ((_root._ymouse>=(hit_right._y-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._y -= scroll_speed;
} else if ((_root._ymouse<=(hit_left._y+40)) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._y += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._y =(target_mc._height+0)*k;
///target_mc._y =(target_mc._width-5)*k;
//trace(target_mc._width+"t"+target_mc._parent._rota tion)
target_mc.pictureValue = k;
target_mc._alpha = 50;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
this._alpha = 100;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 50;
thumbNailScroller();
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
///////////////////////////////////////////
and this code i used in thumbnail_mc to loop but its not looping just it just go to last image and stop there....
onClipEvent (load)
{
//ycenter=0;
speed=1/100;
}
onClipEvent (enterFrame)
{
var distance=_root._ymouse-ycenter;
_y+=(distance*speed);
if (_y > 455) _y=-123
if (_y <-455 ) _y=123;
}
so i just want to where ihave to change in the script to make it Thumbnail images AUTO loopable/ SCROLLABLE
View Replies !
View Related
Puzzle Pieces
Hi,
I just made a jigsaw puzzle and am trying to get the pieces returned to exactly the same position if they are placed incorrectly. The problem is that they do return but usually go right off the stage so it is impossible to place them on the puzzle again. This is the code I used..
onClipEvent (mouseDown) {
mx = _root._xmouse;
my = _root._ymouse;
for (x=0; x<6; x++) {
for (y=0; y<4; y++) {
piece = _root[x+"-"+y];
if (piece.hitTest(mx, my) and (piece._alpha<100)) {
piece.startDrag();
x = 6;
y = 4;
break;
}
}
}
}
onClipEvent (mouseUp) {
stopDrag ();
dx = _root.outline._x-piece._x;
dy = _root.outline._y-piece._y;
dist = Math.sqrt(dx*dx+dy*dy);
if (dist<10) {
piece._x = _root.outline._x;
piece._y = _root.outline._y;
// set to full color
piece._alpha = 100;
else (dist>10)
piece._x = mx
piece._y = my
}
}
View Replies !
View Related
Time In Pieces
Hello,
I want to create a screensaver that indicates the time, but not with text but with graphics. For that I've already created a movie that checks which number a certain variable is, and then through linkage it changes the instance to another... .
Now my question is: How can I put the time in my variables?
I work with 6 variables: 2 for the hours, 2 for the minutes and 2 for the seconds. Everything is put on the first frame and I use flash MX.
A second question: I will be exporting this movie as a projector from out of Shockwave studio 8.5. Will it be able to be seen on every computer, because the linkage script is strictly MX... ?
greetings, Robin
Any better solutions are also welcome.
View Replies !
View Related
Puzzle Pieces
hey I'm making a puzzle game and i want the pieces to "lock" in the right place if they're near where it should be. It's a fairly big puzzle but i really need help with the script. right now i have it where they have to be exact and it isn't working out to good due to exact placement. Thanks for your help.
View Replies !
View Related
Puzzle Pieces
hey I'm making a puzzle game and i want the pieces to "lock" in the right place if they're near where it should be. It's a fairly big puzzle but i really need help with the script. right now i have it where they have to be exact and it isn't working out to good due to exact placement. Thanks for your help.
View Replies !
View Related
Puzzle Pieces
hey I'm making a puzzle game and i want the pieces to "lock" in the right place if they're near where it should be. It's a fairly big puzzle but i really need help with the script. right now i have it where they have to be exact and it isn't working out to good due to exact placement. Thanks for your help.
View Replies !
View Related
Puzzle Pieces
hey I'm making a puzzle game and i want the pieces to "lock" in the right place if they're near where it should be. It's a fairly big puzzle but i really need help with the script. right now i have it where they have to be exact and it isn't working out to good due to exact placement. Thanks for your help.
View Replies !
View Related
Puzzle Pieces
hey I'm making a puzzle game and i want the pieces to "lock" in the right place if they're near where it should be. It's a fairly big puzzle but i really need help with the script. right now i have it where they have to be exact and it isn't working out to good due to exact placement. Thanks for your help.
the .fla is located here...
http://www.geocities.com/allisan16/Puzzle.fla
View Replies !
View Related
Losing Pieces Of .fla
hello,
ive been working with someone else on a flash project and whenever i take my fla file, which includes a video, and put it onto a shared drive or burn it for this other person to take and update it is missing layers and the video. it just seems real messed up.
has this happened to anyone else?
this actually happened with someone else at another location too.
could it be my computer or install?
View Replies !
View Related
Loading Pieces?
I feel so stupid asking this question since it seems like the answer should be obvious or easily found somewhere but, here I am asking anyway.
I'm in the process of redoing a portfolio site in flash and I don't want it to get too big, at least the initial download.
So my question is this: How do you load a part of a movie? I've seen it done in tons of places, so I'm sure it's pretty common practice now.
It would work like this: Load initial movie, then when you click on a part of the nav it would load that section or, if individual flash projects it would load that project, with a loading bar or whatever letting the user know how long it would take.
Please help - sorry for such a stupid question
Crystal
View Replies !
View Related
Help On Counting Pieces...
Hi! Lets say we have 3 pieces of pizza (movie clips: 1pizza, 2pizza, 3pizza)and we want to share them to 3 children (movie clips: 1child, 2child, 3child).
When i drag & drop the pieces on the children, i want somewhere on the children's body to show how many pieces each of them ate.
Thanx a lot, your help here is very precious
View Replies !
View Related
Two Pieces Of A Puzzle.
Hi All,
Another silly question by a newbie.
Imagine having two piece of a puzzle. They are two movieclips.
I near them so that they fit well, my problem is that one of this piece hide part of the second because movieclip are rectangular.
Is a a transparency problem or whatever?
How can avoid this?
Thanks a lot.
View Replies !
View Related
Two Pieces Of A Puzzle.
Hi All,
Another silly question by a newbie.
Imagine having two piece of a puzzle. They are two movieclips.
I near them so that they fit well, my problem is that one of this piece hide part of the second because movieclip are rectangular.
Is a a transparency problem or whatever?
How can avoid this?
Thanks a lot.
View Replies !
View Related
Jigsaw Pieces
Hi
I have been asked to create a load of jigsaw pices that need to be animated just simple teweens etc.
How would I go about drawing the pieces in flash, does anyone have any examples or templates, or how I would draw it in flash?
Help!!
Thanks
View Replies !
View Related
Preloading In Bits & Pieces....
Hi, all - I have a Flash file I'm making for work, and it's getting kind of large for users that may have a dial-up. I have a pre-loader on the beginning of the movie (one I got from a tutorial on Programming By Art), but I was wondering if there was a way to maybe preload like 200k or something, and then as the movie was going have the rest being loaded in the background?....
If this is confusing, I basically just wanna have the user interacting with the beginning of the presentation I've made, while at the same time the middle and end is loading - so that they don't have to sit through like the movie's entire 2MB or whatever before beginning....
Even dividing the presentation into like segments where they preload one part, then interact with it, then preload another part, then intereact with THAT, would be okay I guess....
My file is 550kb now, so I can't attach it as an example, but you can view it so far online at:
http://anixter.iperformonline.com/co...er/process.swf
That might make it clearer what I'm getting at - thanks!!!....
View Replies !
View Related
Preloading In Bits & Pieces....
As a disclaimer, I had posted this in the "newbies" forum a few days ago, and have not gotten an answer - I know I'm not supposed to post the same thing in multiple forums, but my original post is a few pages down in "Newbies", and I don't forsee anyone there helping me. Plus, it's probably an actionscripting thing anyways, and I'm REALLY in need of an answer!!!....
Hi, all - I have a Flash file I'm making for work, and it's getting kind of large for users that may have a dial-up connection. I have a pre-loader on the beginning of the movie (one I got from a tutorial on Programming By Art), but I was wondering if there was a way to maybe preload like 200k or something, and then as the movie was going, have the rest being loaded in the background?....
If this is confusing, I basically just wanna have the user interacting with the beginning of the presentation I've made, while at the same time the middle and end is loading - so that they don't have to sit through like the movie's entire 2MB or whatever before beginning....
Even dividing the presentation into like segments where they preload one part, then interact with it, then preload another part, then intereact with THAT, would be okay I guess....
My file is 7000kb now, so I can't attach it as an example, but you can view it so far online at:
http://anixter.iperformonline.com/co...er/process.swf
That might make it clearer what I'm getting at - thanks!!!....
View Replies !
View Related
Splitting One Variable Into Pieces
Is there a method to split one variable into different variables?
Ex: I have a text input field with variable "text" when I type for example "this ;should ;be ;split" I want the 4 words to be assigned to variables 1, 2, 3 and 4...
so that the ; is the point where it splits, can be any carracter, best would be the space.
It realy needs to come from ONE variable since this SWF will be controlled by an external app that can only take one variable...
Thanks a lot
View Replies !
View Related
|