Search:
Type: Posts; User: gaz_b
Search:
Search took 0.11 seconds.
-
try this:
on (press) {
++count;
if (count>10) {
_root.gotoAndPlay(78);
} else {
_root.gotoAndPlay (64);
}
}
-
remove these two lines:
set (count, 1);
+count;
and insert in their place :
++count;
that ought to do it.
-
i took a quick look at your code and the first thing that occurred to me is that you are not calling the checkTime function in the code you posted.
something like below will do it:
onClipEvent...
-
you could use "else if" combined with "else" to do it (see below),
then if neither LEFT/RIGHT key is down it will gotoAndStop frame 1.
onClipEvent (load) {
moveSpeed = 5;
}
onClipEvent...
-
you left out "this" :)
the line:
["gennum"+i] = myarray[i]
should be:
this["gennum"+i] = myarray[i]
the "this" at the start of the line is not optional. it basically tells flash on which...
-
try array notation instead of eval should fix it eg:
this["gennum"+i] = myarray[i]
-
in mx you can make your unique scripts functions on the main timeline then assign the appropriate function to the onEnterFrame event of a clip when you attach it.
have a look for onEnterFrame in...
-
a simple version would be to use split/join eg:
Input = "Welcome everyone";
Output = Input.split("e").join("a");
trace (Output); // outputs "Walcoma avaryona"
or for a more elaborate version...
-
well eval works differently in MX so maybe that is the problem.
your eval statement :
eval(varName).txtField = "blah blah";
can also be written as:
relative eg:
this[varName].txtField =...
-
if you can hard code the total in a text file then flash could load that first to discover how many to load.
if you can't hard code the total somewhere then you could use some server side scripting...
-
the code looks ok but you didn't include how you call the function.
eg:
myDuplicateClip(5)
aside from that it could be a path problem depending on which timeline the function is declared.
...
-
generally speaking the syntax you are looking for is "_parent".
for example:
if clipA is on _root and has clipB inside it.
clipB can refer to the _x property of clipA as either:
_root.clipA._x...
-
below is a quick example using Penner's color prototype.
// in root frame #1
//brighten an object just like Effect panel
//bright between 0 and 100
Color.prototype.setBrightness = function...
-
if you paste the code below on a movieclip it will fade in and out.
onClipEvent (load) {num=5}
onClipEvent (enterFrame) {
_alpha+=num
if(_alpha>100){num=-5}else if(_alpha<0){num=5}
}
if...
-
as is i think because b is calling it but maybe mx is different.
what happens when you test movie, did B.onLoad = init work?
F5 variation below.
[CODE]
// on parent clip a
onClipEvent (load) {...
-
there is a nice tutorial on gravity/friction etc here:
http://www.philterdesign.com/tutorials/tutorial01.html and another one here http://www.bit-101.com/
below is some gravity/bounce code you...
-
not sure about this line:
var targ = this.attachMovie("targetlink", "Target", _root.depth++);
wouldn't flash prefer :
_root.depth++
var targ = this.attachMovie("targetlink", "Target" +...
-
whenever i get something like this i put in a lot of trace commands all over which should eventually show where the code breaks down.
ps also the traces inside your function will not be called...
-
1) a couple of typo's in my post which should have started "you could use a prototype to..." (ie you don't have to :) ) and also "// in frame 1" should be "// in frame 1 on root timeline" just to be...
-
you use a prototype to make a function available to all mc's eg:
// in frame 1
MovieClip.prototype.wrap = function () {
if (this._x>550) {this._x = 0}
}
// on any movieclip
onClipEvent...
-
whispers you need to change two things in your api_line.fla:
change this:
onClipEvent (load) {
_x = point1._x;
_y = point1._y;
_xscale = point2._x-point1._x;
_yscale =...
-
unfortunately you cannot attach sounds from another movies library, you can only attach sounds from the library of the current movie.
movie1 can attach sounds (or clips) from the library of movie1...
-
_root.GreenPaketaLeft.gotoAndPlay("EndStart");
-
to increment the variable speed you can use speed=speed+1 or just speed++.
to loop thru the values speed1 to speed4 you can use array notation eg:
speed=3
speed1=5;
speed2=6;
speed3=-2;...
-
not a book but there are some good flash/xml related linke here which might help you:
http://www.were-here.com/forums/announcement.php?forumid=30
|
Click Here to Expand Forum to Full Width
|