Really Simple Preloder
is there a really easy preloder script which takes up about 2 frames? ill put an MC in for the animation, i just want somethin simple cos its only for a web page, not the entire site.
Thanks
FlashKit > Flash Help > Flash MX
Posted on: 10-18-2003, 07:00 AM
View Complete Forum Thread with Replies
Sponsored Links:
- Preloder
- Preloder Like This...
- Preloder
- Preloder
- Please Help With A Preloder
- How 2 Add A Preloder ?
- How Would It Be Possible To Make A Preloder Appear....
- Preloder 3 Movies
- External .Jpg Preloder
- Preloder Question
- Percentege Preloder
- Percentege Preloder
- Preloder Problems( Not Showing)
- Preloder Works In Simulation But On The Web
- Preloder - Macromedia Style
- How To Get The Flv Files In Preloder Method?
- Help With Second Preloder Inside Main Movie
- Preloder Headache - Dynamic Preloader
- How To Make A Preloder Inside Of A MovieHolder
- Preloder For Multiple Movie Clips
- Attach Sound, Export In First Frame And Preloder
- Preloder ScaleX Property And X Property
- LoadMovie SIMPLE Question For Simple Minded Graphic Artist
- Can You Help Me Fix Simple Javascript Code On Button Inside My Very Simple Component?
- [F8] Very Simple Question, Very Simple Answer, I Hope. (Flash 8, Collisions)
- Can You Help Me Fix Simple Javascript Code On Button Inside My Very Simple Component?
- Simple Problem. Simple Answer? Arranging Windows W/flash
- Random Tweens - Simple Question, Simple Answer?
- HELP SIMPLE, SIMPLE XML-FLASH Load Into Movie Clip
- Simple Problem Neeeds Simple Answer
- Simple Question, Probable Simple Answer
- Simple Button Mouseover Effect - I Know It's Simple, Just Don't Know How To Do It
- Simple Button, Needs Simple Action Script
- Simple Question - Simple Answer FLASH MX
- Simple, Simple... Input Field Question
- Simple Question *(I Hope) From A Simple Newbie...
- Simple Questions...mean Simple Answers....right?
- Simple Question.....any Simple Answers?
- Simple Problem Simple Solution?
- Simple Problem, Simple Movie
- Simple Question - Simple Answer?
- Need A Simple Script For A Simple Button
- Simple Question With Hopefully A Simple Answer.
- Simple Problem In Need Of A Simple Solution
- Simple Or Not So Simple GetURL() Problem
- SIMPLE Simple Actionscript Question
- Simple Loadvariables Task Not So Simple... Why?
- Simple Questions From A Simple Person
- [CS3] Simple Image Loop Not So Simple
- Simple Answer For A Simple Question?
- Simple Question...simple Answer
Preloder
needhelp with setting for preloder to go directly to amin page, I have everything working in my flash movie, the only part i'm having trouble with is when it says accesing site in my movie - I can't get to go to main page smothley. Can anyone help??????
View Replies !
View Related
Preloder Like This...
hey, just wondering if anyone can direct me to a tutorial or paste in some script on how to do a preloader like on this site:
http://www.gridplane.com
basically i'm after a really smooth preloader, as i'm having problems with mine being too clunky and also my loadbar doesn't reach 100% properly—i've just fudged it for now.
http://www.atype.com.au
here's the currect script i'm using:
Quote:
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
loadBar._width = per*9.43;
if (percent>99) {
_parent.gotoAndPlay(2);
}
}
cheers
iota.
View Replies !
View Related
Preloder
does any one know how to add a swf movie after a preloder loads if you can tell me the action script that would be cool and where to place it thank you
View Replies !
View Related
Preloder
whats up everyone i had a problem with some preloders not playing the movie right and i was asked to put the swf files here . one has the preloder and the other has the movie it is supposed to plane any help would be great thanks
View Replies !
View Related
Please Help With A Preloder
Preloader
Hi!
I wonder why this code don't work?
Here's the code:
Code:
onClipEvent (enterFrame) {
_height+=_root.getBytesLoaded()/_root.getBytesTotal()*79;
}
Can it be something with that that the code is in a movieClip in a mask?
thanks Albert
Love this smiles
View Replies !
View Related
How 2 Add A Preloder ?
hies
my prob is simple but i can't get itz ans anywhere
okies so hope i get it here
i don't know how to add a preloader into my movie
i used to make a loadin' sequence and then the main page comes
but tatz not right
i want people 2 see the loadin' clip while the site is loadin'
plz iif u know do reply
thanx
View Replies !
View Related
Preloder 3 Movies
I've got on one page 3 different movies, now I want to have 1 preloder in front of that page because it takes an different amount of time to load the movies.
How can I create a preloder that doesn't stop before all other 3 are loaded?
View Replies !
View Related
External .Jpg Preloder
Hey, the tutorials and other question i have found here haven't really helped. I want to create a preloader that can be duplicated (not necessary yet) and loads an external images.
Can any one get me of the ground with this one?
any help would be greatly appreciated, thanks.
View Replies !
View Related
Preloder Question
hi,
I want to do a preloader and are a bit confused. some use different scenes and some place the preloader in the first keyframe. some use a own swf-file for the preloader. I wonder whats the difference? Is one solution better than the other?
I really want to know what you think before I decide in what way I do my preloader.
I also wonder if you have to use ifFrameLoaded because all in my mainmovie is in one frame. it must be possible to load the movie without counting the frames.
/vicky
View Replies !
View Related
Preloder Problems( Not Showing)
I made a prealoder, my code is pretty simple and it works perfect with the file were I have a static image in second scene. But when I place the prealoder into more complicated file were I also have two scenes (all my second scene movie clips sitting in library and actions calling them to play) Preloder not showing up.The movie plays (after download completed) but ignores the preloader... there is some conflict.
Here is my preloder:
first frame action-
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
ifFrameLoaded ("Scene 2", 60) {
gotoAndPlay ("Scene 2", 1);
}
and my next frame, same scene:
gotoAndPlay (1);
and in second scene there is no actions in the Timeline( only "stop()" at the last frame were it has to be anyway.
Do you thing I'm missing something?Maybe You know anybody who could help.
Thanks in advance
Irina
View Replies !
View Related
Preloder Works In Simulation But On The Web
A while ago I found on another board a nice piece of preloading code for multiple images. It seemed to be working great until I've actually posted the swf on the web. The text field displaying the loading progress in % started showing NaN until about 85-90% of the totalbytes were loaded. This would coincide with the first image actually popping up. This does not happen in a simulation mode: the first image shows up at the same point but the percentage is displayed correctly way beforehand and grows steadily from ~5 to 100%. I think the reson behind this behavior are dynamically created emptyMovieClips that are being used for loading images. Preloader must be getting confused every time the new one pops up and resets itself to NaN. I tried to include a line of code that would correct it but it doesn't seem to be doing anything. I'm not emotionally attached to this script so if anyone has suggestions for a preloader that would grab images from the external folder while displaying the progress in percentage I would appreciate.
code:
//number of images to be displayed:
srcL = 10;
//source of Images for a gallery:
imageFolder = "Graphics/Gallery_1";
var Images = new Array();
for (i=0; i<=srcL; i++) {
Images[i] = [imageFolder+"/image"+i+".jpg"];
}
// create one clip for each movie
// and load the movie into each one.
for (var i = 0; i<Images.length; i++) {
var tmp = this.createEmptyMovieClip("clip"+i, i);
tmp.loadMovie(Images[i]);
}
// now set up an onEnterFrame event
// to continually check the load progress
// and update the bar clip
this.onEnterFrame = function() {
var stat = 0;
// initial status
for (var i = 0; i<Images.length; i++) {
var tmp = this["clip"+i];
stat += (tmp.getBytesLoaded()/tmp.getBytesTotal())*100;
}
stat /= Images.length;
// get the average status value
if (isNan(Stat) || tmp.getBytesTotal()<8) {
return;
} else {
this.bar._xscale = stat;
// set the width of the bar to reflect the load status
this.txt.text = Math.round(stat)+"%";
trace(stat);
// if the load is complete, cancel the onEnterFrame
if (stat == 100) {
delete this.onEnterFrame;
}
}
};
stop();
View Replies !
View Related
Preloder - Macromedia Style
hi all,
i'm looking for a preloader like the one macromedia have (or used to have?) - the arrow circling around with a slight fade in it's tale end.
i'm wondering if anybody has ever come across one like this?
thanks!
jose
View Replies !
View Related
Help With Second Preloder Inside Main Movie
Hi guys.
Ive followed some tutorials and got my main preloader running correctly, still needs a tidy up but works.
There is a movie in the root folder of the site that is called by the spec sheets button...it is a big ish movie so ive used the identical preloader for it with some taxt changes.......it works fine on my system but when online the bix of the preloader appears but it runs incorrectly.....im realy puzzled....??
If any one can help the site is located at
http://www.deveronside.co.uk/staffy/
and the button in question is the one for spec sheets
Thanks in advance fpr any suggestions
Les
View Replies !
View Related
Preloder Headache - Dynamic Preloader
OK, What I`m doing is,this:
I have a movie which creates serval movieclips which then will be used by a controller Movieclip to load other external swfs into them.
This controller movieclip is itself effectively a preloader. Actually everything works fine, save one problem:
The preloader pops up, doesen`t show any loadingprogress, the target movie in whom the external swf is being loaded disapers, there is nothing for a moment. Then according to connection time the requested movie appears.
What might be the reason of this ? All suggestions / ideas / Xtremly welcome !!!
You might watch the effect at spade-trading.com
Unfortunately I'm not at Work (it`s 1 O Clock in the Morning in Germany) right now, but rather keept from sleep by this Problem.
This Is why I can`t post any code right now...
View Replies !
View Related
Preloder For Multiple Movie Clips
Hello there.
I'm building a website where i have 9 thumbnails on the main time line
What i want to achieve is to press on the thumbnail which will redirect to
a movie clip each time fairly big in size and have a preloader for each thumb. Load the content before it enters the first frame of each movie clip since the content is fairly big in size.(3d animation)
Can you suggest something please
Thx:)
View Replies !
View Related
Attach Sound, Export In First Frame And Preloder
Hello. i use MX (6) ver. of Flash and I am working on slide show with sound background. I use attache sound method to play sounds. But.
Attached sound work only when i allocate
-Export for ActionSript and
-Export in first Frame.
And problem is all lincked sounds starts loading in very begin. So my preloader doesnot work well. Cuz preloader starts work only when sounds are loaded. To escape this problem i could not allocate -Export in first Frame. But in this case attache sound method doesnot work.
I see only one exit now. Create preloader and main movie in different swf but it is not i really want. How to use attach sound method with linked sounds but do not allow them load in first frame?
Thanks
View Replies !
View Related
Preloder ScaleX Property And X Property
Hi!
within the loader listener's progressevent I had my preloader mc update the scaleX property and works fine, thus, it moves and scales just like a preloader does until it reaches 100. My only concern is when scaleX updates the preloader mc 'x' location seems to be moving as well making the preloader clip looked liked it scales on both sides (both ends of the line). As i examined the preloader mc 'x' property it stays the same all throughout. This is weird.
anyone?
thank you in advance.
View Replies !
View Related
LoadMovie SIMPLE Question For Simple Minded Graphic Artist
OK! So this will be EASY EASY for all of you.
I need to load a seperate SWF file onto the stage on a level above the main swf.
the seperate SWF file is in the same folder as the original all located in the "flash" folder of the root directory.
How do I get th e outside SWF to load on top of the movie.
The original movie is called grid.swf the outside movie is called liquid-print.swf
If anyone can help me with giving me the code I'd appreciate it. I really am quite dense when it comes to coding.
View Replies !
View Related
Can You Help Me Fix Simple Javascript Code On Button Inside My Very Simple Component?
Flash MX 2004 (mac)
******************
Hi,
I have a custom component that consists of nothing more than two dynamic text feilds and a button. I want the button to open a popup window in the browser, and it does so using javascript (an extension i found).
I put the following function in the first (and only) frame of my actual component (and its also in the first frame of my entire movie, just in case):
callPopup = function() {
getURL(popup);
};
And then on the button in my component i have this:
on(press){
callPopup();
}
and then finally,there is a variable named 'popup' within my component (which would change in each instance) which is given a value in my test instance as :
"javascript:jspw3('../vwd_scripts/','popups/acroyoga.swf',',,0,Past%20Event,index,Past%20Event ,20,0,,0,450,550,0,0.001,0.001,,,1,0,,.0.0.');"
somewhere i am doing something wrong.. ..i am not sure if its the button code, or my link (variable 'popup') syntax. Or if its impossible to use javascript in this way.
I know my html page is set up correctly (correct info in the head of the page etc), since i am able to call the javascript from a regular html link (just for testings sake) which is on the same page as my swf.
Hmm..i hope i made some sense here.
I will be very gratefull for some help...i'm totally lost on this one...
thanks in advance
Cheska
View Replies !
View Related
[F8] Very Simple Question, Very Simple Answer, I Hope. (Flash 8, Collisions)
Alright, so I've got my ball that moves up and down; it has gravity too. There are two things I want to do:
1. I want it to 'jump' when the UP key is pressed, rather than just accumulatively move upward.
2. I only want gravity to be applied while the ball is in the air(In other words, I basically just don't want it falling through the floor; however, want the edges to be the collision, not the center, and I also still want to be able to jump afterwards.
Thanks for any help, I don't need an explanation, I can figure it out by looking at the code. I'm going to attach a basic file with what I already have, please add the coding to it, then send the file back. Thanks for any help, and I apologise if this is hard to understand, or if I sound any bit rude to be asking how to do something; I don't mean to.
View Replies !
View Related
Can You Help Me Fix Simple Javascript Code On Button Inside My Very Simple Component?
Flash MX 2004 (mac)
Hi,
I have a custom component that consists of nothing more than two dynamic text feilds and a button. I want the button to open a popup window in the browser, and it does so using javascript (an extension i found).
I put the following function in the first (and only) frame of my actual component (and its also in the first frame of my entire movie, just in case):
callPopup = function() {
getURL(popup);
};
And then on the button in my component i have this:
on(press){
callPopup();
}
and then finally,there is a variable named 'popup' within my component (which would change in each instance) which is given a value in my test instance as :
"javascript:jspw3('../vwd_scripts/','popups/acroyoga.swf',',,0,Past%20Event,index,Past%20Event ,20,0,,0,450,550,0,0.001,0.001,,,1,0,,.0.0.');"
somewhere i am doing something wrong.. ..i am not sure if its the button code, or my link (variable 'popup') syntax. Or if its impossible to use javascript in this way.
I know my html page is set up correctly (correct info in the head of the page etc), since i am able to call the javascript from a regular html link (just for testings sake) which is on the same page as my swf.
Hmm..i hope i made some sense here.
I will be very gratefull for some help...i'm totally lost on this one...
thanks in advance
Cheska
View Replies !
View Related
Random Tweens - Simple Question, Simple Answer?
Hello, I have one swf with a few different motion tweens inside their own movie clips. I want to write some code to play only one of the tweens at random. I know how to use setInterval to get the process to repeat with a delay. But I just want a different/random tween to play with each repeat. I hope that makes sense.
I imagine this must be easy, but I'm having a tough time getting it to work. Random tweens, somebody please help.
View Replies !
View Related
HELP SIMPLE, SIMPLE XML-FLASH Load Into Movie Clip
This is so stupid, my first dive into XML, with a company project - a tutorial/training piece which will require mjultiple screens with questions, etc.
Anwyay- I can get the XML loaded into the root, and it works pefectly, but I'd like to put things INTO a movie clip, so that each new screen or slide is just he movie clip advancing.
How the HELL do I target the movie clip? I even tried setting a NEW variable in teh main timeline once the XML was loaded, but the best I get is not the value from the XML, but the path (e.g. "level0title1")
Any help? I imagine it's a really stupid, easy question, but I can't find anythign ANYWHERE to answer it.
View Replies !
View Related
Simple Problem Neeeds Simple Answer
hey i figured one of u geniuses here could help me figure this out much faster than me fiddling around so here goes.
All I'm trying to do is have a button (which is loaded in an MC in _level6) allow the user to switch between languages on the website. To do this I figured all I would do is have it 2 scenes...one in English and the other in Chinese. When the user clicked the toggle button I would have it go to the current frame in _level0 but switch to Chinese scene.
Get it? basically i want it to switch between frames but remain on the same frame number. Here is the last piece of code I tried using, but nothing seems to work (this code is connected to the release of the toggle button)
Code:
_level0.gotoandplay("Chinese", _level0._currentframe)
Anybody got any idea what i need to do??
Thanks for your help!
Brad
View Replies !
View Related
Simple Question, Probable Simple Answer
still in my quest for new flash knowledge and being a "noobie" in the world of flash i would like help.
whats the easiest way to create a Button that upon rollover creates a text discription in a text box. just so i can give a description of what the button is going to lead to....
ohh and i will have multiple bittons on 1 frame and 1 designated box for all descriptions
thanx in advance
View Replies !
View Related
Simple Button, Needs Simple Action Script
Hi there,
I have made button in flahs mx. The over state of this button contains a short movie clip. My prblem is that I would like the button to remain on the down state on release (ie. once the user has released the mous button)instead of just going back to the over state as it does at present. Ideally I would like the button to go back to the up state on a second click.
I have pulled most of my hair out trying to put together the right bits of action script that would help me do this but to no avail, and having no time to learn action script properly I don't think I'll get there anytime soon on my own. Can anyone help me, pretty, pretty please ~?
View Replies !
View Related
Simple Question - Simple Answer FLASH MX
hi you good people out there. hope you could help me too. using flash mx, not beyond beginner yet.
about finishing my homepage with it. one problem is there:
i have a premade flash and changed graphics, etc. all no problem, the menu is included as well - i have changed the text of the 9 menus already, works fine - only when i use the preview - the original text appears when going over with the mouse... i changed the text visible to me - but cannot locate and change the text for the mouse over.
for instance the first two of the menu named
start
gallery
i changed it to
home
pictures
in the prview it show again
start
gallery
upon mouseover.
so i need to locate where to change also that hidden text (only active upon mouseover) to the same word.
if anyone of you could help me - i would be going into learning faster and finally getting my homepage up and running. if needed please e-mail me at
harton@harton.at
thank you so much!
....................I have uploaded a screenshot of it - clearly you can see, I changed the text yet have to located the original text below of it (?) and write the same text so that it shows up correctly upon mouseover.....
View Replies !
View Related
Simple Question *(I Hope) From A Simple Newbie...
Hi All... well, since this is my first post, I'll be cordial by saying hey and how are ya and all that later (sorry) but I'm in a bit of a pickle, or at least a cucumber that's been sweatting his luck for a while. I'm trying to create a news ticker that autoscrolls events accross the bottom of a movie, and allows users to click the text to take them to the appropriate page / site / picture or what ever (just need the link. I'm running into issues with the xml connector loading data dynamicly, I can get the file loaded, but I can't move it accross the screen. Basicaly, I'm looking for a basic news ticker tut or else the appropriate google keywords. Anyone? Anyone? Bueler? Please?
Thanks in advance.
Rick
View Replies !
View Related
Simple Questions...mean Simple Answers....right?
I just have a question about the various ways to loop in Flash.
now I know the for, and the while, and the do while,etc. My question is I can never get any of these loops to work unless they are on the main timeline. If I put a for loop inside a movie clip, i get nothing, or errors of the script continually running.
Just wondered if and how to use a loop script inside a movieclip without generating errors, and not having to revert to making the movieclip continually play two frames to get what I want.
curious.........
dduck1934
View Replies !
View Related
Simple Problem Simple Solution?
Can someone who is smarter than me (plenty of you out there ) solve my problem. I have a button on the timeline that has a gotoAndPlay action. I have another action that advances the timeline to the nextframe to execute some actionscript then it returns to the previous frame where the button is. The button works the first time but after going to the nextframe and then coming back it loses its functionality. What can I do to restore functionality in my button. Oh i'm using MX but publishing in 5. Can someone please save the day?
million thanks
View Replies !
View Related
Simple Problem, Simple Movie
i have a simple movie (using MX) with one scene and a handful of movie clips on individual layers. i am using this to jump from clip to clip in main timeline
_root.MCmyclip.gotoAndPlay (1);
the movie plays fine the first time through. but when i need to return to the first MC again it plays but then stops and does not move on to the next clip? like this:
in the final MC i have:
_root.MCfirstclip.gotoAndPlay (1);
it goes to first clip and plays but does not moveon when encountering this action for the second time:
_root.MCsecondclip.gotoAndPlay (1);
i don't understand why this is happening. it should just loop continuously...right?
View Replies !
View Related
Simple Question - Simple Answer?
I'm looking to do something basic to start off with Flash - and I'm hoping this is the project. Basically, I'm looking to have a movie with an image (or images) that will fade in and out over a set period of time - as seen in this website.
http://www.westonfl.org (The pictures on the left - yes I know, this was done by 2advanced....)
Any help you can give, would be great. The more detailed the better.
Talk to me like I'm 5.
View Replies !
View Related
Need A Simple Script For A Simple Button
Hi,
I've got this simple button, that when I roll over it has a clip that fades in to orange, but it won't fade out when I roll off the button. How do I get the "orange" to fade out when I roll off the button?
I've attached the file.
Thanks for your help.
Blastbum
View Replies !
View Related
Simple Question With Hopefully A Simple Answer.
Ive only just started making games in flash and im wondering how i can make it so my little birds eye view character can be stopped from running into buildings... in other words i want to make my buildings so you CANT walk on em or under em!..
haha im hella nOOb i probably sound like a loser.. but if you could waste your time on me it would be greatly apreciated!
CHEERZ 1337 Hax0rz.
View Replies !
View Related
Simple Problem In Need Of A Simple Solution
I know this is long...grab the FLA and test it, and it will all make perfect sense. Thanks in advance for the help.
I have a vertical menu that has one arrow (A1) that eases to the selected section after you click on it, and another arrow (A2) that eases to each button when you rollover it. So you rollover a button, A2 eases to it, click it, and the A1 eases to that. I have A1 and A2 set to ease to the y value of the button onPress. Here's where I run into the problem...The menu items slide up and down to reveal the content, so when I click on a button that has moved down to the bottom, the button itself eases up back into it's orignial position, as each arrow does the same thing. The way the functions are written to control all the motion only controls movie clips by buttons...so the top item in my menu is a button and works fine, since it never moves down. But I had to creat invisible buttons to control the motion of the other "buttons" in the menu. So pretty much to keep the right actions with each button, after pressing it, the invisible button moves to the new position of the menu item. This is what causes the problem. A2 is set to ease back to the y value of A1 on rollout, pretty much moving it back to the current menu item. So after pressing the buttons, A2 wants to ease right to the y value of A1, not to the y value it was told, which means the arrows don't line up like they're supposed to. This can be fixed by using onPress and holding it down. The clips ease right into position, but obviously this can't be used realistically. In theory all that would need to be done is to have the invisible buttons wait until the arrow was in position to move up there, that way the clip wouldn't react to the OnRollout before the OnPress.
I know this was long and confusing...I appreciate all your help very much, this has been stumping me for a while now!
View Replies !
View Related
Simple Or Not So Simple GetURL() Problem
ok basically i am trying to link a button so that when pressed it will bring up a javascript window, i have tested it and it the button works fine when used with regular sites
i.e.
on (release) {
getURL ("http://www.watever.com");
}
but when i try to implement Javascript into the code it just does nothing here is what i am using :-
on (release) {
getURL ("Javascriptopupwindow(1)");
}
<head>
<script language="javascript">
function popupwindow(index)
{
if(index==1)
{
site="http://www.whatever.com"
}
window.open(site,"newwindow","toolbar=0,location=0 ,directories=0,status=0,menubar=1,scrollbars=0,res izeable=1,width=100,height=200")
}
</script>
</head>
any help would be greatly appreciated cause i'm stuck
Rich
View Replies !
View Related
SIMPLE Simple Actionscript Question
Hey guys this is an easy one, but I don't know it.
I want to create a dynamic text box that says page 1 (or just 1). And every time I click the next button (which also controls something else), it should add 1. The limit is 4 pages so, if it exceeds 4, it should back to 1.
Thanks for the help
View Replies !
View Related
Simple Loadvariables Task Not So Simple... Why?
So I've got a site that I've built (see it here: http://www.artinmusic.com) and it uses a function I've written called 'changer()' to swap out different events using a folder with textfiles inside. So I plug in the name of the folder and the function pulls the info from "folderName/title.txt" , "foldername/description.txt" etc. Nevermind that I probably should have done this (much easier and less painless) with XML, that'll have to wait for the next round.
So- I want to have a variable that selects which event to display first, and I've stored that variable in a text file called featured.txt. It reads: featured=20050916
I figured I could just go :
loadVariables("events/featured.txt",this);
changer(featured);
but not so. I got a string of errors, as changer tried to load 'undefined'. ( Error opening URL "C:/etc/etc/undefined/description.txt")
Here's the code:
function changer(changerVar) {
/* DESCRIPTION BOX */
descriptionVar = "events/"+changerVar+"/description.txt"
getDescription = new LoadVars();
getDescription.load(descriptionVar)
getDescription.onLoad = function (success) {
if (success) {
/*trace("description Loaded")*/
descriptionBox.htmlText = this.description;
descriptionBox.scroll = 0;
} else {
trace("not loaded")
}
}
/* NOW TITLE BOX */
titleVar = "events/"+changerVar+"/title.txt"
getTitle = new LoadVars();
getTitle.load(titleVar)
getTitle.onLoad = function (success) {
if (success) {
/*trace("title Loaded")*/
titleBox.htmlText = this.title;
/*titleBox.scroll = 0;*/
} else {
trace("title not loaded")
}
}
/*now Date box */
dateVar = "events/"+changerVar+"/date.txt"
getDate = new LoadVars();
getDate.load(dateVar)
getDate.onLoad = function (success) {
if (success) {
//trace("date Loaded")
dateBox.htmlText = this.date;
/*titleBox.scroll = 0;*/
} else {
trace("date not loaded")
}
}
arImageVar = "events/"+changerVar+"/arImage.txt"
getarImage = new LoadVars();
getarImage.load(arImageVar)
getarImage.onLoad = function (success) {
if (success) {
arImagebase.loadMovie(this.arImage);
} else {
//trace("not loaded")
}
}
image = "events/" + changerVar + "/" + changerVar + ".jpg"
loadMovie(image, imagebase);
}
loadVariables("events/featured.txt",this);
changer(featured);
A friend of mine said he got it to work by using the code I'm using to load these variables into text files and putting the featured variable into a dynamic text file in the _root level and then calling the function like this:
featVar = "events/featured.txt"
getFeat = new LoadVars();
getFeat.load(featVar)
getFeat.onLoad = function (success) {
if (success) {
trace("featured Loaded");
_root.featured = this.featured;
trace(_root.featured);
/*titleBox.scroll = 0;*/
} else {
trace("featured not loaded")
}
}
changer(_root.featured);
And it does load the variable in the dynamic text box, but it comes back with the same error, except instead of undefined it comes back with "cannot load URL C:/etc/etc/events/_level10.featured/description.txt"
Anybody have any idea? PLEASE somebody help me out...
View Replies !
View Related
Simple Questions From A Simple Person
Hi all...
I am new to flash... The only actionscript I have actionally used is "stop ();" Anyway... I'm using flash cs3... It seems a fantastic tool to a newcomer like me!! Firstly, I'll show you what I've managed to do so far...
This is my first movie...
http://www.allnationschessleague.com...tpagewhite.swf
An this is the header I would like to put at the top of the website pages:
http://www.allnationschessleague.com...ANCLHeader.swf
Well, my first question (for I am sure to return to this site for more advice, is how do I link the flags at the top, to the relevant pages. Please check out the following page to see how it should work:
http://www.allnationschessleague.com
So as you can see, the flash needs to link to php pages... for example the British flag needs to link to 'setlanguage.php?lang=en' etc... so how do I set those links for the flags?
Thank you for answering my post )
Jeff
View Replies !
View Related
[CS3] Simple Image Loop Not So Simple
I'm relatively new to Flash - I can do some basic animations but very little actionscript.
I'm looking for a tutorial to have a set of images scroll across and repeat themselves.
this is what I'd like... example
I can do a continuous loop of a simple background image with the 'goto' function, but I can't even find a tutorial on how to repeat individual images.
Any suggestions?
Thanks,
JTN
View Replies !
View Related
Simple Answer For A Simple Question?
ok what this code does is it rotates my mc (mainclip)(it has 3d objects) as the mouse moves left or right on the x-axis.... and it works:
stage.addEventListener(MouseEvent.MOUSE_MOVE,myFun );
function myFun(event:MouseEvent):void
{
mainclip.rotationY= stage.mouseX;
}
...but what if i wanted to stop it rotating after it has rotated a certain amount to the left or to the right?
at the moment it rotates 360degrees in each direction, and i want it to rotate about 60degrees in each direction........
thanks.
View Replies !
View Related
Simple Question...simple Answer
ActionScript Code:
var prslide:slide1 = new slide1;
ok, say i din't want to have it always be slide1. how can i change it at runtime.
for instance make a loop that incremented the value of and did something like
ActionScript Code:
i++
var prslide:("slide"+i.toString()) = new ("slide"+i.toString());
this used to be easy in as2
View Replies !
View Related
|