A Scripting Problem?
Code:
this.thumb1_mc.onRollOver = function() {
thumb1_mc.gotoAndPlay("over");
}
this.thumb1_mc.onRollOut = function() {
thumb1_mc.gotoAndPlay("out");
}
this.thumb1_mc.onPress = function() {
thumb1_mc.gotoAndPlay("t1");
}
Above is the code I'm using to try and set the onPress fucntion of a MC button with the instance name of "thumb1" to gotoAndPlay "t1" t1 being a frame label in the timeline. My onRollOver & onRollOut functions are working fine, but my onPress is not doing anything. Any clue to why ?
[/code]
Actionscript 2.0
Posted on: Sat Nov 18, 2006 9:32 pm
View Complete Forum Thread with Replies
Sponsored Links:
Flash 5 Scripting Vs MX Scripting
ok, I have this script on a movieclip called g_loader:
onClipEvent(load) {
loadMovie("contact.swf",this);
}
onClipEvent(data) {
trace(this.getBytesTotal())
}
this is how it would be written in flash 5, and it worked fine.
I tried to write the same thing using MX syntax:
g_loader.onLoad = function() {
loadMovie("contact.swf",g_loader);
}
g_loader.onData = function() {
trace(g_loader.getBytesTotal())
}
And it WILL NOT WORK!! Am I going insane? Why won't this work!!!????
View Replies !
View Related
URL Scripting.
I've have a site made partly in flash.
And I have some buttons which are linked to other web pages.
My question is. Do i really need to specify the entire URL..the actual URL or can i just use it juts like that with the '/' or ''
all the pages are in e same folder including that of the page wit the flash component.
eg..the page name is ; Intro.htm
and therefore at the URL of go to ..do i have to type out the entire URL for eg. http://www.dunearnguides.scriptmania.com/Intro.htm
??
Thanks in advance..Cos i'm rather blurr on this..
View Replies !
View Related
Scripting V2
Hey,
I have a input text box and a submit button. How do i make ti so that the number in the text box goes to that frame number when the button hit submit button is clicked?
L8
View Replies !
View Related
Scripting Help
I'm working on a digital cv that has a pixelized version
of my face on it. As you roll over a series of button's the
relevant section of the face stretches out and will ultimately reveal a part of my cv.
The problem i'm having seem's to be with the way i've ordered or positioned the script. The script works if you roll over the buttons seperatly, but if you roll over all the buttons at once you don't get the desired effect of growing and shrinking. The script seem's to get confused or conflict with itself.
If anyone has a minute to help and look at my fla I could e-mail it to you and would be very grateful as it's almost there and is doing my head in.
Thank you
luke.parish
View Replies !
View Related
Scripting Can't Get It?
Hi everyone,
I'm having trouble getting an certain effect to work. I want to have something similar to the old 2advanced site what I'm trying to achieve is when a button is clicked I want a external swf to load in to main movie clip but while its loading I want these two doors to come in over whats loading behind the doors and stay there until the external movie is done loading. When the movie is loaded I want the doors to then open again! This is my code on the button.
on (release) {
_root.introclip.shutter.gotoAndPlay("open");
loadMovie ("members.swf", "membersload");
_root.introclip.membersload._x = -325;
_root.introclip.membersload._y = -179;
_root.introclip.membersload._yscale = 86;
loaded = _root.introclip.membersload.getBytesLoaded();
total = _root.introclip.membersload.getBytesTotal();
if (loaded == total) {
_root.introclip.shutter.gotoAndPlay("closed");
} else if (loaded < total) {
_root.introclip.shutter.gotoAndStop("closed");
}
}
if anyone could help it would be great!
Thanks
Kyle
View Replies !
View Related
SCRIPTING HELP
Can anyone please advise where I might be able to learn basics regarding Actionscript - preferably with a tutor based in London, UK. I have tried self taught tutorials but I need to fully understand the basics of variables, arrays etc. Without this knowledge it is very difficult to begin to understand the capabilites of Flash and it also takes me forever when scanning back and forth through the pages of books. I would prefer to pay someone to help me understand basic programming functions. Thanks in advance for any advice.
View Replies !
View Related
Scripting?
In flash 5 how exactly do you get to add your own scripting w/o using the actions Flash gives to you? If any1 understands what I am talking about, please help me....lol
View Replies !
View Related
Scripting M O V E M E N T ---->
Hello there.
I need to create a dragable "movie-clip" which
will detect it's position (_x + _y) on the stage.
and
will move (animation move) to new _x and _y positions
on the stage
I tried this code but it didn't work:
onClipEvent (mouseDown) {
startDrag("_root.mymovie");
}
onClipEvent (mouseUp) {
stopDrag();
}
onClipEvent (load) {
xpos = "_root.mymovie_x";
ypos = "_root.mymovie._y";
if (xpos>236 & ypos<154) {
xpos++ & ypos++;
}
}
View Replies !
View Related
AIM Scripting
I am batting my head against the wall because I have created AOL icons for buttons and am trying to get them to auto prompt the AIM to pop up which they do just fine. The problem is that blank windows pop up. Is there anway to get rid of them.
This is what I am doing
on (release) {
getURL("aim:goim?screenname=&message=Hi!");
View Replies !
View Related
Help With Scripting
on (press) {
for (i=4; i>-1; i--) {
for (var name in _leveli.mc) {
_leveli.mc.stop();
_leveli.mc[name].stop();
_leveli.stop();
}
}
}
Hi guys,
What I'd like to do is autodecrement a number and put it into a variable so I don't need to specify the amount of levels I have. But I can't seem to get the variable (i) working in the script above. What this basically does is pauses any movie clips that are playing in particular levels but I would like to set the _level so that it is automatically updated rather than type each individual level number and repeat the script.
Thanks again
View Replies !
View Related
Scripting Help?
Hello Board_
I am loading an SWF into another using the following action script :
________________________________
on (release) {
loadMovieNum("Tree.swf", 200);
}
________________________________
I guess that to most, I'm being rather redundant in saying that this script loads "Tree.swf" to level 200 of my main movie.
The SWF loads in the Upper Left corner of my main movie.
How can I make it load to a position 150 pixels down from there?
I am not planning on changing the X-axis coordinates.
Any help would be great.
Best Regards,
KQ
View Replies !
View Related
Scripting Help
how can i call a SWF into a MC?
i've got a movie clip on the stage with a button in it.
on release of that button i need to have a swf play inside that movie clip.
i know how to call the swf to my main movie but not to this movie clip.
thanks.
View Replies !
View Related
Please Need Scripting Help NOW
(flash 5)i am using the following script for a preloader in the first of a two scene movie...when it finishes and loads the second scene , it jumps over about a quarter of the second scene and proceeds to loop 30 some odd frames...it seems to get stuck..can you figure out if there is something wrong with the script or what?..how can i fix it/figure it out?..i got a deadline, any ideas appreciated...thanks....
loadedbytes=getBytesLoaded();
totalbytes=getBytesTotal();
loadedkbytes=Math.ceil (loadedbytes/1000);
totalkbytes=Math.ceil(totalbytes/1000);
if (loadedbytes == totalbytes) {
nextScene ();
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}
View Replies !
View Related
Scripting Help.
Hey everyone,
I'm only 17 but I'm determined to be a top webdesigner. I'm not sure if I'll be able to afford university so I want to start learning now. I need some help and guidance with scripting, cgi, perl, even java. I'm good with graphics etc already, and I can make a site, but scripting gets me.
Please post any good links to beginners guides to scripting of any relevant kind. Also, if you're willing to talk me through things you can add me to your Yahoo! and my ID is annunaki_of_nibiru Please help my dream come true.
Best regards,
KD.
View Replies !
View Related
PHP Scripting
Hey - I finally have Flash MX! Yay! lol
My question is in regards to retreiving data from a php script. I am using YaPP (Yet another PHP Portal), and it comes with a forum, on it I am able to see who's currently logged in. I'm wanting to implement this script on my flash movie, but I've no clue where to start. Any help on how to do this would greatly be appreciated. TIA
View Replies !
View Related
Scripting Help
Hi im trying to make a clock that displays the date and time and i can get the time down, but i cant get it to display the date and im wondering if i coded something wrong, heres the code:
d=new Date()
day=d.getDate()
if(day>10){
day= "0" +day
}
mon=d.getMonth()
if(mon>10){
mon= "0" +mon
yer=d.getYear()
timed=+mon +"/" +day +"/" +yer
My hopes what to make it look like this:
mm/dd/yyyy
Any help is greatly appreciated
View Replies !
View Related
Scripting Help
Is anybody out there can help me to figure out the script below? the script below is to control a car by the arrow keys, but this script only works when I put the car movie clip and the boundary movie clip on the main stage which is the _root.
What I want is to put the boundary movie clip on the main stage (_root.boundary) and the car movie clip put inside another movie clip called land (_root.land.car), but once i put the car and the boudary in a different place, the car will not stop when it hits the boundary.
i will really appreciate it if someone can help me on this.
-------------------------------------------------------------------
// this script is to attach to the car movie clip.
onClipEvent (enterFrame) {
// make the car go forward
if (Key.isDown(Key.UP)) {
speed += 1;
}
// make the car go backwards
if (Key.isDown(Key.DOWN)) {
speed -= 1;
}
// tells the car to slow down after the speed of 20
if (Math.abs(speed)>20) {
speed *= .7;
}
// you can change the rotation of the car to your desire
if (Key.isDown(Key.LEFT)) {
_rotation -= 15;
}
if (Key.isDown(Key.RIGHT)) {
_rotation += 15;
}
// here is where the hittest is for the boundary
speed *= .98;
x = Math.sin(_rotation*(Math.PI/180))*speed;
y = Math.cos(_rotation*(Math.PI/180))*speed*-1;
if (!_root.boundary.hitTest(_x+x,_y+y, true)) {
_x += x;
_y += y;
} else {
speed *= -.6;
}
}
View Replies !
View Related
Scripting Help....
k guys heres my problem, i have a bunch of buttons on a scene and what i want to happen is that only after u click every single button will the scene jump to the next scene... wat code would be required??
View Replies !
View Related
Scripting Help
I nned some help with a script that zooms out and zooms in. I have the zooming part working good but I can't get it to zoom out from center. I know very vague, so i attached a file for a better explanation. By looking at the flash file the problem sould be very obvious.
Thanks for the help
JLD
View Replies !
View Related
Scripting Help
Hey all,
I am not very familiar with actionscripting. I am learning thanks to all of you in this forum. I have used in my movie the "loadmovie action" and everything works fine. Now the problem I have is that I have pictures that I want to click on (like a button) and have each picture become larger and center in the same movie. I have done some reading with the available tutorials that I can find and it is apparent (i hope I am right) that i need to introduce some variables. I dont know how to assign or even begin to start with variables. Any help you could provide would be greatly appreciated.
BTW I am using FLASH 5....
Thanks
CHANDLER26....
View Replies !
View Related
Scripting
Scripting
Greetings all. I'm a new Flasher and I'm going crazy. Ok, maybe i'm already crazy from trying to make something work that doesn't. Here goes. I downloaded a file from Flashkit and don't know what I'm suppose to do with it to make it work. (DUH) It's action scripting but I don't know where to input the script in order to make it work. Am I suppose to put this in something like Frontpage or HTML or should I be putting it straight into Flash. I have the MX version. Am I way off beat or what. Many thanks for any feedback.
Here's the script.
2 parts to this script
<script language="JavaScript">
<!--
//you can assign the initial color of the background here
r=255;
g=255;
b=255;
flag=0;
t=new Array;
o=new Array;
d=new Array;
function hex(a,c)
{
t[a]=Math.floor(c/16)
o[a]=c%16
switch (t[a])
{
case 10:
t[a]='A';
break;
case 11:
t[a]='B';
break;
case 12:
t[a]='C';
break;
case 13:
t[a]='D';
break;
case 14:
t[a]='E';
break;
case 15:
t[a]='F';
break;
default:
break;
}
switch (o[a])
{
case 10:
o[a]='A';
break;
case 11:
o[a]='B';
break;
case 12:
o[a]='C';
break;
case 13:
o[a]='D';
break;
case 14:
o[a]='E';
break;
case 15:
o[a]='F';
break;
default:
break;
}
}
function ran(a,c)
{
if ((Math.random()>2/3||c==0)&&c<255)
{
c++
d[a]=2;
}
else
{
if ((Math.random()<=1/2||c==255)&&c>0)
{
c--
d[a]=1;
}
else d[a]=0;
}
return c
}
function do_it(a,c)
{
if ((d[a]==2&&c<255)||c==0)
{
c++
d[a]=2
}
else
if ((d[a]==1&&c>0)||c==255)
{
c--;
d[a]=1;
}
if (a==3)
{
if (d[1]==0&&d[2]==0&&d[3]==0)
flag=1
}
return c
}
function bgtrans()
{
if (flag==0)
{
r=ran(1, r);
g=ran(2, g);
b=ran(3, b);
hex(1,r)
hex(2,g)
hex(3,b)
document.bgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3]
flag=50
}
else
{
r=do_it(1, r)
g=do_it(2,g)
b=do_it(3,b)
hex(1,r)
hex(2,g)
hex(3,b)
document.bgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3]
flag--
}
if (document.all)
setTimeout('bgtrans()',50)
}
//-->
</script>
==================================================
====
part 2
==================================================
====
<!-- --><body onload="bgtrans()"><!-- -->
View Replies !
View Related
Php Scripting
Hello,
i have no idea how to start going about making this.
what i have is a form and you type in a name for example and then it gets saved to a file on the internet. i have already made this work with sharedobject, and i have a server to host the script - how do i make the scripts.
View Replies !
View Related
Help With Mx Scripting
OK, heres my mx scenario.
4 buttons on an oval motion path.
They need to rotate counterclockwise
on rollover (except if rollover is on whichever one is front and center.)
Whichever button is rolled over should be the one to stop front and center and could then be chosen to open a corresponding mc.
I can do this with a lot of keyframing and stop actions in the timeline, but i would like a more efficient scripting approach.
Please Help!!I posted this in the action script forum and no one has replied.!! Thanks!
heres a pic if it helps!
View Replies !
View Related
Scripting
I use Swish.. knock off of flash. But i was wondering how I could open up a sized window with it using actions and maybe java or html. If anyone knows the java for a link to open a sized window that should be all i need. I just don't know it. www.siwebdesigns.com/FB My bands website.. we are going to impliment a scrolling text box for the news. We were ganna have the news do like the fear-store does but when i put the ffects in to transform it moves from where the last effect was.. which makes everything go wacko. If that makes sense...
Ryan
View Replies !
View Related
Scripting Help
Okay, I've just downloaded this chat thing in the "Movies" section at http://www.flashkit.com/movies/Appli...7898/index.php. I was wounder can any help me script it. It's in PHP so I don't know anything about it. If you can, please reply it here, or Email me at hongnanthinguyen@yahoo.com.
Thank you so much!
P.S. Please explain it in a way that I can understand. I such a newbie to PHP.
View Replies !
View Related
.fla Scripting HELP
I'm a little new to Flash, and i have NO idea on how to put these on you Site (HTML code). I tried the one for Shockwave Flash, but it didn't work. The file extension is .fla
Can somone help me?
View Replies !
View Related
Please Help With Scripting
Hi, I have created my swf movie, but do not know how to embed it in my site to make it show. I have a test page set up at http://www.candlesofeden.com/index1.html Could someone please let me know what I'm doing wrong? Thanks.
View Replies !
View Related
Help With Scripting.
Hello, i was wondering if someone could help me with something.
I've been making this site, http://halogic-design.tragicntrue.net/halogic.html
i've been wodering if there is a way to put http://livejournal.com/~halozero in the main box when the "journal" link is clicked from the main menu.
thanks.
-ray.
View Replies !
View Related
Scripting
I have my movie stopping at frame 245 and a nav bar rolls down. OnMouseRelease i want it to finish the scene... play frames 246 to 270 and then load another scene.
Any hints on how i do this?
Thanks
View Replies !
View Related
Scripting
hi i have a problem, i have a couple of swf files and on the main one there a button that i want went click it will load a swf file but then unlaod the main page so there no conflict does anyone know how to do that????? thank you
View Replies !
View Related
Help With Scripting In MX
I am trying to make a game and have the _x and _y from one MC become detected when they equal some _x and _y value of another MC. I don tknow how to do this with MX...the flash tutorials dont seem to help at all. I dont understand if I am suppose to getProperty or setProperty -- also i dont understand the parameters of these two commands. Is there another flash tutorial site that might help?
View Replies !
View Related
New To Scripting
Here's the deal I'm new to scripting and i need help with loading jpg in to flash.
I have multiple buttons and i want them to load a jpg to a certain place on the screen. I also need to be able to resize the pictures to fit the desired area and the pictures need to do a quick 3-5 frame fade in..
all these images are external, inside an images folder. i would also like to know how to make a quick preloader to load before each image if needed.
i tried a few things but nothing seemed to work so if anyone could help me out i would really appriciate that ..thank you
View Replies !
View Related
Need Some Scripting Help :)
Hello i am new here, i was working with a file that i had found on here that looked neat. I was trying my best to get it to work within a little website that i was working on but everything i try does not seem to work. The file that i am talking about can be found here on this site....
http://www.flashkit.com/movies/Inter...9792/index.php
My question is to how i can get the buttons to go to another place inside my movie. I thought that by changing after the on release command at the end of the button scripts it would do it but apparently not. I think it has something to do with that the buttons are also movie clips. But honestly i have no idea and any help would be great because i am losing sleep trying to figure this out. So again what i am trying to figure out is where in the code i edit so that the buttons will function and by clicking on them will take the user to the desired placed within the movie.
thanks
View Replies !
View Related
Map Scripting Help
Well...I'm close...I'm trying to develop a pretty simple map with scripted pan, and zoom functions.
I've got the pan working nicely, but I'm having trouble with the zoom (getting it to zoom on center properly). I think I'm very close, just off with the math somewhere after staring at this thing for hours.
If someone could take a peak at the code and let me know what you think it would be much appreciated. I'm sure it's something obvious, I'm just braindead from looking at this for so long.
Zip: http://www.thodyconsulting.com/junk/mapv3.fla.zip
Sit: http://www.thodyconsulting.com/junk/mapv3.fla.sit
adam@thodyconsulting.com
Cheers,
Adam
View Replies !
View Related
MC Scripting
Hi, I've been making a pretty good game and managed to work out how to shoot people and everything, anyway, I want to be able to make the scene goto my Game Over screen once the health in the HealthBar Movie clip has gone. With the health movieclip, I've managed for it to lose a part everytime someone shoots, but once it gets to the empty part of it (i.e when you die) a put in a script saying
tellTarget (_root) {
gotoAndPlay("Game Over", 1);
}
this seems to work when I add it to someone dieing (i.e, i've made it go on to the nextScene), but not with this, any help would be appreciated, thanks.
View Replies !
View Related
Scripting I Cant Do It
ok i have to make a portfolio piece for a class so i have to have a home page, a gallery page, a resume and a contact page, OK But i can not get my pages to go from one to the next and i cant get buttons to go from next to previous i just cant program anything in flash I have flash MX 2004 professional PLEASE HELP
View Replies !
View Related
Scripting Help
Been away from Flash for the last 3 years. Nice being back agian. Looking at code, what does "" mean? Is this a path, _this, _root, etc? Also what is this ..:?
Thanks
Ian
View Replies !
View Related
Scripting Help
Hey all flash-kit members,
I need some help with this interface idea I had. I would like to know how could I script this so all the box’s are dynamic and the animation is all scripted.
This has been puzzling me for a few days now.
I have attached a manually scripted FLA with only one of the box’s working but you will get the idea.
Thanks,
D.
View Replies !
View Related
Need Scripting Help
Hello
What I am trying to create is a simple car racing game from one of the tutorials I found on this site. However, a car game isn't a game without lap.
My problem is creating a counter that would count the number of laps that have been completed and end the race after 3 laps.
It sounds easy enough and I know how it would be done, I just dont know how to code it and such.
Could someone please explain to me how I would create a counter for laps that would finish after crossing the 'finish' line 3 times?
Thanks!
-Ostil-
View Replies !
View Related
Very New To Scripting
Hi everybody Iam new to this forums and very very new to actionscript.
Iam a cartoonist and designer for web as well printmedia. I know macromedia flash. I do animation upto the clients requirement and satisfaction but my weak point is action scripting. When it comes to the action script all my completed projects are being handed over to the action script guys and final credit goes to them. It really hurts me. I paid Rupees 3000 (almost $60) for learning basic in action script. But only I attended 2 days last week for classes in the evening....My boss unable to spare me for classes. He made me to float over some white papers for rough drawings to be scanned for animation. Even I donot know myself all my animation works are going where and who is using them. Iam not aware of how much they are getting from clients for my works. I almost lost my 3000 thousand rupees for want of learning action script basics. Since I donot know the actionscript the other actionscript guys looking at me as if Iam an illiterate. They can't draw a single line on drawing sheet for animation purpose. Only their positive point is scripting and taking total credit. After somuch of hardwork management pays me 10,000 rupees per month (equals to $200). Thinking this consequences at my workplace Iam totally become sleepless....But I want to learn actionscript at any case....Presently Iam not in position to go for classes..I forgot about my rupees 3000. I want to start learning action scripting right from ABCDs...
I request forum member to help me out from this situation. Iam unable to bear the inferior feeling that has been developing day by day. During nights I will have lot of free time. But by that time all Actionscript institutess are getting closed for the day.
Please suggest me to start my scripting tutorials through flashkit forums right from ABCDs with members help.
A forum member inneed is a forum member indeed.
Regards
Ramakrishna
View Replies !
View Related
Scripting Help
Can anyone help me with this?
I want to click an object to set it moving (I can do that bit), but when it hits a target, how do I tell it to set another movie clip running?
Thanks
View Replies !
View Related
Help With Scripting?
I want to make a scripting program to gather codes from this game, if someone could just tell me where to start it would be a great help
http://adisney.go.com/disneypictures...flyingDutchman
The game when played through to the end provides you with a random code for use in another game. I want to write a scripting program to run throught the mini game over and over and collect the provided codes in a seperate folder.
thank you for whatever help you can give
or i need a scripting program to feed the codes into another flash game?
anything will help.
Nate
View Replies !
View Related
Need A Lil Scripting Help
I am trying to load numbers into this paypal button for a tool that i have design'd for my customers. This tool estimates a total price and some other figures. I want to take that data and put it into an ad to cart button. So far I havent been able to come up with it. This is the script I have at the moment.
Code:
on (release) {
var eq1:Number = colors.text;
var eq2:Number = shirttotal.text;
var eq3:Number = blankcost.text;
var eq4:Number = discounted_final.text;
on0= "# of Colors";
os0= eq1;
on1= "# of Shirts";
os1= eq2;
on2= "Blank Cost";
os2= eq3;
cmd = "_cart";;
add = "1";
business = "my@email.address";
item_name = "Custom Order";
amount = eq4;
no_shipping = "2";
no_note = "1";
currency_code = "USD";
lc ="US";
bn = "PP-ShopCartBF";
getURL("https://www.paypal.com/cgi-bin/webscr","_blank","POST");
}
And the tool is located at:
http://www.grimshirts.com/Custom_Discounted._WIP.swf
Let me know if anyone can make this work. Thanks for the help!
View Replies !
View Related
|