Need Some Help Understanding This Code...please Help.
I am trying to understand some code for a drop down menu. Below is not all of the code, but if someone could explain frame 2 especially to me I think it would help me to understand how this is working. Thank you.
This is on frame 1 of the main timeline...
mymenu1 = new Array("HTML", "1.html", "2.htm", "3.html", "4.html"); mymenu2 = new Array("JavaScript", "1.html", "2.html"); mymenu3 = new Array("Spring", "1.html", "2.html", "3.html"); mymenu4 = new Array("Fall", "1.html", "2.html", "3.html", "4.html");
window = "_blank";
x_iniz = 250// Menu starting X point y_iniz = -7// submenu starting y point x_diff = 91// Menu width y_diff = 15// submenu height timeout = 10 //Delay to close submenu
This is on frame 2 of the main timeline...
stop (); // build menu for (a in _root) { if (typeof (_root[a]) == "object") { i++; } } for (var b=1; b<=i; b++) { _root.attachMovie("menu", "menu"+b, b); // This attaches the submenu (id, new name, depth) _root.attachMovie("contenitore", "dummy"+b, 10+b); //Assigns my1 to menu. It is on _root level. my1 = _root["menu"+b]; my1._x = x_iniz; my1._y = 175; cont = _root["dummy"+b]; cont._x = x_iniz; cont._y = my1._y+7; x_iniz += x_diff; titolo = _root["mymenu"+b][0]; titolo = titolo.toUpperCase(); my1.txt = titolo; for (h=1; h<_root["mymenu"+b].length; h++) { cont.attachMovie("submenu", "sub"+y, 12000+y); my2 = cont["sub"+y]; my2._y = y_iniz+(h*y_diff); testo = _root["mymenu"+b][h].split('.'); my2.txt = testo[0]; my2.url = _root["mymenu"+b][h]; y++; } }
FlashKit > Flash Help > Flash ActionScript
Posted on: 10-06-2001, 07:34 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Help Understanding Code
I found this code to fade music and I need some help understanding what is going on. Firstly, the function to fade the sound. How does that work?
Code:
//**********************************************
// create Sound obj and set volume at 0
//**********************************************
sndObj = new Sound();
//sndObj.attachSound("loop");
sndObj.loadSound("spinme.mp3", true);
sndObj.setVolume(0);
//**********************************************
// function to fade in the sound
//**********************************************
function fadeSnd(speed) {
this.onEnterFrame = function() {
vol+= speed;
if (sndObj.getVolume() == 200) {
trace("sound at max!");
delete this.onEnterFrame;
} else {
sndObj.setVolume(vol);
//show the fade
display = sndObj.getVolume();
}
};
}
Code:
_root.onEnterFrame = function() {
sndObj.start(0, 9999);
fadeSnd(1);
};
Need Some Help Understanding Code...
I am using a swf decompiler, and i saw these codes and couldn't understand what they were for. if anybody can help me, it would be much appreciated... THANKS!!!
CODE
NUMBER #1.
// [Action in Frame 152]
stop();
_level0:menuexit = "cl_main";
NUMBER #2.
// [Action in Frame 188]
getURL(_level0:menuitem, "_level1");
NUMBER #3.
on (release)
{
gotoAndPlay(153);
_level0:menuitem = "org_m.swf";
}
questions.
#1 - what is '_level0:menuexit'? is it an instance name, a label, a movie clip, a variable?
#2. what's the difference between 'getURL' and 'loadMovie'? this code came from a swf that loads other swf into the parent swf.
#2 and #3 - again, whats '_level0:menuitem', is it an instance name, a label, a movie clip, a variable?
Again, THANKS FOR HELPING A NEWBIE!!!
btw, how do I post the code so that it will appear exactly as seen from flash?
[F8] Understanding This Code
Hello, I posted this on the Flash ActionScript board originally and thought it would help if I posted this on another board at the same time.
I was wondering why I had to use different paths to call two separate button instances that are placed inside of the same movie clip. Immediately you may assume that they are not inside of the same movie clip, but believe me, they are. The full code is here:
Code:
this._lockroot = true;
viewpic_btn.onRelease = function() {
_root.createEmptyMovieClip("target_mc", 1);
target_mc._x = 79;
target_mc._y = 140;
target_mc.attachMovie("inlineID", "showInline_mc", 5);
};
viewpic2_btn.onRelease = function() {
_root.createEmptyMovieClip("target_mc", 1);
target_mc._x = 309;
target_mc._y = 145;
target_mc.attachMovie("remoteID", "showRemote_mc", 5);
};
viewpic3_btn.onRelease = function() {
_root.createEmptyMovieClip("target_mc", 1);
target_mc._x = 535;
target_mc._y = 139;
target_mc.attachMovie("internalID", "showInternal_mc", 5);
target_mc.showInternal_mc.magiclung_btn.onRelease = function() {
getURL("http://www.us-appliance.com/magiclung.html", _blank);
};
};
_root.target_mc.closeWindow_btn.onRelease = function() {
_root.target_mc.removeMovieClip();
};
The bit of code that I am referring to where the two buttons are in the same mc is the last chunk:
Code:
viewpic3_btn.onRelease = function() {
_root.createEmptyMovieClip("target_mc", 1);
target_mc._x = 535;
target_mc._y = 139;
target_mc.attachMovie("internalID", "showInternal_mc", 5);
target_mc.showInternal_mc.magiclung_btn.onRelease = function() {
getURL("http://www.us-appliance.com/magiclung.html", _blank);
};
};
_root.target_mc.closeWindow_btn.onRelease = function() {
_root.target_mc.removeMovieClip();
};
"closeWindow_btn" and "magiclung_btn" are both inside of "showInternal_mc" which is attached to the empty mc "target_mc." I also use instances of "closeWindow_btn" in the other two mc's "showRemote" and "showInline." I would really like to understand what is going on here, if anyone could please provide some insight. It does not make sense to me that you would have to write two different paths to get to the same location for something.
Thanks...
Help With Code Understanding... (MX's Drawing API)
OK. This is the code I'm trying to understand (like what it does):
createEmptyMovieClip("myClip",1);
myClip.lineStyle(1,0x000000,100);
onMouseDown = function () {
myClip.moveTo(_xmouse, _ymouse);
onMouseMove = function () { myClip.lineTo(_xmouse, _ymouse);};
};
onMouseUp=function(){
onMouseMove=null;
}
Here's what I get:
1. The first line creates an empty movie clip, names it "myClip" and gives it a depth of 1. Question: What do they mean by "depth"?
2. The second line uses MX's drawing API to define a line style for myClip --> Explanation of that entire thing?
3. This line invokes a developer-defined function whenever the mouse is pressed down, thereby creating an "action-based" loop for interactivity. Q: Why is it just "function()"?
4. This line physically moves the MC "myClip" to the x and y coordinates of the mouse.
5. Last three lines I don't get at all.
Help much appreciated,
-Avenger
[AS2] Help With Understanding Aspects Of Code
Hello,
I've been a loyal lurker for a long time. I've recently elevated my ActionScript learning, and I'mgoing to need help from my Kirupian brothers and sisters. At the same time, I'll try to help where I can.
Now, I've got a series of questions that I can't easily find the answers to, so I'm going to ask them here. If you need me to clarify for expand on a question, please let me know.
1. init object ...what does this mean?
2. listener... I'm wrapping my head around what this means, but I just need a clear definition.
3. instantiate variable: I just need a clear definition of what this means. I'm pretty certain I understand what it does, but I'd just like it in plain english. I use external AS files, which is formatted with commented-out sections to write my code. So, I have an 'instantiate variables' section.
4. Can I use MovieClipLoader to bring in an .swf?
5. If I use mcl or attachMovie, can I use easing?
6. If I have 20 movie clips, should they reside in one keyframe? Or should each movie clip have it's own layer? I'm constructing my projects using one keyframe, and external AS files.
See? That's it. Just some basic stuff, I'm sure.
Thanks in advance!
Understanding Action Script Code
--lol, it might be easiest to read the help file! sorry guys and gals
(I'm using Flash 5, and I am a flash novice)
I have some programming experience already...
Ok I have learned most of C++(all but graphics), some Pascal(basic graphics), and BASIC, I learned last but fast.
So I think I'm pretty smart, at least at programming languages.
Now I'm trying to understand action script code, but I don't know if it would be easier to try and just look at written code, or look through the tutorials on actionscript... It seems most of the tutorials are for people who have had no programming experience before. So basically I was wondering if there are any tutorials with code breakdown, where they decribe it line by line, and what everything does, rather than saying just what the whole program does.
OR would it be easier to read about the basic types in code, like data types, primative and reference, and objects, and then learn from other's coding?
Fortunately I can understand WHAT they are doing, I just don't know what symbols flash uses; For Example: With methods/functions; To get the hour with time, the method returns the number of the hour with the method "getHour()". And then with objects, (like class objects in C++), it goes "this.getHour()"
So what do you think would be easier:
Reading Code or Searching for Tutorials?
Thanks, and Happy New Year, Woo HOO!
Help Understanding Why This Code Works - For Loop
I have 4 buttons on the stage. I want to assign each button a unique action by using a for loop to assign the actions to these buttons
This example does not work:
PHP Code:
for (i=0; i<4; i++) {
this["btn"+i].onRelease = function() {
trace("this"+[i]);
};
}
each button traces "this4"
this example does work!
PHP Code:
for (i=0; i<4; i++) {
myBtn = this["mybtn"+i];
myBtn.num = i;
myBtn.onRelease = function() {
trace(this.num);
};
}
each button traces properly.
what I want to know is why, I'm happy that I got this code to work at all, but I would really like to know why the bottom one works, and the top doesn't, so I at least learn from this.
My guess is that it has to do with the incrementing variable ("i") inside the for loop, but I just want to be clear on this.
thanks
Help Understanding Why This Code Works - For Loop
I have 4 buttons on the stage. I want to assign each button a unique action by using a for loop to assign the actions to these buttons
This example does not work:
PHP Code:
for (i=0; i<4; i++) {
this["btn"+i].onRelease = function() {
trace("this"+[i]);
};
}
each button traces "this4"
this example does work!
PHP Code:
for (i=0; i<4; i++) {
myBtn = this["mybtn"+i];
myBtn.num = i;
myBtn.onRelease = function() {
trace(this.num);
};
}
each button traces properly.
what I want to know is why, I'm happy that I got this code to work at all, but I would really like to know why the bottom one works, and the top doesn't, so I at least learn from this.
My guess is that it has to do with the incrementing variable ("i") inside the for loop, but I just want to be clear on this.
thanks
Not Sure If Im Understanding This..
I have a webpage made in flash MX and I have a "map.swf" file that im trying to open in my webpage useing the action script (loadMovieNum("http://nortel.cbrands.com/map.swf", 1);
but the problem is I want the map.swf to be in the center of the page .. right now is starting the map.swf in the top left cornner .. is there a way to specify where it will load the SWF file?..
Thanks Alot,
Terrified
For A Better Understanding
ok pelle, its simple but i have to describe it better.
Imagine a typical database with a list window. In this window you will find the list of search results sorted by an index.
The results are listed one below the other.
If you have more results than will fit into yout listwindow you will have a scrollbar etc. The typical listwindow. Sorry my "GermantoEnglishtoSwedish" seems to drop some things out.
So thats what I want to have. ActionScripting for building such al listbox is not the problem. Maybe I can use one of the ready-built things in flash.
The problem of getting data into the arrays shouldnt be the problem evn if I didnt dealt with it - till now.
What I want to know is how can I display the achieved data into an economical way, MCs or whatever????
Must Have Understanding....
I have this .fla that I can't get to navigate correctly. Can someone take a look at it please. Attached is a simplified version of the .fla I have made. It has everthing structured exactly the same only the original is much larger.
Thanks everyone
_DK
Understanding A 2.5D? SWF
http://b.bngi-channel.jp/psp-haruhi/.../haruhi512.swf
Hi I'm trying to understand how this was done. My best guess is it was drawn and a kind of wireframe was created in flash with the image attached to it like a texture while the wireframe morphs distorting the image slightly...I'm not sure if this is how its being done so anyone elses comment would be appreciated especially on tutorials on how to do this sort of thing in flash if you know of any.
Reminds me of sitepal a bit. Do they use the same/similar technique?
Understanding >> And <<
I've just being studying some open source code and I got my first exposure to bitwise operators.
I don't know much about them expect that they "move" bits?
The code below is what I've been looking at. Its used to generate a dynamic gradient.
Could somebody give me a crash course explanation of bitwise operators using the code below as a reference?
ActionScript Code:
var topColorRGB:uint=0x00ff00
var bottomColorRGB:uint=0xff0000
var tc = [(topColorRGB >> 16) & 0xff, (topColorRGB >> 8) & 0xff, topColorRGB & 0xff];
var bc = [(bottomColorRGB >> 16) & 0xff, (bottomColorRGB >> 8) & 0xff, bottomColorRGB & 0xff];
ActionScript Code:
function getColor(x:int, y:int):uint {
var p:Number = (y / 100);
var alpha:int = 255 << 24;
var red:int = (tc[0] + p*(bc[0] - tc[0])) << 16;
var green:int = (tc[1] + p*(bc[1] - tc[1])) << 8;
var blue:int = tc[2] + p*(bc[2] - tc[2]);
return alpha + red + green + blue;
}
[AS3] Understanding
I have been reading up on AS 3 and looking at some of the tutorials and can't seem to understand something. When I build sites in AS 2 I have a main class and most of my classes filter into the Main class. I rarely link a class to a MC in my library and instead just attach the MC in my class and reference the attached MC.
Now should I approach AS 3 the same way, or should the code be linked to a MC?
X, Y Coordinates - Their Understanding
How to understand X,Y co ordinates in Flash 5. Is X,Y cooradiates of every MC,Button,Graphic is relative to Movies's X,Y coordinates.
is (0,0) coordinate of the movie is always at the center of the movie.
Grateful if somebody can direct me to a website on this.
hkhyd
Understanding Actionscripting Better
hi,
which language one should learn to better understand and to create high level actionscripting?
my friend advised me C++
what u people think which will be better?
Understanding The Process
Hi,
There is a movie on the flash kit site available for download called "Image slider or scroller with motion blur". Does anyone know if there is a tutorial available for something similiar to this? I would like to understand the process, rather then just recycle the existing movie. I am familiar with functions and properties, but a tutorial specifically dealing with this process would really help.
If you haven't seen the movie, it's a small slide bar on the top with thumbnails and a larger corresponding bar on the bottom. When you scroll over the thumbnails the larger bar moves to the appropriate spot, but also blurs when moving back and forth.
Thanks,
Dan
Understanding Components
Hi,
I have made several components and I think I kind of understand the principals but no matter how much I read about it I have problems with #initclip and #endinitclip.
When I make my components they work perfectly using this kind of syntax in the components action fame:
recordTime=new MovieClip();
MovieClip.registerClass("Gametimer",recordTime);
//class recordTime
MovieClip.prototype.recordTime=function(onScore,cD own){
function here
}
startGame=new MovieClip();
MovieClip.registerClass("StartGame",startGame);
MovieClip.prototype.startGame=function(butStart,cD own,downTime){
function here
}
timer.recordTime(onScore,cDown);
timer.startGame(butStart,cDown,downTime);
and many more functions.
timer is my movieclip. This works but I don't have to use #initclip. I know it has something to do with events, which are executed w/o #initclip.
Can somebody give me some explanations, please.
Understanding Scenes
I want to know how much to use scenes. I have a feeling they can be needlessly used and wish I had a better understanding of when they come in most handy and also, using them in the actions palette for targeting, and what is powerful about them and what merely convenient.
LoadVariablesNum Understanding
Hello,
I got a little problem with the loadVariablesNum function
i got an external txt file (let's says H.txt), i want to include dynamically the vars that are into this txt into my flash scene..
(when i says dynamically i mean not with #include, which make me publish my page every time there's a change..)
in the text i got a var like this one:
&Enn=2
So i try:
loadVariablesNum ("H.txt", 0);
trace(Enn);
but I got an undefinied result..Why?
LoadVars - Understanding
Hopefully this can be answered quickly, but I am a little confused as to what flash is doing !!
I am using the LoadVars object to bring a series of variables into my fla, eg. my text file contains ...
&option1=text1&option2=text2&option3=text3&
I am creating a LoadVars object as such.
myLoadVars = new LoadVars();
myLoadVars.onLoad = function(success){
if (this.loaded && success) {
trace("SUCCESS")
_root.option = this.buttonNum0;
_root.option2 = _root.myLoadVars.buttonNum1;
_root.option3 = _root.myLoadVars[buttonNum2];
}
else {
trace("FAILED");
}
}
myLoadVars.load("navigationOptions.txt");
I am using a series of dynamic text boxes to show the output (option, option 2 ...etc).
My question is, when you load data into flash using the LoadVars object, is this stored as an array, or just a series of variables ? As you can see my line _root.option3 = _root.myLoadVars[buttonNum3] returns undefined and hence leads me to believe it is not an array...
Is there any simple explanation that will allow me to understand LoadVars and Arrays ? If I load the data in as:
&buttonNum=text1, text2, text3
I would then have to create an array object and use split string, but why do this ?
Dazed and confused.
motorpilot
Understanding Gravity
I started a simple movie using gravity. Check the fla file.
I'd like to know two things (initially):
1) Why does the little ball buries itself in the grass? how can I avoid it?
2) I know why if I keep pressed UP the ball flies and flies up, but I'd like to make it jump and fall... how?
PS: I know there may be lots of other posts on gravity, but Im just playing a bit and try to figure out things by my self (though Im asking for help here hehe). Anyway, I'll check those post later when Ive got the idea.
Understanding The Logic
Hi All,
in the tutorial below, the objective is to get the slider to move left or right at a certain speed with respect to where the mouse is. What I wish to understand, is, how the creator came to the math logic that she/he used. Can anyone shed some thoughts on it..? I really think Flash will be all that more powerful for me once I can grasp the logic behind things like this. Cheers.
http://www.actionscript-toolbox.com/...ingviewer2.php
Understanding Preloaders
Hi,
I am using Flash4 in a PowerMac.
I have a movie ("slideshow.swf") that presents a series of photographs.
In the first and only frame of this movie there are some buttons (thumbnails) that, when pressed, call to a movieclip ("photos")that has a photograph in each frame (about 30). There is an instance of that movieclip in the main stage. Every time the user click on a thumbnail, the corresponding photo appears.
Now, I need to put a preloader to entertain the user while all the photographs are loading.
The problem is that if I use "If frame is loaded" action, syntax requires I put a scene and a frame number (or label). But my movie has only one frame. So the question is, how can I use a preloader that looks "inside" the movie, to see if the last frame of the movieclip "photos" is loaded, before allowing the movie "slideshow.swf" starts?
Thanks for your time.
Marcelo
Understanding LocalToGlobal ?
Hello,
I´m trying to use the localToGlobal function but I don't seem to get the results I need. However the problem is simple.
I have a movieclip M1 and inside this movieclip are 2 other movieclips M2 and M3. M3 contains instance of M2. What I am trying to do is to move the _root.M1.M2 movieclip to the position of the _root.M1.M3.M2 so they match exactly ( M2 contains a simple shape of a box so when the position of the two moviclips match they will be lying above each other so it will look like one box).
So what I really need is _root.M1.M3.M2 position inside _root.M1
I have tryid this:
point = new Object ();
point.x = _root.M1.M3.M2._x;
point.y = _root.M1.M3.M2._y;
_root.M1.localToGlobal (point);
_root.M1.M2._x = point.x;
_root.M1.M2._y = point.y;
However the _root.M1.M2 movieclip doesn't end in same position as the _root.M1.M3.M2 movieclip.
Anyone know how to manage this ???
Thank you.
Understanding LocalToGlobal ?
Hello,
I´m trying to use the localToGlobal function but I don't seem to get the results I need. However the problem is simple.
I have a movieclip M1 and inside this movieclip are 2 other movieclips M2 and M3. M3 contains instance of M2. What I am trying to do is to move the _root.M1.M2 movieclip to the position of the _root.M1.M3.M2 so they match exactly ( M2 contains a simple shape of a box so when the position of the two movieclips match they will be lying above each other so it will look like one box).
So what I really need is _root.M1.M3.M2 position inside _root.M1
I have tryid this:
point = new Object ();
point.x = _root.M1.M3.M2._x;
point.y = _root.M1.M3.M2._y;
_root.M1.localToGlobal (point);
_root.M1.M2._x = point.x;
_root.M1.M2._y = point.y;
However the _root.M1.M2 movieclip doesn't end in same position as the _root.M1.M3.M2 movieclip.
Anyone know how to manage this ???
Thank you.
Some Help Understanding Syntax
Hey,
trying out the new MX2004, and so far, i like it.
i'm not new to actionscript, but i'm not an expert either. Looking thru their PDF's that come with the installation's ZIP file, i see some code like:
code:
var myDate: Date = new Date();
i dont understand what the colon is for.
i tried using the code, and it seems to work the same as:
code:
myDate = new Date();
can someone explain the uses of the colon syntax?
thanks,
-myk
Needing Understanding
I would appreciate if I could get some help understanding how to separate the movie from a cursor event.
I've downloaded the MagicBall fla from flashkit and was wondering if there was a way to get the sparks to run in a movie by themselves without the dragablity. the link to the fla is here:
http://www.flashkit.com/movies/Effe...o-750/index.php
Unforunately my limited Flash experience has not led me to the correct
answer and I keep getting repeating level0 errors.
If anyone can help, I would certainly appreciate it
Thank
Dave
Understanding Depths
I am working on this seemly complex problem, that I believe is being caused by my lack of knowledge on how depths work.
My project (as of now) consist of a sliding menu bar, that slides out onRollover, and a small MC that reads "architects" and when rolled over reads "home".
My trouble is getting the rollOver for "architects" to "home" to work and also having that MC to go back to the beginning of the sliding menu MC on release.
My .fla is attached with all the actionsrcipt on it. But as my problem is, it is not working.
please help if possible! -thanks
Help To Understanding _yscale
Hi there
A while ago I downloaded the attached file from Flashkit. It is a simple dropdown menu - and since I'm now trying create my own dropdown I'm pulling my hair, cause there is a few things I don't understand.
On my webpage, I need the drop downs to be a different size than the example. They keep talking about:
on (rollOver) {
_root.drop1.gotoAndPlay(2);
setProperty("_root.button1.1", _yscale, "900");
}
on (rollOut) {
_root.drop1.gotoAndPlay(16);
setProperty("_root.button1.1", _yscale, "100");
}
And I cannot see where they get those figures from. Can anyone help me? I'm sure than once someone tell me the answer, I will be embarresed that I even asked.
Thanks
Freja_UK
Learning Is Understanding
ok i'm a newbie
i think that the best way to learn anything is
watching how it's done.so i've seen a lot of PRETTY good things
that are made with flash (check out www.frosch-studio.com) and
i want to know how.Isn't there a decoder or smth that can decode html pages using flash to complete swf.projects?
Understanding Script
hi
can u guys help me understand actionscript??, i've just learned a basic scripted movement, but i don't understand why it does differently when placed in a movieclip on the maintimeline - as opposed to just directly on the maintimeline.
=code:
r_mc.onClipEvent(load){
this._x-=(this._x-t_mc._x)*.2
this._xscale-=15;
if (this._x>=300){
this._xscale+=20;
if(this._xscale >= 20){
this._xscale-=(this._xscale-t_mc._xscale)*.1
}
}
}
(also please let me know- if this script can be better)
Understanding Levels
i've spent the last couple of days trying to troubleshoot some script that loads 9 different movie clips (images) into a parent movie.
http://www.flashkit.com/board/showthread.php?threadid=550023
i can't figure out why it runs so slow... the only thing i'm not sure about is whether by loading so many (albeit small) .swf files (9), each on a different level number, would cause the whole thing to run so slow??
each movie stops (on the timeline) once it's loaded, and each only plays one at a time, to show the image.
are there any limits to the number of different .swf files (using different Levels) should be loaded at any one time?
cheers
Understanding _lockroot
I am having some difficulty getting my mind around the _lockroot script. I am loading an external .swf into a main .swf. I have a MC which contains a button that loads a .swf in the parent and works fine as a standalone, however when I call the .swf into the main.swf, the button no longer works.
Here is the code attached to the button within the child. I am trying to use _lockroot, but something is not correct.
Thanks.
on (release) {
loadMovie("1906video1.swf", _root.media);
this._lockroot=true;
}
Understanding Mc.onLoad()
I am trying to code everything on frames rather than on the individual clips etc, but I am having troubles with onLoad
Why wouldn't this code perform the trace action, when the clip appears on the stage?
code: vaccumAnimation.onLoad = function(){
trace("set dirt");
/*for(i=0;i<100;i++){
//set location for dirt
_root.dirtLocation(i);
this.attachMovie("dirt",dirtName,i);
with(this[dirtName]){
_x = thisX,
_y = thisY;
}
}*/
}
I know this is about as basic as they come, but at the moment it is giving me trouble. My brain is not functioning. Please help.
By the way the instance is correct.
Thanks.
_t
Understanding Layout
How do you arrange other items in the original composition before you start the animations?
Do you layout parts of the compostion so you can guage scale and distance and then convert these to symbols? This then become part of the main stage.
Or do you insert a new symbol and go into editing mode and hope for the best? Then bring it back out onto the stage and hope you have the correct scale and motion?
The Idea being to create an initial layout and then tween various movie clips and then bring them back onto the stage as independant parts of the composition.
Thanks
Understanding Actionscript
where rin this action script does it exp0lain how to program each country to take you to a new move or page
im a noob where action script is concerned and with me , if i dont just do it i cant learn it.
heres the link to the fla
http://www.flashkit.com/movies/Scrip...7480/index.php
Help Understanding Script
I am new to Scripting and am trying to completely understand what every word of the syntax does. Thank you for any and all help you can give me.
Lets say i have the following script:
[as]var externalData:LoadVars=new LoadVars();
externalData.onLoad=function(){
owed_txt.text=externalData.elecBill;
}
[AS/]
This is my guess as to whats happening here:
[var] defines new variable named externalData
[:LoadVars] is the data type of externalData, and also a function???
[=new LoadVars()] assigns the variable externalData to a new empty array.
[externalData.onLoad=function()] this says to create a function to test when externalData has loaded.
[owed_txt.text=externalData.elecBill] this says to assign the dynamic text instance (of type text) to the &externalData variable value in the elecBill txt file.
Understanding Actionscript
ive looked at soooo many actionscript tutorials but they all seem like some foreign language.....is there any tutorial that explains the aspects of actionscript?
like...
what is a "string"?
or a "variable"?
etc etc too much stuff every time i look at a tutorial i dont understand it because i dont know what all of the terms mean. someone please help! lol
Understanding Transitions...with A Lil Help
Thank you in advance,
I've attached a fla that I'm working on, which goes to my portfolio. Anyhow, in it a have two buttons which I want to have kind of drop down menus with button etc.
I really want a transition between both buttons as well as both buttons being able to play the outro of the drop down menu. I know the actionscript involved is some like the if. commend.
Example. press center 1. then center 2.
Help Understanding This Actionscript...
I found the attached .fla on a website, and I was trying to figure out how it all works... and I figured out a good portion of it, but I was wondering what line of script in frame 1 of the movie tells it line up the circles horizontally...
I am trying to create something of a similar effect, however I want them to line up vertically... How would the actionscript change to make the circle vertical?
If you have the time to look at this I would greatly appreciate it
Thanks
- Mikey
Understanding Variables.
I'm looking through a tile-based fla I found on this forum... but I'm having troubles understanding how it works. I'm seeing alot of scripting that I'm not quite familiar with. I'd appreciate if someone could just explain what the following lines of code actually do:
Code:
game = {tileW:30, tileH:30};
Code:
game.Tile2 = function () { };
Code:
game.Tile2.prototype.walkable = true;
Code:
_root.attachMovie("empty", "tiles", 1);
Obviously I haven't supplied the fla, so I don't need to know what it does in relation to the fla.. I'm trying to understand what the code itself even attempts to do...
Understanding Vars
Hi all
This is what I'm trying to do. I want my movie to loop certain frames unless a button is pressed to make the movie play straight through. Then if a different button is pressed it again loops the choosen section. Both buttons are within movieclips on the main timeline. This is what I've tried unsuccessfully
I set a variable in frame 1 on the main timeline
Code:
fullplay = "off";
later on the timeline I check that var with this code
Code:
if (fullplay="off") {
_root.gotoAndPlay("slogan");
} else {
_root.gotoAndPlay("ricky");
}
trace(fullplay);
the trace is coming back with 'off' as I'm expecting. However the movie is continuing to ("ricky") instead of looping back to the beginning of ("slogan")
also I have a button that is suppose to set the continue playing but that's not working either, it doesn't change the var. This is my code:
Code:
on (release) {
set (fullplay,"on");
}
I think I've completely misunderstood how vars works, can someone please point me in the right direction or suggest a better way to achieve what I'm after
Thanks in advance
Understanding Actionscript
I am New to flash, have recently began exploring its uses with flash8
Am struggling to understand the concepts surrounding actionscript.
Inparticular: how do i borrow script from other movies?
where do i view the script?
Help With Understanding The Effects
Could someone help me sort the effects out on this sites.
http://www.deppipes.com/depmain.htm
and
http://www.mcdracing.com/rally.htm
On this site, In the mittle you can see the effect with the mouse over.
Most greatful for any help
Best regards
Joacim
[help] Understanding Function
ok if i wanted to say... duplicate something and have it keep the exact actionscript and hittest ability as the actual movie clip i created, without having to drag each one onto the stage? which function would i use .prototype? and how would i be able to use a duplicated bullet to destroy the duplicated "ball" since the as checks for instance names and duplicated mc's have different instance names?
if i confused im sorry FlashMX04
|