Stuck With A Pre-loader Problem
Hi all, I'm a bit stuck with pre-loading an external swf, I know this is a common one but I've tried following some of the tutorials (http://www.kirupa.com/developer/mx/p...epreloader.htm & http://www.kirupa.com/developer/acti...cliploader.htm) and I still can't seem to get it right. I've got an online portfolio at www.reannaeddy.co.uk and 2 of my sections load external swf's one of which (ISTD section) takes forever to fully load so I want to add a preloader. The nav buttons goto different frame labels and then call the exernal swf into an empty MC. Is there any way to have the button going to the frame label and then the preloader start up rather than the button telling the preloader to start?? I really appreciate any help! AS isn't my strong point!!!!
Thanks in advance : )
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 12-02-2005, 09:01 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Really Stuck (pre Loader)
People,
Hi im nearly at the end of my project now this is the only thing I cant fix.
I am using a preloader that I have copied for one particular section on my site. Bearing in mind this preloader came for FK and has worked on all my other sections I really cant get my head around why it wont work here (Ive checked everything)
Ive posted it here before but the attachment didn't work so the file is now available from my site.
www.jasonalden.com/mixertest.zip
(74K)
If anyone can help me Ill be forever greatfull.
Muchos Thankos
Jasinio
www.jasonalden.com/mixertest.zip
Loader Starts The Gets Stuck
Can anyone view my site? Just loaded p and when i try to access on another machine to make sure it works it stops at helfway on the loader..
http://www.enhancedmediadesigns.com
I've triple checked that I loaded all files up to server
any help appreciated
Joe
Can't Edit Flash Fla/stuck At Loader
Hi
I am editing a flash fla but I am stuck at the loader 2 frame scene. I need to edit the rest of the flash template but I can't find the more of the frames. It says it has only scene1 with the drop down button.
can anyone tell how can I edit the remaining template because the fla is quite large 2.5MB where as the current scene is very small.
Thanks.
Load Jpegs In MC Stuck Stuck Stuck
ok i'm sure this is in another thread if someone wants to point me in the right direction i'd appreciate it.
question is.
i have a button that will load a jpeg into a mc. did that.
how do i get the jpeg to center and resize to my mc? mc is 300 x 480......
the site is for an art porfolio and this button/action will be repeated throughout the site
new to FLASH MX & actionscripting and it's driving me over the edge..................
[EDIT/CyanBlue]
Moved to the Flash MX ActionScript forum
Please state what your working environment is and
please post in the right forum
[/EDIT]
I'm Stuck, Probably Simple...but Stuck
alright i'm making an entire site in flash.
i have my main timeline that i have label on, that i'm trying to get my button to go to.
here's the deal:
main timeline -> movielcip -> movieclip (button inside this clip)
on the button inside this movieclip i have all my actionscripting (rollover, rollover and on release)
now on release i have: gotoAndPlay("_level0", "news");
news is my frame label on my main timeline, also frame 101.
but when i click on this button it does nothing, just sits there. hmmm.....
thanks.
Double Loader & One Instance Level Loader
Just sharing what I figured out.(which wasn't much but hey figured I'd post it anyway)
TASK1
I needed a preloader to load two seperate MC's into levels 1&2. Level 2 contains the interface which would change the MC on level 1.
TASK2
Once these two initial movies were loaded I then needed a single instance of a preloader that I could call upon for each subsequently loaded movie on level 1.
All the MC's have linkages so standard loaders would not start until 30%-40% of the MC was loaded.
I used a couple of files from oldnewbie.
http://odin.prohosting.com/~oldnew/f...ng/preload.zip
For TASK 1 I used the code from the above file but modified it a little.
I simply duplicated every line that referred to containerMC and called it containerMC2.Then at the end of the script instead of loading a single movie into level 0, I loaded the 2 MC's I had previously loaded into the containers onto levels 1 & 2. There's probably a much better way to do this - but it works
IF ANY OF YOU HAVE A BETTER SUGGESTION OR A WAY TO PRELOAD 2 MOVIES WITH LINKAGES INTO SEPERATE LEVELS WHERE THE PRELOADER MOVES FROM "Currently preloading movie 1" to "Currently preloading movie 2" WOULD BE AWESOME.
For TASK 2 I used another file from oldnewbie (though I can't recall which thread I found it in).
It's a One Instance Preloader for all subsequently loaded swf's.
The button code for loading a movie:
on(release) {
_root.preloader.gotoAndStop(2);
loadMovieNum("One.swf",1)
}
The preloader code:
FRAME 1
stop();
FRAME 2 (where the symbols are - same symbols as in the .zip file above)
this.onEnterFrame=function(){
//trace the percentage of the movie that has loaded
percent=(_level1.getBytesLoaded()/_level1.getBytesTotal())*100;
if(!isNan(percent)){
//trace(Math.ceil(percent)+"% loaded");
if (percent == 0) {
percent_display = "";
} else {
percent_display = Math.ceil(percent) + "% LOADED.";
}
this.loadbar._visible = true;
this.loadbar._xscale = percent;
if (percent > 1) {
this.reelmc._visible = true;
}
_level1.stop();
}
if(percent == 100){
this.gotoAndStop(1);
delete this.onEnterFrame;
this.reelmc._visible = false;
percent_display = "";
this.loadbar._visible = false;
_level1.play();
}
}
stop();
That's it. If you can use it, great.
Simple Loader Fails When Loading In An .swf Containing The Loader.
Sorry for the complicated topic. I got a .swf that loads in other .swfs. Rather than figuring out how to make a loader for loading .swfs I thought I'd just use a simple loader in the .swf I'm loading.
However, it doesn't work. It starts fully loaded but doesn't finish. Heres the AS:
ActionScript Code:
_root.stop();
PercentLoaded = _root.getBytesLoaded()/_root.getBytesTotal()*100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
_root.play();
}
Anyone got a clue? Or would anyone be willing to point me in the direction for a very simple .swf loader.
thanks!
Simple Loader Fails When Loading In An .swf Containing The Loader.
Sorry for the complicated topic. I got a .swf that loads in other .swfs. Rather than figuring out how to make a loader for loading .swfs I thought I'd just use a simple loader in the .swf I'm loading.
However, it doesn't work. It starts fully loaded but doesn't finish. Heres the AS:
ActionScript Code:
_root.stop();PercentLoaded = _root.getBytesLoaded()/_root.getBytesTotal()*100;if (PercentLoaded != 100) { bar._xscale = PercentLoaded;} else { _root.play();}
Anyone got a clue? Or would anyone be willing to point me in the direction for a very simple .swf loader.
thanks!
Loader Page - Web Site Starts Behind The Loader
Hey Everyone...
i ran into a very odd problem... to loader page on this site:
http://www.onefortheditch.com/new/loader.html
works fine, except the fact that it doesnt stop the web site from playing while its loading. the web site plays the splash page in the background while its loading...
Any ideas what would be causing this? I use this same feature on my personal site, and it works fine, so i compared codes, and i cant see anything wrong.
Heres the native files if anyone wanted to check it out:
http://www.onefortheditch.com/loader.zip
Thanxs in advnace!! :)
Random Flv Loader + Radom Swf Loader
so i am making a flv player with an flv ad at the beginning, the main flv in the middle, and a swf ad at the end. the issue i have is that the flv ad at the beginning has to be randomly selected from a short list of flv ads in a network folder and the swf ad at the end is a click-able flash animation that has to correspond with the flv ad at the beginning.
so for example:
i have a video flv and swf ad pair for a window company, a restaurant, and a shoe store. when someone loads the video player, the shoe store flv ad is randomly loaded, the main video plays, and at the end, the click-able swf shoe store ad loads.
does that make sense?
THANKS!
Loader Insid Other Loader,how Loadmovie?
Hello
on the stage i have a loader* that shows a movie,in this movie there is a loader# too. in second loader# there is a button that by clicking it, the movie shown in first loader* must be changed.
please tell me how can i doing this with actionscript.........
cheers
Loader.unload() Not Available When Loader Is Not On Displaylist?
HI
I have a preloader swf file that loads in different swf-s using the same Loader instance.
However before loading in the next swf, I'm trying to call Loader.unload()
But it fails since the Loader object is not on the displaylist...
What happens to the data that is loaded with Loader? Is it replaced when Loader.load() is called next time?
ActionScript Code:
public function contentloaded(event:Event):void{
TweenLite.to(loading_mc, .5, {alpha:0})
cont = event.target.content
addChild(cont)
}
public function loadnew():void{
loader.unload() // Error #2025: The supplied DisplayObject must be a child of the caller.
if(cont){
removeChild(cont)
cont = null
}
showloader()
loader.load(new URLRequest(file))
}
Loader Or Loader Context Problem
I have two swf files, each one almost with the same classes, the most important one is a Singleton class, each swf does "singleton.getInstance()" . The diference is that one swf is like a container and the other one is like a module.
So when the container loads the module from an absolute path like loader.load("file://c:/modules/module.swf") or loader.load("
Using Stage Properties When Loader From A Loader
im doing a preloader that creates a var of the type loader and then loads another swf and add it to the stage with addChild, the problem is that the loaded swf cannot access stage properties and if i try to use them i get a #1009 runtime error, heres the code
----------PRELOADER-----------
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(Event.COMPLET E, done);
l.load(new URLRequest("test.swf"));
function done(e:Event)
{
addChild(l);
}
--------------------------------
and heres the test swf that is very simple
--------- test.swf -------------
var N:Number = stage.stageWidth;
trace(N);
--------------------------------
Hope someone can help this is killing me x.x
URL Loader & Loader LIMIT?
I'm trying to create photo gallerys and have run into a problem.
I have about 30 thumbnails that i wanted to load but the loader only loads 18 and the rest give me URL not found errors?
SO my question is does anybody know if there are size limits for the loaders??
Thanks
[loader] Load Jpg With Loader?
Hi, I making my website and trying to load jpg into a movieCLip which will holds all of my loaded jpg images.
I have a MovieClip called "holder"
and I want to load img into this clip. so I wrote
ActionScript Code:
holder.loadMovie("myPic.jpg");
this part I had no problem, but the thing is that How do I apply a preloader to this? I mean if this image is IN the movie, then I can have a preloader in the first frame and load this pic, but the thing is that I'm now loading this images directly from folder, how do I have a preloader for this?...
I tried this
Frame 1 preloader
Frame 2 load Image code...
just...you know what I mean?...when you load a image directly from folder, can you apply a preloader for that?...I stood up so late only because of this question..makes me so awake...HELP!!! I wanna sleep...
Um......................stuck
Hello
i am very new to flash and i have just heared about Actionscripting. goodness gracious me! staright over my head!
i was just playing around and seeing what i could do, so i tried to insert a date/time using a dynamic text box.
i know that i have to set the text box with the variable 'now_display'. i also know that i have to add:
onClipEvent (enterFrame) {
now = new Date()
now_display = now.toString()
}
to an instance of the movie. but i don't understand how. i right mouse click on the text box to select 'Action' but i can't have an 'onClipEvent' unless the text box has been converted to a movie clip, but when i do that, the option to add the variable 'now_display' disappears.
Also, i don't know how to add: now = new Date()
now_display = now.toString()
}
what do i select to add it? i can't find an action where i can add that text without little extra symbol (e.g. ; or /* etc)
please help!!!
adam
Help I'm Stuck
can somebody check out this site http://www.lane.com/index2.asp
once the site has loaded you will see a vertical scrolling picture bar, scrolls vertically according to mouse location.
Can someone tell me where i can find an in depth tutorial on this effect.
Many thanks
Phil
I'm Stuck You Try......
Okay my clients site http://www.cityclublife.com has a form to fill out so people fill it out and hit submit. a html page then pops up and tells the visitor that their info has been sent only it dosn't send it to my clients e-mail address.
I've done this many times for many clients but can't seem to get this one to work.
HELP PLEASE
HELP I'm Stuck
I have a menu with 3 links to other external flash files, each containing 3 different sections/frame labels.
this is the layout:
I have an index.html (with embedded index.swf) and portfolio.html (with embedded portfolio.swf)
I want the menu in the index.swf - which consists of three links (2d |3d |flash) to correspond to the 3 different sections/labels inside the portfolio.swf (2d, 3d, and flash)
how can I make this work with actionscript? PLEASE HELP!
PS: I don't need the loadmovie script, only what I described above. thanks a million.
[Edited by samige on 08-27-2001 at 04:31 AM]
STUCK...............................please Help
Hi,
Can anyone help with this...?
If I have a button located within in a movie clip, is there a way i can add a goto action whose target frame is in the MAIN TIMELINE rather than in the movie clip's timeline?
also, is there any way of adding a line of actionscript to a number of different buttons at once without having to go thru and type it out over and over?
many thanks in advance,
J
Im Stuck... Need Some Help Here...
ok
i got 2 .wav's i want to play in sequence.
i put each .wav within a movieclip
i play the first movieclip wit no prob but the second one just wont play.
it seems that within first movieclip every action i add or every sound i place AFTER frame 3 just wont work.
so what i need help wit is:
how do i make the second movieclip play right after the first movieclip has stopped?
(im hoping someone that knows actionscript or somethin would help me wit this)
thx
I'm Stuck
hy everyone,
i am making a web site and i need a hand.
i have a very width picture and i want to use the mouse to make the pictures moves left or rigth depends where the mouse goes.
* the picture is inside a strip.
thank you.
I'am Still Stuck
someone can suggest how can i make this:
how can i move the picture like this
http://www.center-of-the-world.com
the picture is in the wellcome page.
100000 thank u if someone can help me
Help I Am Stuck
I magine if you please;
I have a main stage that has 6 buttons on it , these link to a window mc that has win "max" and win "min"which obviously change the state of the window.My problem is one particular window opens external swf files within it.I am using an instance of my window mc called gallery which works fine. When the window loads it has
win="blank";
oldWin="blank";
startLoad="false";
movie="showreel1.swf";
stop();
This sets the varibles and loads up the swf and showreel 1 works.What i need to know is what action would i have to put on the button to load up a different swf?
i tried this
on (press) {
(content.gotoAndStop("hide"));
}
on (release) {
gotoAndPlay (1);
win = "blank";
oldWin = "blank";
startLoad = false;
movie = "showreel2.swf";
stop ();
}
the on press works but the rest will not i thought it would be a case of ressetting the variables at the beginning of the gallerymc but things are getting to heavy for the brain and therefore i am stuck!!
please help
Help I Am Stuck
I magine if you please;
I have a main stage that has 6 buttons on it , these link to a window mc that has win "max" and win "min"which obviously change the state of the window.My problem is one particular window opens external swf files within it.I am using an instance of my window mc called gallery which works fine. When the window loads it has
win="blank";
oldWin="blank";
startLoad="false";
movie="showreel1.swf";
stop();
This sets the varibles and loads up the swf and showreel 1 works.What i need to know is what action would i have to put on the button to load up a different swf?
i tried this
on (press) {
(content.gotoAndStop("hide"));
}
on (release) {
gotoAndPlay (1);
win = "blank";
oldWin = "blank";
startLoad = false;
movie = "showreel2.swf";
stop ();
}
the on press works but the rest will not i thought it would be a case of ressetting the variables at the beginning of the gallerymc but things are getting to heavy for the brain and therefore i am stuck!!
please help
Stuck
i'm making a new site.. how do u do the dragging into one spot then somthing will load. Like this http://www.theory7.com/splash1024.html
with the floopys
[Edited by RedAbode on 05-16-2002 at 06:46 PM]
Any One How To Do This I'M STUCK
Hello!!
I have a flash presentation (projector) that is to be used by travelling sales people.
They need to be able to launch the presentaion on their laptop before the meet their customer and fill in their name. then when they start the presentation, at certain points the customers name will be displayed.
Is this possible? Any one know what the actionscript would be?
I presume it will be using dynamic text although i'm not sure!
any help would be great!!!!
Thanx in advance :O)
Please Help I'M STUCK
Hello!!
I have a flash presentation (projector) that is to be used by travelling sales people.
They need to be able to launch the presentaion on their laptop before the meet their customer and fill in their name. then when they start the presentation, at certain points the customers name will be displayed.
Is this possible? Any one know what the actionscript would be?
I presume it will be using dynamic text although i'm not sure!
any help would be great!!!!
Thanx in advance :O)
Help I'm Stuck
I have a button that is nested in a movie clip which is set on the main stage, this button is supposed to load another movie clip on to the main satage as well, but I can't get it to work, I have tried attachmovie, loadmovie, emptymovieclip, and nothing seems to work.
Help me please...
Something I Always Get Stuck On....
I keep running into this same problem and I always think I know the answer, but it turns out I don't. And I know it's something simple I'm missing.
Basically I want to know how to tell Flash to check if two are things are true before it's allowed to move on.
I thought I could do this by putting two if statements within each other, like:
if (something here is true) {
if (this is true too) {
gotoandPlay(whatever)
}
}
But apparently that doesn't do it. What am I missing?
Please Help Me(I'm Stuck)
No need to tell you what I tried doing because I know it's not working. Here is what I want to do:
I have an image that I turned into a button on "scene1". I want this button to link to "scene2" on release.
How do I get that done?
Thanks very much for your help.
Please Help Me (I'm Stuck)
Thank you very much for you help.
Here is the problem,I have a scene that has several animated symbols and the scene is looped. HOW DO I STOP A SYMBOL FROM LOOPING WHILETHE OTHERS ARE LOOPING? I want every other symbol to loop apart from this one.
You Help Is Very Much Appreciated.
Cornelius
I Am Stuck
Hi alllll
i don't know how to resolve this. i don't write script coz i don't know how. if u tell me the easy and fast way to learn it, i would be thankful!
---------------------------------------------------------
I have this script i would like to add links to it,
they are four buttons, but i can't add that script link the buttons with the url ..how can i do that?
Michelle
here is the script:
fscommand("allowscale",false);
fscommand("trapallkeys",true);
// dichiariamo i valori di acc e smorzamento dei movieclip(s) che
// comporranno il nostro menu
MovieClip.prototype.acc = 3.9
MovieClip.prototype.smorz = 1.22
// ACTION FOR THE BUTTON
MovieClip.prototype.DoSomething = function(theClip){
trace("nome: " + theClip._name)
trace("valore: " + theClip.mov.txt)
// here you can add your script for the button action...
}
// label sui bottoni
nomi = new Array("E-Cards","Media","Fan Club","NEWS");
loghi = new Array("cubo","triangolo","ottagono","sfera");
max = 3
// creo il menu
for(i=1;i<=max;i++){
duplicateMovieClip("_root.menu0","menu"+i,i)
myMenu = _root["menu"+i]
myMenu.mov.txt = nomi[i]
myMenu.attachMovie(loghi[i],"logo" + i,(5000+i))
myLogo = eval("_root.menu" + i + ".logo" + i)
myLogo._x = -76
newColor = new getColor(myMenu);
}
_root.menu0.attachMovie("cubo","cubo",(7000+1))
_root.menu0.cubo._x = -76
// coloro i menu in modo differente
function getColor(what){
inizio += (255/nomi.length)/3
colore = new Color(eval(what))
alex = new Object();
alex = colore.getTransform();
alex.rb += inizio
alex.gb += inizio
alex.bb += inizio
colore.setTransform(alex)
}
Please Help Me (I'm Stuck)
How do I make a graphic or an movie clip play only once within the scene while the rest of the animation is looping?
I tried putting a [stop] action in the layer containing the clip but the entire scene stops and fail to loop.
Also I put a [stop] action within the movie clip object but this had no effect. I scene was still looping with everything in it.
When I save the object as an image, it doesn't allow action scripting within that oject, only in the layer.
Please Help Me!
Thank You Very Much!!
Cornelius
Really Stuck
I am trying to put in the code for a gearshift effect where ppl can navigate the site by changing into diff gears in which ever order., by dragging the gearshift . themselves. i tried all kinds of code from examples ive seen but nothing works..
http://users.bigpond.com/cmeany/LAMBOFLASH3.fla
is where my thing is at right now and it's been like that for a week ((((
Need help please.
Please, Please Help Me, Im Stuck
Well I have this fan page I have been working on, saddly I am stuck on the Lyrics page. I want the flash page to have the titles of the songs on one side, and in the other side when you click on the song name for the song lyrics to appear there. Please help me out as I am on the last stages of desperation. Yes I am a newby.
Thank you for anyone that reads this, or helps me out.
I'm Stuck
I am using Flash MX.
----------------------
I created an input text field in the middle of the stage.
...and this is where i need help.
How would a user type something in (their name), and when they pressed enter, their name would appear in the next frame??
In a nutshell, i would like to know how to go to the next frame when the enter key is pressed, and how to get their name shown.
whew! any help is appreciated.
I Am Seriously Stuck
Please Help. Below is my code. As is it will search the arrays (which are much larger) and return the first item that matches exactly the input (name). I am trying to get this to search to search even if the input is only a couple letters and return all results.
i can answer any other questions: chosenson@excite.com
**************code******************code********** *******code******************
Scene 1
actions for frame 1
muni = ["AGAWAM","ALFRED","AMESBURY","ARLINGTON","ATTLEBOR O","AUBURN SEWER DISTRICT",
"AUGUSTA WATER DISTRICT","AVON","BANGOR","BAR HARBOR"];
state = [ "MA ","ME ","MA ","MA ","MA ","ME ","ME ","CT ","ME ","ME"];
locate = ["HANGING FILE ",
"HANGING FILE ","HANGING FILE ","HANGING FILE ","HANGING FILE ",
"HANGING FILE ","HANGING FILE ","HANGING FILE ","RED ROPE ",
"HANGING FILE "];
actions for frame 1
stop();
actions for buton
on (release) {
i = 0;
while (name != muni && i != muni.length){
if(name == muni ){
}
i++;
}
_root.createTextField("file_loc",100,330,130,300,3 00);
file_loc.multiline = true;
file_loc.wordWrap = true;
file_loc.border = false;
myformat = new TextFormat();
myformat.color = 0x010283;
myformat.bullet = false;
myformat.size = 18;
if(muni == null){
file_loc.text = "The file *"+ name+"* appears to not be located on the premises. Please check your spelling to try again. Thank You."
}
else{
file_loc.text = "You have searched for "+ muni +", "+state +". It is a "+locate +".";
}
file_loc.setTextFormat(myformat);
}
**************code******************code********** *******co
I Am Stuck
I need help on this one people. I have a swf that is showing several buttons as it moves through the timeline. After so many frames, I have a loadmovie script in a frame. (This is giving the end user the ability to click on a button if they like, or wait and go into (The overview) another swf.) My problem is when I click on a button to goto a different swf...It will kick off the overview section. how can I stop the timeline from continuing in my first movie? I did try the unload movie script but no luck. Thanks!
Please Help I Am Really Stuck On This Just Need A Bit More Help
I started a thread earlier couldnt find it but I am really trying to get this script to work have learnt a lot of actionscript but I cant get it working.
I am adapting a tutorial on this site for circles collisions which was written in flash 4 and I am using mx also I am wanting to import it into another movieclip so that I can get it bouncing off the mc walls.
The tutorial is
http://www.flashkit.com/tutorials/Ac...u-74/index.php
I am not expecting for someone just to give the answer I am working to learn this stuff so I can pass on the help in the future.
I have changed the paths to dot notation and changed some of the code which is fla 4 to newer code = Mathramdom.
There is a bit of code here and a help of a lot of explanation which I have written but please spare some of your brain power 4 me!!
// ----------------------------------------------
// start move
// ----------------------------------------------
my_radius = (getProperty("", _width)/2);
// 'n' is always 'name' of circle.
my_x = getProperty("", _x);
my_y = getProperty("", _y);
my_n = getProperty("", _name);
if (Number(ymov) == Number("")) {
// *********************************
// ----------------------------------------------
// first run through code,
// this will initialize circle
// ----------------------------------------------
// *********************************
// pick a distance:
ymov = Number(Math.random(_level0.content.speed))+1;
xmov = Number(Math.random(_level0.content.speed))+1;
//
// pick a direction:
ysign = (Math.random()*2)-1;
if (Number(ysign) == 0) {
ysign = 1;
}
xsign = (Math.random()*2)-1;
if (Number(xsign) == 0) {
xsign = 1;
}
// adjust x and y movement
xmov = xmov*xsign;
ymov = ymov*ysign;
// ----------------------------------------------
}
// *********************************
// ----------------------------------------------
// check edges
// ----------------------------------------------
if (Number(my_x)<=Number(Number(my_radius)+Number(_le vel0.content.speed))) {
xmov = xmov*-1;
my_x = Number(my_radius)+Number(_level0.content.speed);
}
if (Number(my_y)<=Number(Number(my_radius)+Number(_le vel0.content.speed))) {
ymov = ymov*-1;
my_y = Number(my_radius)+Number(_level0.content.speed);
}
if (Number(my_x)>=Number(_level0.content.movie_width-my_radius-_level0.content.speed)) {
xmov = xmov*-1;
my_x = _level0.movie_width-my_radius-_level0.content.speed;
}
if (Number(my_y)>=Number(_level0.content.movie_height -my_radius-_level0.content.speed)) {
ymov = ymov*-1;
my_y = _level0.content.movie_height-my_radius-_level0.content.speed;
}
// ----------------------------------------------
// check for collision
// ----------------------------------------------
n = 1;
// start checking for collisions
while (Number(n)<=Number(_level0.content.total_circles)) {
// don't check myself
if (n ne my_n) {
n_x = getProperty(",," add n,_x);
n_y = getProperty("../" add n,_y);
n_radius = (getProperty ("../" add n, _width) / 2);
delta_x = (Number(my_x)+Number(xmov))-(n_x);
delta_y = (Number(my_y)+Number(ymov))-(n_y);
if (Number((Number(delta_x*delta_x)+Number(delta_y*de lta_y)))<Number(((Number(my_radius)+Number(n_radiu s))*(Number(my_radius)+Number(n_radius))))) {
// ----------------------------------------------
// handle collisions
// ----------------------------------------------
// I collided with circle 'n'.
nx = eval("_parent" add n add ":xmov");
ny = eval("_parent" add n add ":ymov");
// swap travel values with it.
tempx = xmov;
xmov = nx;
set("_parent" add n add ":xmov", tempx);
tempy = ymov;
ymov = ny;
set("_parent" add n add ":ymov", tempy);
set("_parent" add n add ":collision", my_n);
} else {
}
}
n = Number(n)+1;
}
// ----------------------------------------------
// move me
// ----------------------------------------------
setProperty("", _x, Number(my_x)+Number(xmov));
setProperty("", _y, Number(my_y)+Number(ymov));
// ----------------------------------------------
What possible things could I be doing wrong in this code?
As I have said before please give me a hand I will be very greatful for any help given
thanx
stef
Stuck In The Mud, Help
Say I have 3 symbols, each containing text.
1: profile
2: skills
3: contact
Each of the above symbols are placed on seperate frames, 1 to 3.
Placed above and spanning all three frames is a movieclip called 'transition'. This movieclip is 20 frames long.
What I'm trying to do is, when someone clicks on, lets say the skills button the 'transition' movieclip is activated. On the 10th frame I want it to say "_rootgotoAndStop(2);"
So I'm guessing that I have to pass a variable from the button on the _root timeline, to inside the 'transition' movieclip.
How is this done?
Help I'm Stuck
Hi everyone,
i am developing a flash game in Flash MX. The game uses 10 classes of objects, 2033 lines of code. Up until now I was able to work normally, but since today morning every change I have made in the script causes Flash to crash (even slight changes like changing "+" into "-" somewhere in the script).
Did anybody happen to encounter a problem like this one before?
Here I Got Stuck,,plz Help
i was trying to get a mp3 file from database for some time now i tried this but couldnt figure out whats wrong in this
code:
_________________________________________________
onClipEvent (load) {
var mySound = new Sound(this);
mySound.loadSound ("http://dotworld/grief/temp/flash/getsound.php", false);
//loadVariables("http://dotworld/grief/temp/flash/getsound.php", this);
}
onClipEvent (data) {
trace(mp3file);
mySound.start();
}
___________________________________________
i am able to see the output when loadvarables is active bt sounds not playing ,,could anyone complete this
thanx
Help... I'm Stuck
I'm learning flash as i go, to be able to build a site for my resume in flash... *hopefully that would impress employers*
Anyways, my problem is being stuck on making the buttons work! I don't seem to be able to find a good tutorial where it shows how to setup the button to change the display "text" area when released. Should I use separate SWFs, or is it something that i have to do on the main timeline? either way, I have no clue how to approch this problem, nor how to implement the solution.
here is the site: http://www.mikeaqel.com/
All comments are welcomed.
Still Stuck
Okay, now I'll explain in detail about what I'm trying to say so you can understand what I'm saying, (not that the previous help didn't help, thank you to those people that have already helped me out).
So, I'm trying to make it so when I use the hitTest command it moves the background image in a 'y' direction, so that it scrolls. What I mean is that when you hit the MC it background moves up or down, (also with the MC that hit the hitTest MC). But when it hits the 'y' line or 577 it stops scrolling and you continue moving with the base MC (car). Also when you want to move it back I need help with how to make a MC that isn't there before you use the first hitTest to move it up, but when you want to go back down it is there to move the background image up. So you can contiously move the background image up and down infinite times, while also moving the car MC with the background.
My current code is below:
Car:
Code:
onClipEvent (load) {
_root.car.laser._visible=false;
laserCounter=1;
}
onClipEvent (enterFrame) {
_root.speed = speed;
if (Key.isDown(Key.UP)) {
speed += 1;
}
if (Key.isDown(Key.DOWN)) {
speed -= 1;
}
if (Math.abs(speed)>20) {
speed *= .7;
}
if (Key.isDown(Key.LEFT)) {
_rotation -= 15;
}
if (Key.isDown(Key.RIGHT)) {
_rotation += 15;
}
speed *= .75;
x = Math.sin(_rotation*(Math.PI/180))*speed;
y = Math.cos(_rotation*(Math.PI/180))*speed*-1;
if (!_root.boundary.hitTest(_x+x, _y+y, true)) {
_x += x;
_y += y;
} else {
speed *= -.6;
}
if (Key.isDown(Key.SPACE)) {
laserCounter++;
_root.car.laser.duplicateMovieClip( "laser"+laserCounter, laserCounter );
_root["laser"+laserCounter]._visible=true;
}
}
mainGround:
Code:
onClipEvent (load) {
scrollStart=false;
groundStarty = this._y;
}
onClipEvent (enterFrame) {
if (_root.area1a.scrollStart==true){
this._y+=10;
_root.car._y+=10;
}
if (_root.car._y >= 575.0){
scrollStart=false;
}
}
area1a:
Code:
onClipEvent(enterFrame) {
if (_root.car.hitTest(_x+x, _y+y, true)) {
scrollStart=false;
}
}
I have also attached the .fla (zipped) file with this post, if you would like to see what I mean if you don't understand this post.
Also, if you would like to help me even more, you dont have to but, could you help me fix up the laser hitting boundary MC and stopping it from going any futher and also the frame rate on it is differnt from the rest of the flash, (not included to decrease file size).
Stuck On If - Else
If - Else help ???
I have a quiz where the user can choose more than one answer for six questions.
If they get the choice correct...a blinking "correct" mc appears over the correct answer(s). I have this working fine...
If they choose wrong however, a "wrong" mc appears over the selected wrong answer box, and if they fail to click a correct answer, a blinking "checkmark" mc appears over that box...
a lot of coding I know but it has to be done this way...
can someone help with the rest of this scripting...???
thnx...
I'm Really Stuck, Can I Get Some Help?
i need some help with my preloader... heres a link to the zip file that has the fla and xml file need to run.
http://www.lucidnight.com/Menuop.zip
here's alink to my other post that has a little more info.
http://www.flashkit.com/board/showth...hreadid=471088
if anyone can look at the file and see what i did wrong that would be great. thanx
A Little Bit Stuck
I am trying to figure out how to make my preloader work, I have never made one before but have looked at a few tutorials and think I get the swing of it. But I just wanna check to see if this will work.
In my movie there are two scene's 1)Preloader 2)Main. In the preloader scene I have made an 8 frame animation that I want to be my preloader. I want my preloader to work by checking two variables (bytes & bytes_loaded) against each other so that when the movie is loaded it plays the second scene. The code I think will work is as follows
SCENE1 FRAME1
var bytes = _root.getBytesTotal();
var bytes_loaded = _root.getBytesLoaded();
if (bytes_loaded == bytes) {
_root.gotoAndPlay("Main");
} else {
_root.gotoAndPlay("Preloader");
}
Is this script correct? I can't test it right now because im am not at home otherwise I would be asking why it doesn't work (if it doesn't of course)
Cheers
|