I Don't Understand Preloaders
Can someone explain pre-loaders to me or direct me to a good explanation.I have tried to use them, but I can't wrap my head around this simple concept.I don't get how the pre-loader plays before the movie is loaded. I have tried to import my site as a swf into another preloader project and it doesn't have the same functionality.I also tried using actionscript to get the swf and that works great, but the preloader doesn't play while the swf is loading because it's like a separate thing.Please help me escape this confusion about this common thing.
Adobe > Flash Site Design
Posted on: 11/27/2007 04:58:10 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Help Me Understand Preloaders
Gday
i am having a problem with my preloader.
i have read the tutorials here and on other sites and whilst the may differ slightly (scripts), the objective is the same. However no matter which script i use ( eg. load on totalbytes or when total frames are loaded) i always haev problems.
The problem is that the preloader will do its job, however it wil then start my main scen halfway thru.
My main scene starts with an animation for 50 frames and then loads a jpeg image. this image is around 40KB. Then another animation for another 50 frames. My preloader will load my main scene at the point where the jpeg image appears.
Am i doing something wrong. Why does it start halfway thru the main scene and not at the beginning.
Thanks
Chris
I Don't Understand Preloaders
Can someone explain pre-loaders to me or direct me to a good explanation.
I have tried to use them, but I can't wrap my head around this simple concept.
I don't get how the pre-loader plays before the movie is loaded. I have tried to import my site as a swf into another preloader project and it doesn't have the same functionality.
I also tried using actionscript to get the swf and that works great, but the preloader doesn't play while the swf is loading because it's like a separate thing.
Please help me escape this confusion about this common thing.
I DONT Understand Preloaders
I just dont understand how to do preloaders.
here is the site intro.
it needs something showing it is loading because many people still use dial up but i dont understand how to do it. i am using the swish1http://www.wisemenpromotions.com/downfront/home.htm
Preloaders, Preloaders Everywhere But Not A One That Fits
I have an introduction for a site that consists of 3 files index.htm intro.swf intro2.swf Index.htm forwards on to intro.swf which contains a preloader (not a percentage on just one I cobbled together) Once intro.swf has loaded it begins to play and on the first content frame of intro.swf is an action to load movie intro2.swf.
Unfortunately intro2.swf loads before intro.swf has finished and starts to play prematurely So what I need if it is possible is a command to load intro2.swf and then get it to sit there and wait for the call from the last frame of intro.swf to play.
The reason I have two swf files is that I needed to change the background color of the movie and the easiest way I could find to do that was make two different movies
Just farting around with this, to see if i can figure it out so any resolution doesnt have to be pretty.
I have no php, asp, cgi support for the hosting space so i need to do it with action script
any help will be greatly appreciated.
Don't Understand...help
what does the 96.6 and 96.4 mean?
-------------------------------------------------------
if(myscroll._y<(96.6-myscroll._height+myscroll.top))
myscroll._y=myscroll._y+((96.4-myscroll._height)/40);
I NEED TO UNDERSTAND....................
Let's say I have 3 dynamic text fields on the stage and their variable names are tester1, tester2, and tester3. Is it possible in a "for loop" to change the number part of the variables with an "i" ? For example:
for (i=1,i<=3,i++)
tester[i] = i
)
Should the dynamic text fields on the stage display the the number of "i" ?
I've tried everyway, but I'm not sure if it's possible or if I just have the syntax wrong.
Please help.
Thanks
Trying To Understand
ok, i need sme help understanding actionscripting. i am currently doing tutorials to try and learn this stuff. but it seems when i have finished a tutorial, and it works, i do not understand how it works. what does all this code do? what does it all mean? please someone, anyone help me find a book or something that explains the meaning of actionscripting.
thanks,
jczeranna
Help Me Understand This
Okay, I found this code below and have put it into my movie successfully (it makes an mc follow the mouse).
onClipEvent (enterFrame) {
mousey = _root._Ymouse;
if (mousey<_y) {
followmouse = _y-mousey;
} else {
followmouse = mousey-_y;
}
moveSpeedx = followmouse/10;
if (mousey<_y) {
_Y = _Y-movespeedx;
} else {
_Y = _Y+movespeedx;
}
}
Anyway, while it's all fine and dandy that it works, what's the point if I don't really get how? Would someone take the time to explain it to me? Also, I need to add to this. How would I confine the MC to the height of the MC it is in?
Thanks. YP
Trying To Understand...
Hi guys,
I'm trying to understand a specific script in the joined menu.
You may have seen it on FK, but I'm unabled to contact the author, it has a wrong e-mail adress.
Here's my question: is it possible to change the URL for frame target, like "_root go to and play (10)" for example.
In fact, I would like it to work that instead of going to a URL, I would like it to move through my main timeline.
Any idea... thanks a lot in advance to the flash professionnals.
Sébastien Lebel
canada
I Don't Understand..please Help
i have a m/c which which has 4 butoons in it. the m/c performs an animation when a button is rolled over.
i have placed this m/c inside my stage.
the m/c stays on the stage for the entire length of my scene (100 frames) and at every 20th frame, i have text that appears.
And when a button is pressed, i want the scene to jump to the desired 20th frame. but this does not work.
it only jumps to the frame within the m/c.
i have action script that says on release goto and play scene 40 of the main scene.
what am i doing wrong?
thanks for listenting.
huggs
This Will Help U Understand
http://djnickthegreek.tripod.com if u go to that, once it loads, after about 20 seconds of the girl dancing, i want it to aumaticly load another fla.file on the SAME page!!!!
Don't Quite Understand
what do you mean by mc? i there a tutorial ou there some where or wold you have a minute to explain?
thank you for you post
Ill Never Understand
Ok so your here, and your reading my little help message, so please if no one has answered, if you know, or you know a better way, let me know please.
I decided to try and put together a flash site, just to see if I could do it. Weel I have been working on it for... oh I dont know 2 to 3 months, just learning flash as I go. Ive used it for quite some time and I do feel very comfortable in flash. I can create unique and swift navigation animations, and what I have so far is very good indeed.
Now that I have the main layout layed down, and a story board of exactly where Im going with it, I need now to start placing the flash together and making it fit in a smooth and clean style, percistantly thoughout the entire site.
This is where Im stuck. To give an EXAMPLE of what im trying to get, go to www.2advanced.com , enter the site, and click on any of the main links. If you do, the current body will deload, then a load animation will appear, then the body will reload. This is the effect that I want to achieve.
I do not know anything about actionscript as my only action I know is goto, lol. I feel now that I will need to use more advanced scripting, and seeing as I dont know the slightest about scripting, I dont want to have to learn tons of scripting to get just this one action.
I have the deload, load, and reload animations already created, and they will be the same after everlink. I think the problem may be the way I have it set up. let me explain.
I have in the main scene lets say 3 buttons, a b and c. Each button when clicked will play 5 animations, at 5 different times, on 5 different layers. Here in lies the main problem, depending on the page (frame) I am on, I dont know how to change the FIRST animation that each animation plays. Since as far as I know you can only make a button go to 1 one destination. But what I THINK I need the button to do is actually play the next 3 frames ahead of page a, then jump to page b. as if I was on page c when I click button a, I want it to show it deloading page c, not page a, then load page a. sigh... ill never understand.
Thanks for helping.
I Don't Understand...
I'm currently making a tile-based game(I thought this question is probably too easy to answer for the games forum) and I have a certain action happen when you click on a tile.
It works if I pull one tile to the side(not dynamically loaded) but the actual tiles the action doesn't work(its a gotoAndStop action to change what the tile looks like).
Can Someone Help Me Understand How To Do This Right?
Im trying to make poll that uses set variable to add +1 to the variable every time somone votes for it. my real problem is I can't figure out how to get the variables to write to a PHP file meaning whenever I restart the movie it goes back to 0 but for example I want that to be a 1 next time I reload the SWF file.
Ive been spending almost 3 days trying to make this work, but still nothing and Im also still kinda new to PHP
If you can fix my movie so it does what I want it to I will be really happy! Thanks for any help you can give me
heres the Zip file with the stuff im using
also the FLA only has one chice because I just want the script to get working first.
I Don't Understand
Why can I see an object fade in when I manually run through my movie, but when I look at it by "test movie" it's not there?
Cannot Understand.. Help...
Hi.
I tried to use a script that includes "dif_x = current_x-/:xpos;"
and no matter how i follow the source working file to do this, i keep getting an error message
**Error** Symbol=code, layer=Layer 1, frame=1:Line 3: Operator '-' must be followed by an operand
dif_x = current_x-/:xpos;
the funny part is, when i check for the SAME syntax in the action script window of the source working file, there is no error,
but when i check it in my own file, the error above pops up,
and they r excatly the same!!!
is it that i must define some thing?
help!! i am going crazy!!
thanks lots
I Don't Understand
Ugh! I don't understand Arrays. I'm working on this game and I'm stuck. I need to make an array, I think... and I have tried reading my book, looking at tutorials, etc. to understand arrays but I still can't. Would someone be so kind as to explain Arrays to me in regaurds to Movie clips. Or if you would rather just refer me to an easy-to-understand place that I could read it myself.
If it helps any, I'm running on MX 2004. What I am trying to do is, I have a set of movie clips and when a player clicks on it, i want the frame to change to a different frame within that movie clip. But which frame it will change to will be ramdom. Can that even be done?
I really appriciate any help you could give me or even a point in the right direction. Thanks.
XaXona
I Don't Understand.
I have a guy that you can move around with the arrow keys, but whenever I publish the movie to see in the web window, (F12).
It doesn't let me move him, and then I try to just test the movie, (in flash) and it does. HELP!
I Don't Understand
http://www.flashkit.com/movies/Scrip...3848/index.php
I only can see the action scripting on the button, i would like to create my own but it doesn't work. What is happening in this tutorial ? is there a way i can get it to stop easing and to limit the y co-ordinates of the scroll drag ?
Thanks
Don't Understand Why....
when you click on a link in this file when it goes to open the page it gives a syntax error in IE and the url ends up looking like this.
http:/20%/www.link.com
Can any one explain this and help me fix it? I am using Flash MX 2004
Link to zip File!!!
Don't Understand
This tutorial is for the exact version of Flash MX I use. However, the person that created this has many parts that are hard to understand.
http://www.flashkit.com/tutorials/In...-750/index.php
Please, can someone send me a link to a tutorial that can teach me how to make scroll bars, so I can scroll text up and down.. I do not use flash 5, or mx2004, I use Flash MX. Please, I've been working on it for 4 hours now, it's 1:15am and I'm horribly frustrated and restless..
I just need to figure out how to create a text field with scroll bar, or however you 'd like to say it..
Help Me Understand,..please.
I guess I need understanding why one set of code worked over another.
I dont need to know the "correct" code...I want to have a discussion about why it "didnt work" I want to understand, if you will.......
and I will never "learn" if I dont ask.
ok so I was trying to help out a thread here with some code..when I tested it, ..it didnt work.
I tired something like this:
Code:
on (press) {
_root.walk.gotoAndPlay(Math.random()*(_root.walk._totalframes));
}
// and this...
on (press) {
_root.walk.gotoAndPlay(Math.round(Math.random())*(_root.walk._totalframes));
}
but I was finally given this and it worked,...
Code:
on (press) {
_root.walk.gotoAndPlay(random(_root.walk._totalframes));
}
I mean I am a terrible coder....but I'll be d*mn'd...
So I'd like to learn why my code didnt work...what I did wrong....etc..etc.
Thanks
I Do Not Understand. Please Help
i have two fla's saved in flash8.
when i copy the contents from "about.fla" and paste it into the "flashkit.fla", contents that I copied from "about.fla do not work.
can anybody help me please?
How Well Do You Understand AS 2.0
the following code works fine. the second set of code doesn't. the difference is calling the function.
....Box1.onRelease = Release1;
this works fine, it calls the function onRelease.
but when you do
.....Box1.onRelease = Release(1);
it calls it once when it enters the frame, then you can't call it with an onRelease action.
Anyone know enough to be able to answer this??
Code:
function Release1():Void
{
trace("release called");
//trace(numb);
mainGame.ans1.textColor = 0x000000;
mainGame.letter1.textColor = 0x000000;
checkAnswer(1);
}
function Release2():Void
{
trace("release called");
//trace(numb);
mainGame.ans2.textColor = 0x000000;
mainGame.letter2.textColor = 0x000000;
checkAnswer(2);
}
function Release3():Void
{
trace("release called");
//trace(numb);
mainGame.ans3.textColor = 0x000000;
mainGame.letter3.textColor = 0x000000;
checkAnswer(3);
}
function Release4():Void
{
trace("release called");
//trace(numb);
mainGame.ans4.textColor = 0x000000;
mainGame.letter4.textColor = 0x000000;
checkAnswer(4);
}
mainGame.ansBox1.onRelease = Release1;
mainGame.ansBox2.onRelease = Release2;
mainGame.ansBox3.onRelease = Release3;
mainGame.ansBox4.onRelease = Release4;
this code DOESN'T work properly.
Code:
function Release(numb:Number):Void
{
trace("release called");
trace(numb);
mainGame["ans" + numb].textColor = 0x000000;
mainGame["letter" + numb].textColor = 0x000000;
checkAnswer(numb);
}
mainGame.ansBox1.onRelease = Release(1);
mainGame.ansBox2.onRelease = Release(2);
mainGame.ansBox3.onRelease = Release(3);
mainGame.ansBox4.onRelease = Release(4);
I Don't Understand...
Can anyone explain why some sites look super high res and others don't. I realise that you can use high res images but surely the screen only resolves at 72dpi anyway. So why is it when I put images into flash they look a bit fuzzy compared to some of the stuff I see on the net.
Here is an example of a site where the images look really crisp.
http://www.mono-1.com/monoface/main.html
Any explanations would be great.
Thanks
How To Understand THIS
In a MovieClip created and named "testXML", the codes like this:
var sValue;
loadCodes();
function loadCodes() {
this.sValue = ExternalInterface.call("getXML"); //load XML from HTML
...
}
You can see the "this" keyword is inside the "loadCodes" function (while the loadCodes function is inside the "testXML" MovieClip). What does the word "this" represent, the function "loadCodes" or MovieClip "testXML"?
Thanks
Scott
Help Me Understand It ...
I want to understand how to make a full browser with a picture for BG and zero px borders ( scaleable ) and with a menu that stays at 1/3 of width and 2/3 of hight.... ?
For example oma.eu
Thank you in advance
A
[F8] Don't Understand?
ca any one tell me why these don't work (in one case, one of the worked once and then not any more, the first one) In the later 2 scripts I am referencing a button instance. On the last script, the trace works but the start drag dose not:
_root.headder.name_email.onRelease=function() {
getURL ("mailto:rsbelotte@yahoo.com?subject=I have a job for you");
}
this.headder.name_email.onRelease = function() {
trace ("good");
}
this.sound.drag_but.onPress=function() {
this.sound.startDrag;
trace("test");
}
Help Me Understand
I have the following code:
ActionScript Code:
imagearray = ["images/gr-amf2p.jpg","images/gr-glt2p.jpg","images/gr-lpd2p.jpg","images/gr-cbl2p.jpg","images/gr-jgn2p.jpg"];
//initialize array
var infoArray = new Array();
for (var i = 0; i<=5; i++) {
infoArray[i] = new Array();
}
infoArray[0][0] = "Amber Fantasy";
infoArray[0][1] = "GR-AMF2P";
infoArray[0][2] = "Granite";
infoArray[0][3] = "Italy";
infoArray[0][4] = "images/big/gr-amf2p.jpg";
infoArray[1][0] = "Golden Lightning";
infoArray[1][1] = "GR-GLT2P";
infoArray[1][2] = "Granite";
infoArray[1][3] = "Brazil";
infoArray[1][4] = "images/big/gr-glt2p.jpg";
xPosition = 17;
yPosition = 315;
//loop through and add thumbnails
for(i=0;i<2;i++){
this.attachMovie("thumber", "instThumber"+i, i+1);
this["instThumber"+i].instEmpty.loadMovie(imagearray[i]);
this["instThumber"+i]._x = xPosition;
this["instThumber"+i]._y = yPosition;
xPosition += 105;
trace(infoArray[i][0]); //trace number 1
this["instThumber"+i].onRelease = function() {
trace(infoArray[i][0]); //trace number 2
trace(infoArray[i,0]); //trace number 3
}
}
trace number one yields "Amber Fantasy" on first trip through loop, and "Golden Lightning" on second trip just as I would expect.
trace number 2 i would expect to yield the same thing but it comes up "undefined". what's up with that?
just for fun i did a trace number 3 with java array synax and this come back with something but shows the whole value of the array "Amber Fantasy,GR-AMF2P,Granite,Italy,images/big/gr-amf2p.jpg"
I guess I am confused about how flash handles arrays, but shouldn't trace 1 and 2 yield the same thing?
does it have something to do with the fact that i'm calling the array inside a function? when i execite the "trace(infoArray[i,0])" line it produces the etire contents of the array so i know it can see it.
any help, knowledge, enlightenment is appreciated. thanks
Help Me Understand This...
I have attached an FLA...its from Jared Tarbell's Levitated.net. Am not able to understand his style of coding (this guy is a genius), also when i try to translate it into my style of coding...it doesnt work.
Cud any one please try to translate it for me...atleast try to explain the camera object he has created in it...its got me very confused
Thanx.
Help Me Understand Something...
Check this site:
http://www.lockblok.com/mainblok/main.htm
Now what I want to know is how come everytime you click on a different button, the loading always takes place on the same place, and always the same way?
What I'm thinking is that he has the loading graphic (the circulating ring) in 1 frame, and everytime someone clicks on a button it tells them to go to that frame, and then once its loaded it tells to go back to where it was.
Something like that or am I was way off??
Pls Understand This..
hey hi all,
i need a help pls
pls understand this.
i have a movie in which i have 3 movieclips..lets call them MC1, MC2, MC3.
In this movie i have 3 buttons linking to respective movieclips.
but the button does not show any action.
so far i have the actionscript on the button is:
on (press)
{
targetPath('MC1')
}
pls help me as i am not very good with actionscript
I Don't Understand This : (
Hiya everyone, once again the infamous x_polar encountered a rather stupid yet annoying problem, please help me solve it as this piece of code is my theoretical foundation of something bigger
Code:
for (var i:Number = 199; i<=240; i++) {
trace( [i])
}
_root.onEnterFrame = function() {
if (this._ymouse == [i]) {
trace("mi");
}
};
What I'm trying to do is check whether the mouse is within that certain field between 199 and 240 on the y row ....
Please Help Me Understand This.
I have a function that loads text and pictures into two seperate movie clips and sub movie clips, and then sets buttons and arrows for scolling. the script is below:
PHP Code:
// Loaded Text// declare the LoadVars object that // loads in the external textmyData = new LoadVars();// load event myData.onLoad = function() { // allow text to use html _root.headerHolder_mc.headerText_box.html = true; _root.headerHolder_mc.headerText_box.htmlText = this.headerVar; _root.bodyHolder_mc._y = 85; _root.bodyHolder_mc.bodyText_box.autoSize = true; _root.bodyHolder_mc.bodyText_box.multiline = true; _root.bodyHolder_mc.bodyText_box.wordWrap = true; _root.bodyHolder_mc.bodyText_box.html = true; _root.bodyHolder_mc.bodyText_var = this.textVar; // load pictures attachMovie("mask_mc", "maskSmall_mc", _root.getNextHighestDepth(), {_width: 170, _height:400, _x: 610, _y:80}); attachMovie("picturesHolder_mc", "picturesHolder_mc", _root.getNextHighestDepth(), {_x:620, _y:85}); picturesHolder_mc.setMask(maskSmall_mc); attachMovie("upArrow_mc", "upArrowPics_mc", _root.getNextHighestDepth(), {_x:720, _y:490, _alpha:0}); attachMovie("downArrow_mc", "downArrowPics_mc", _root.getNextHighestDepth(), {_x:745, _y:490, _alpha:0}); noPicturesToLoad = this.noPictures; picturesLoaded = 1; pictureStartY = 0; while (picturesLoaded <= noPicturesToLoad) { picHolder_clipName = "picHolder_mc" + picturesLoaded; picturesHolder_mc.attachMovie("picHolder_mc", picHolder_clipName, picturesHolder_mc.getNextHighestDepth(), {_x:0, _y:pictureStartY}); _root.picturesHolder_mc[picHolder_clipName].loadMovie("../images/"+_root.contentVariable+"/thumbs/"+picturesLoaded+".jpg"); pictureStartY += _root.picturesHolder_mc[picHolder_clipName]._height; trace(_root.picturesHolder_mc._height); trace(pictureStartY); picturesLoaded += 1; } trace(_root.picturesHolder_mc[picHolder_clipName]._height); //showPics_tween = new Tween(picturesHolder_mc, "_alpha", Regular.easeInOut, 0, 100, 30, false); showPics_tween.onMotionFinished = function() { new Tween(upArrowPics_mc, "_alpha", Regular.easeInOut, 0, 100, 10, false); new Tween(downArrowPics_mc, "_alpha", Regular.easeInOut, 0, 100, 10, false); } // Set buttons for pictures _root.downArrowPics_mc.onPress = function() { _root.onEnterFrame = function(){ endOfPics = 450 - _root.picturesHolder_mc._height - _root.picturesHolder_mc[picHolder_clipName]._height; if (_root.picturesHolder_mc._y > endOfPics) { _root.picturesHolder_mc._y -= 5; } } } _root.downArrowPics_mc.onRelease = function() { delete _root.onEnterFrame; } _root.upArrowPics_mc.onPress = function() { _root.onEnterFrame = function() { if (_root.picturesHolder_mc._y < 85) { _root.picturesHolder_mc._y += 5; } } } _root.upArrow_mc.onRelease = function() { delete _root.onEnterFrame; }};
The script fails here:
PHP Code:
while (picturesLoaded <= noPicturesToLoad) { picHolder_clipName = "picHolder_mc" + picturesLoaded; picturesHolder_mc.attachMovie("picHolder_mc", picHolder_clipName, picturesHolder_mc.getNextHighestDepth(), {_x:0, _y:pictureStartY}); _root.picturesHolder_mc[picHolder_clipName].loadMovie("../images/"+_root.contentVariable+"/thumbs/"+picturesLoaded+".jpg"); pictureStartY += _root.picturesHolder_mc[picHolder_clipName]._height; trace(_root.picturesHolder_mc._height); trace(pictureStartY); picturesLoaded += 1; }
i loaded an xml file which contains a variable stating how many pictures are there for that particular topic. The idea is that the pictures are then loaded one on top of the other. This way i can have pictures with varying length, yet the same width (its for aestetic purposes; better than constant boxes). WHere the script goes wrong is where i attempt to retreive the hieght of the picture that has been loaded so that i may know where to place the following picture.
I'm going to go and attempt to modify the code so that i check the height of the last picture loaded on the NEXT iteration of the while loop rather than at the end of the while loop as you see above. I'm doing this because i believe that the reason I'm not returning the height, is because the picture hasn't had time to load...
can anyone see something i may have missed?
-Ahmed
I Don`t Understand That AS
please explain me, why the "code1" creates a smoother transition of alpha and "code2" doesn`t.
code1
Code:
onClipEvent (load) {
brems = 4;
soa = 40;
}
onClipEvent (enterFrame) {
y = soa-_alpha;
setProperty(this, _alpha, _alpha+y/brems);
}
code2
Code:
onClipEvent (load) {
ion = 100;
maria = 1;
}
onClipEvent (enterFrame) {
setProperty(this, _alpha, ion/maria);
}
Both codes are putted on 2 separately mc`s, that contains each ones button
The first button changes the soa`s value from code1
The second button changes the value of maria from code2.
Thank you
I Don't Understand
I am trying to make a slideshow for a website. I get no errors when I test but the buttons only work in frame one of the slideshow. Here is the code and an image to illustrate where the buttons are located on the timeline.
I tried seperating the code to the frames corresponding with their buttons with no luck. Not sure what I'm doing wrong here.
thanks for any help
//navigation
leftWrap_btn.addEventListener(MouseEvent.CLICK, leftFrameWrap);
right_btn.addEventListener(MouseEvent.CLICK, rightFrame);
left_btn.addEventListener(MouseEvent.CLICK, leftFrame);
rightWrap_btn.addEventListener(MouseEvent.CLICK, rightFrameWrap);
back_btn.addEventListener(MouseEvent.CLICK, back);
function leftFrameWrap(event:MouseEvent):void
{
gotoAndStop(14);
}
function leftFrame(event:MouseEvent):void
{
prevFrame();
}
function rightFrame(event:MouseEvent):void
{
nextFrame();
}
function rightFrameWrap(event:MouseEvent):void
{
gotoAndStop(5);
}
function back(event:MouseEvent):void
{
gotoAndStop(3)
}
//navigation
Arr~~ I Need To Understand It D:
well i have been looking for tutorial
i still cant understand it :X
sometime i see the sence put stop ();
some dont
i know it asked the sence stop there
but how come some sence u dont need to stop it
why D:
@#%#!#!3!@#@! hope u understand what i mean!!!
Pls Understand This..
hey hi all,
i need a help pls
pls understand this.
i have a movie in which i have 3 movieclips..lets call them MC1, MC2, MC3.
In this movie i have 3 buttons linking to respective movieclips.
but the button does not show any action.
so far i have the actionscript on the button is:
on (press)
{
targetPath('MC1')
}
pls help me as i am not very good with actionscript
I Need To Understand This
What is up with this?
I'm writing a newsletter program. I have a script that takes the htmlText of a textarea and stores it so that textarea can be deleted. Now, when that textarea is recreated, I have the htmlText go back into it. --this is so a user can change pages.
The problem I'm having is that my company bought ActivSpell, a commercial software package. It's a spellchecker.
The spellchecker requires a .variable attribute to be set in the textfield. However, I use the htmlText of the textareas extensivly and with this property not commented out the formatting gets screwed up.
I don't fully understand the purpose of the .variable attribute. I'm unsure of what is going on that's screwing me up.
Here is the script for the textarea:
Code:
//***MYTEXTAREA.AS--Creates textfields dynamically***\
//--------------set initial variables---------------\
var xpos:Number = 0;
var ypos:Number = 0;
var h:Number = 11 * 72;//---Standard Page Size---
var w:Number = 8.5 * 72;//---^^^^^^^^^^^^^^^^^^---
var depth:Number = 0;
System.useCodepage=true;//tells Flash to display special characters
//-Receives the values: xp=xpos, yp=ypos, th=text Height, tw=text Width, tn=textarea Name, dp=depth, loc=this-\
_global.myNewTextField = function(xp, yp, th, tw, tn, dp, loc){//Build the textfield
//SET TEXTFIELDS VALUES
xpos = xp != null || undefined ? xp : xpos ;
ypos = yp != null || undefined ? yp : ypos ;
h = th != null || undefined ? th : h ;
w = tw != null || undefined ? tw : w ;
depth = dp != null || undefined ? dp : depth ;
var tname = tn;
this = loc;//Places the textarea on the passed-in area(on the stage or in an mc)
//BUILD THE TEXTFIELD
this.createTextField(tname, depth, xpos, ypos, w, h);
tname = this[tname];
with (tname){
_alpha = 0;
//embedFonts= true;
html = true;
border = true;
background = false;
type = "Input"
multiline = true;
wordWrap = true;
text = "";
selectable = true;
tabEnabled = true;
vScrollPolicy = "off";
hScrollPolicy = "off";
variable = "V-" + tn;
//_name = tn;
}
//SET TEXTFORMAT
tname.setNewTextFormat(new TextFormat("Arial", 10));
//SET UP CONTEXT MENU
var menu_cm = new ContextMenu();
menu_cm.customItems.push(new ContextMenuItem("Copy Code", htmlCopy));
function htmlCopy(){System.setClipboard(tname.htmlText);}
tname.menu = menu_cm;
//SET UP EVENT HANDLERS
tname.onChanged = function(txt){
_root.gettext();this.setNewTextFormat(new TextFormat("Arial"));}
tname.onScroller = function(txtObject){}
tname.onSetFocus = function(whatLostFocus){tname.borderColor = 0x990000;}
tname.onKillFocus = function(whatGotFocus){tname.borderColor = 0x000000;}
//LET THE PARENT PROGRAM KNOW WHAT TEXTFIELD THIS IS
Selection.setFocus(tname);
_root.textFocus = tname;
_root.whereAt();
}
And here is a function that I use to recreate the textfields on a given page.
Code:
//Load pre defined Text Fields
function loadMultipleTAs(wPage:Number, wField:Number){
var spellArray = new Array();
spellArray[0] = "blankText";
currentPageNum = wPage;
fixMargins();
currentPage = "Page-" + currentPageNum;
//Add Background Pic
if (pageBackground[currentPageNum] ne undefined && pageBackground[currentPageNum] ne "None"){
var backGroundImg = pageBackground[currentPageNum];
buildBackImage(backGroundImg);
}
//Cycles and Loads all pictures for this page
var picsOnPage = 0;
for ( var i = 0 ; i <= (myInsPicArray.length - 1) ; i++ ) {
if (myInsPicArray[i].Page == currentPageNum){
picsOnPage++;
var tname = myInsPicArray[i].PicName;
thisImage = myInsPicArray[i].Pic;
thisImageName= myInsPicArray[i].RealPicName;
buildPic(tname, this, myInsPicArray[i].X,
myInsPicArray[i].Y,
myInsPicArray[i].Width,
myInsPicArray[i].Height);
}
}
//Double checks that the page isn't blank
if (textData[currentPageNum].length < 2 || textData[currentPageNum].length eq undefined ){
if (picsOnPage == 0){ myTextPopup(-1); }
} else {
//Cycles and loads the text fields for this page
var totTextA = (textData[currentPageNum].length - 1);
for ( var i = 1 ; i <= totTextA ; i++ ){
if (textData[currentPageNum][i] eq undefined){}
else{
//Trap for the toolbar taking up the topmost inch on the page(8.5 x 12)
var my_y_pos = ta_y[currentPageNum][i];
if (my_y_pos eq null || my_y_pos eq undefined || my_y_pos < 72){my_y_pos = parseFloat(my_y_pos) + 72;}
new myNewTextField(ta_x[currentPageNum][i],//Sends the values: xpos, ypos,
my_y_pos,//--Height, Width, Name, depth & this
ta_h[currentPageNum][i],
ta_w[currentPageNum][i],
("Page-" + currentPageNum + "_" + "TextArea-" + i),
currentDepth++, this
);
ta_y[currentPageNum][i] = my_y_pos;
currentText = "TextArea-" + i;
currentTANum = i;
textFocus = currentPage + "_" + currentText;//Sets textFocus global variable
var cpage = eval(textFocus);
if (textData[currentPageNum][i]){
cpage.htmlText = textData[currentPageNum][i];//Applies saved text to text field
}
//spellArray[i] = "V-Page-" + currentPageNum + "_TextArea-" + i;
spellArray[i] = cpage.variable;
}
}
trace("----TEXTFOCUS---- " + textFocus);
whereAt();
ActivSpell.fieldRefs = spellArray;
}
}
Thanks
Can Someone Help Me To Understand This?
This seems like a simple thing to do but I'm getting nowhere. I have 10 swf files that I am trying to load into a empty mc entitled "movieHolder". I am not a programmer. Each one is 40k and I want to load them one after another. There is some logic step that I am not understanding. All files are on the same level.
Frame 1: I install movieHolder onstage.
Frame 2: I write in frame on actions layer
stop();
loadMovie("massTransit.swf", "movieHolder");
gotoAndPlay(3);
Frame 3: I write in frame on actions layer (also tried unloadMovie before loading new movie)
stop();
loadMovie("broadcast.swf", "movieHolder");
Both swfs have loop enabled because if I put a stop frame in, it stops the
main movie they are being loaded into. (i think it's the cause)
I have been messing around with stop, play and go to statements between the two frames and I get one movie to play and repeat, play and stop, skip 1st swf and play the second. I cannot get the two to play sequentially.
Thanks for whatever advice you can provide.
Something Strange ...i Don't Understand Why
Hi everyone
well...i faced something strange in flash & i need ur help
let me first tell u what i want
i wanna create a motion tween between frames 1 & 10 -for example..okey?
motion tween will be alpha where it starts at 0 & ends at 100
well...i used to do it many times & it always worked normally...without changing the shape!
TODAY i faced something sooo funny
i do the same steps exactly but the only thing that happens is the shape changes from small to big! as if i scaled the picture...but i didn't ...i even didn't play with its size...
why is this happening? i used to do motion tweens hundreds of times & its works fine...why this time not???
any help?
thanks for everyone
You May Not Understand, Because It Is Too Complex :)
I'm sorta new to flash, and I was stumped when I came across this problem. In my project, I have an animation which I want to constantly run...after the press of a button.
my idea(also the wrong one):
Was to make the button have go to the frame, which was frame one, and in the first frame of the animation have the action stop and the last frame action to goto frame two and play.....
If you understand what this madman is trying to say, plz reply
Help Me Understand This Code Please
Code:
n = 1;
maxBubbles = 30;
while ((n)<(maxBubbles)) {
duplicateMovieClip ("/bubbleA", "bub" add n, n);
n = (n)+1;
}
what are the following things saying...
1) add n
2) n = (n) +1;
Thanks for your help
I Don't Understand HitTest, ...but I Need It.
so,
flash help defines hitTest like this:
anyMovieClip.hitTest(x, y, shapeFlag);
anyMovieClip.hitTest(target);
and examples (I want to do like the first example):
This first example uses hitTest with the x_mouse and y_mouse properties to determine whether the mouse is over the target's bounding box: (WHATS THE TARGET? WHERE IS THAT DEFINED IN THIS EXAMPLE? WHY IS THERE NO 'anyMovieClip'?..does it default to _self?)
if (hitTest( _root._xmouse, _root._ymouse, false));
This second example uses hitTest to determine if the movie clip ball overlaps or intersects with the movie clip square: (WHY MC, COMMA, HITTEST...AGAIN, WHY IS THERE NO 'anymovieclip?)
if(_root.ball, hittest(_root.square)){
trace("ball intersects square");
}
thanks for any help
I Dont Understand
Hi,
I am putting Flash files into a FrontPage web site.
What is the correct way to do this?
I want the user to be told that he/she does not have Flash.
If you goto my page without Flash nothing happens.
Kind regards
For Those That Understand PHP And MySQL Only
hey guys i downloaded a tutorial on a guestbook and for some reason it doesn't work.
here's the PHP upload Script:
<?php
//Make sure to change YourUserName and Password to their real values.
$DBhost = "localhost";
$DBuser = "LSD";
$DBpass = "QAZWSX";
$DBName = "FlashTest";
$table = "news";
// Get Current Date and format var Today to add
$TimeStamp = time();
$Year = date("Y", $TimeStamp);
$Month = date("m", $TimeStamp);
$Day = date("d", $TimeStamp);
$Today = "$Year-$Month-$Day";
// End get Date
$Connect = mysql_connect($DBhost, $DBuser, $DBpass) or die("News=Uh Oh, Could not connect");
mysql_select_db($DBName, $Connect);
$result = mysql_query("INSERT INTO $table (UserName, News, TimeAdd) VALUES ('$UserName', '$EnterNews', '$Today')", $Connect);
Print "Status=News has been added";
?>
and here is the action that is added on the submit button:
on (release) {
loadVariablesNum("AddNews.php", "0", "POST");
}
and the MySQL table:
CREATE TABLE news (
ID int(11) NOT NULL auto_increment,
UserName varchar(30) NOT NULL default '',
News text NOT NULL,
TimeAdd date NOT NULL default '0000-00-00',
PRIMARY KEY (ID)
)
All seems to be correct and suppose to work and yet it doesn't it seems to be that the only thing that the database table getting is the date since thats the only variable that desides his value thru the php and not the Flash!!!
plz plz plz plz plz plz plz plz plz plz... guys help me with this thing!!! i must understand WTF is wrong!!!
Set Mask, Me No Understand
I need help.
I've tried, but don't understand set mask.
Is this true? It is a way to make one movie clip, mask another movie clip?
Do they have to be on the same layer? Can they be different layers?
I can't get the code to work.
It doesn't even appear that I have the option to select two seperate movie clips. It just gives me the parameter to fill in one clip.
What gives?
Thanks.
I JUST GOT FLASH ... Please Try And Understand ...
Alright im probably the biggest , hugest newb you have on this forum , ive worked with swish for about 1 year and a half ... now i want to switch to flash because i find flash sites of much higher quality...
I would really apprechiate if someone could direct me to a site where i can learn the really fundamental basics of flash ...
Oh by the way i have Flash MX with me here...
I have no clue how or what to start with , need your help :S thanks people
charles
|