Cleaner Scripting
I think the code says it all. For a current project I need to use a hit area to start an animation when a mouse rolls over a _mc.If I use the movie clip instead of a button I can simplify the script by using the first section of the attached code. In the simplified code I only have to define one over and one out state and then I can use a this statement to control the action.For any number of _mc's I just need one set of functions.Using buttons, each _mc needs it's own over and out definition and it's own unique set of functions. I've tried using a bunch of if (grnMC_button.onRollOver = true) {this statements apply only to grn_mc} (not really code) but I can't find anything that works. It would be a great time saver if I could because in the final project I've got about 75 movie clips to control with over functions.One more thing. I can't use the movie based code because the animations move out from under the buttons and the mouse over area gets big and overlaps the other "buttons". I guess I'm really looking for a way to define a hit area and still keep the code simple. Attach CodeMovie driven _mc sample code:˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜// over-out definitionsgrn_mc.onRollOver = over;grn_mc.onRollOut = out;blu_mc.onRollOver = over;blu_mc.onRollOut = out;red_mc.onRollOver = over;red_mc.onRollOut = out;// onRollOver functionsfunction over () {this.overThis = true;this.gotoAndPlay("start");}// onRollOut functionsfunction out () {this.overThis = false;Button driven _mc sample code:˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜// button definitionsgrn_btn.onRollOver = over_grn;grn_btn.onRollOut = out_grn;blu_btn.onRollOver = over_blu;blu_btn.onRollOut = out_blu;red_btn.onRollOver = over_red;red_btn.onRollOut = out_red;// onRollOver functionsfunction over_grn () {grn_mc.overThis = true;grn_mc.gotoAndPlay("start");}function over_blu () {blu_mc.overThis = true;blu_mc.gotoAndPlay("start");}function over_red () {red_mc.overThis = true;red_mc.gotoAndPlay("start");}// onRollOut functionsfunction out_grn () {grn_mc.overThis = false;}function out_blu () {blu_mc.overThis = false;}function out_red () {red_mc.overThis = false;}Edited: 05/16/2007 at 11:25:53 AM by Rick Gerard
Adobe > ActionScript 1 and 2
Posted on: 05/16/2007 11:15:50 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Scripting Is Supposed Flash Movie Much Cleaner
Scripting is supposed flash movie much cleaner, there should be a straight forward way to do this.
the example we can call "test.swf"
the movie clip we will call "fade" which resides inside the library
"fade" extends over 50 frames the first 30 have a snazzy animation upon a mouse click on a button in the main menu.
I would like to use this movie clip again just starting at frame 30. My question is can you reference a frame label inside the "fade" clip from the "test.swf?"
Note tell target is usefull by adding a ../ script you can exit a movie clip. Can you preform this code to enter in a clip?
Much thanks
aspiring asssstronaught
Cleaner
Hi
Just wondering if anyone uses Cleaner EZ which comes with Premier etc to compress their video files into Quicktime?
Im stuck on selecting the right settings...I need the video to be fairly small but it ALWAYS ends up being too blurred...
Thanks!
Can This Be Cleaner?
this is a movieclip that can move threw a maze of objects. if the user hits an object the movieclip jumps to frame that shows it crashing. Everything works. my question is.. can the code be cleaner or wrapped up in a function?
onClipEvent (enterFrame) {
if (Key.isDown(37)&& hitTest(_level0.wall)==false) {
_x=_x-4;
}
if (Key.isDown(38)&& hitTest(_level0.wall)==false) {
_y=_y-4;
}
if (Key.isDown(39)&& hitTest(_level0.wall)==false) {
_x=_x+4;
}
if (Key.isDown(40)&& hitTest(_level0.wall)==false) {
_y=_y+4;
}
if (hitTest(_level0.wall)==true) {
this.gotoAndPlay("hit");
}
if (hitTest(_level0.wall2)==true) {
this.gotoAndPlay("hit");
}
if (hitTest(_level0.wall3)==true) {
this.gotoAndPlay("hit");
}
}
[F8] Is There A Cleaner Way To Do This?
This code works just fine for restricting the area I can draw in, but it seems very inefficient. Is there a better way?
Code:
onMouseMove = function () {
if (_xmouse>32 && _ymouse>32 && _xmouse<607 && _ymouse<397) {
drawingArea.lineTo(_xmouse, _ymouse);
}
};
My movie actually uses close to 100% CPU after scribbling a lot, and I think it might be this code thats doing it.
AS2 - URL Cleaner
Hello, this is a great tool that i use to filter path to test locally.
the function:
function cleanVBLE(vble)
{
a = new String(vble);
b = a.split("/");
return b.pop();
}
the usage:
trace(cleanVBLE("/formas/80094/canalune.swf"));
Cleaner Animation
I am trying to make a movie which will play fullscreen with a small area with 20% opacity visible in the center. Now my character (any image) will erase the black background so that a clear picture becomes visible.
Pls. help. urgent
Cleaner Code
I have a code that consolidates current moneys into the least amount of tokens possible. It works but the actual code is extremely bulky, i was wondering if anyone has a tip or sees something that can be removed/replaced for less code
Thanks
code: C_Amount = _root.betTotal;
if(C_Amount < 25)
{
NumLeft = C_Amount % 10;
if(NumLeft < 5)
{
dollar_1 = NumLeft;
dollar_10 = (C_Amount - NumLeft) / 10;
}else{
NumLeft1 = NumLeft % 5;
dollar_1 = NumLeft1;
dollar_5 = (NumLeft - NumLeft1) / 5;
dollar_10 = (C_Amount - NumLeft) / 10;
}
}
[CS3] Cleaner Code
Hi,
Is there an easier, cleaner way to write:
type = _root.page;
if (_root.pageOn == 1)
{
if (type == 'ftp')
{
_root.content.ftp.filters = [myBlurFilter];
_root.content.ftp._alpha = 50;
}
if (type == 'news')
{
_root.content.news.filters = [myBlurFilter];
_root.content.news._alpha = 50;
}
if (type == 'hello')
{
_root.content.hello.filters = [myBlurFilter];
_root.content.hello._alpha = 50;
}
if (type == 'contact')
{
_root.content.contact.filters = [myBlurFilter];
_root.content.contact._alpha = 50;
}
if (type == 'exhibitions')
{
_root.content.exhibitions.filters = [myBlurFilter];
_root.content.exhibitions._alpha = 50;
}
if (type == 'interiors')
{
_root.content.interiors.filters = [myBlurFilter];
_root.content.interiors._alpha = 50;
}
if (type == 'conferences')
{
_root.content.conferences.filters = [myBlurFilter];
_root.content.conferences._alpha = 50;
}
if (type == 'live_events')
{
_root.content.live_events.filters = [myBlurFilter];
_root.content.live_events._alpha = 50;
}
if (type == 'new_media')
{
_root.content.new_media.filters = [myBlurFilter];
_root.content.new_media._alpha = 50;
}
if (type == 'people')
{
_root.content.people.filters = [myBlurFilter];
_root.content.people._alpha = 50;
}
if (type == 'clients')
{
_root.content.clients.filters = [myBlurFilter];
_root.content.clients._alpha = 50;
}
}
Cleaner Code
Hi all, I'm currently working on creating a simulated training flash-based presentation and I'm looking to improve my coding habits.
Part of the simulation was to create a custom cursor that functions just as any data entry cursor would. Here's where I need to improve:
The user is restricted to only entering uppercase glyphs at this point, so the cursor should only respond if a letter character is pressed. All other characters should be ignored. I've figured a method to do this, and it works just fine, but the code is very repetitive and long. I'm guessing that there is a better way to do this by referencing a list of key codes in the conditional statement, but I'm not sure how to go about it. Here's what the code looks like
Thanks
Code:
onClipEvent(keyDown) {
//ignore tab
if (key.isDown(9)) {
this._x = this._x;
} else if (key.isDown(12)) {
this._x = this._x;
} else if (key.isDown(13)) {
this._x = this._x;
} else if (key.isDown(16)) {
this._x = this._x;
} else if (key.isDown(17)) {
this._x = this._x;
} else if (key.isDown(112)) {
this._x = this._x;
} else if (key.isDown(113)) {
this._x = this._x;
} else if (key.isDown(114)) {
this._x = this._x;
} else if (key.isDown(115)) {
this._x = this._x;
} else if (key.isDown(116)) {
this._x = this._x;
} else if (key.isDown(117)) {
this._x = this._x;
} else if (key.isDown(118)) {
this._x = this._x;
} else if (key.isDown(119)) {
this._x = this._x;
} else if (key.isDown(120)) {
this._x = this._x;
} else if (key.isDown(121)) {
this._x = this._x;
} else if (key.isDown(122)) {
this._x = this._x;
} else if (key.isDown(123)) {
this._x = this._x;
} else if (key.isDown(124)) {
this._x = this._x;
} else if (key.isDown(48)) {
this._x = this._x;
} else if (key.isDown(49)) {
this._x = this._x;
} else if (key.isDown(50)) {
this._x = this._x;
} else if (key.isDown(51)) {
this._x = this._x;
} else if (key.isDown(52)) {
this._x = this._x;
} else if (key.isDown(53)) {
this._x = this._x;
} else if (key.isDown(54)) {
this._x = this._x;
} else if (key.isDown(55)) {
this._x = this._x;
} else if (key.isDown(56)) {
this._x = this._x;
} else if (key.isDown(57)) {
this._x = this._x;
} else if (key.isDown(186)) {
this._x = this._x;
} else if (key.isDown(187)) {
this._x = this._x;
} else if (key.isDown(188)) {
this._x = this._x;
} else if (key.isDown(189)) {
this._x = this._x;
} else if (key.isDown(190)) {
this._x = this._x;
} else if (key.isDown(191)) {
this._x = this._x;
} else if (key.isDown(192)) {
this._x = this._x;
} else if (key.isDown(219)) {
this._x = this._x;
} else if (key.isDown(220)) {
this._x = this._x;
} else if (key.isDown(221)) {
this._x = this._x;
} else if (key.isDown(222)) {
this._x = this._x;
} else if (key.isDown(32)) {
this._x = this._x;
} else if (key.isDown(37)) {
this._x = this._x;
} else if (key.isDown(38)) {
this._x = this._x;
} else if (key.isDown(39)) {
this._x = this._x;
} else if (key.isDown(40)) {
this._x = this._x;
} else if (key.isDown(20)) {
this._x = this._x;
} else if (key.isDown(106)) {
this._x = this._x;
} else if (key.isDown(107)) {
this._x = this._x;
//don't move left of original position
} else if (key.isDown(8)) {
if (this._x > 104) {
this._x -= 10;
}
//don't move right of new position
} else if (this._x < 112) {
this._x += 10;
}
}
If/Else - Is There A Cleaner Code?
Hello all,
I am currently working on a flash file and I'm an intermediate user. My actionscript abilities are probably close to beginner, but I'm a quick learner (most of what I have learned with actionscript has been self taught).
In my flash file I have an animation of a rotating globe. Each frame of the rotation is a separate raster image - I don't know how you would represent a rotating globe otherwise, not really something that can be tweened (suggestions are welcome).
I have different locations off to the side of the globe. When the user mouses over a location, the globe spins to that location. When they roll out, the globe spins back to a static starting point.
I wanted the animation of the globe to be as smooth as possible, so, I have a }else{ statement for every possible frame. IE - if the globe animation is rotating back from a position and the user mouses over a new location before the animation stops, it doesn't jump back to the starting static position, it seemlessly flows from the position it is currently at to the new position the user has moused over.
Make sense?
It works flawlessly as is. I've spent quite a bit of time testing it. However, the code is bulky in appearance and according to the size report bulky in bytes as well.
Is there a differnent way to set this up to cut down on size - mainly byte size if possible?
I will include a bit of code so you can see what I'm talking about:
on (rollOver) {
if (_root.EarthClip._currentframe == 1) {
_root.EarthClip.gotoAndPlay(140);
} else { if (_root.EarthClip._currentframe == 160) {
_root.EarthClip.gotoAndPlay(156);
} else { if (_root.EarthClip._currentframe == 161) {
_root.EarthClip.gotoAndPlay(155);
} else { if (_root.EarthClip._currentframe == 161) {
_root.EarthClip.gotoAndPlay(154);
} else { if (_root.EarthClip._currentframe == 163) {
_root.EarthClip.gotoAndPlay(153);
and so on, and so on . . .
Any help would be greatly appreciated.
Thank you in advance.
-MShetler
Cleaner, Crisper Text
can anyone explain how to get cleaner, crisper text in FlashMX. Thank you.
LoriSchlitz
Cleaner 6 Or Sorenson Squeeze?
hi
I have cleaner 6, but a friend says sorenson squeeze it a better compressor for use of video in flash. Shoul i get a copy? or will cleaner suffice??
Techniques To A Cleaner Program
Hi, Im not an expert in flash, but I do on occasion help some buddies out if they want a menu or something on their webpage. When I am making these files, it seems like my organization and technique is sloppy. Any comments / suggestions / flames are welcome on how I could better organize this and other projects in the future.
~Thanks
Link to File:
http://www.geocities.com/matteoelbow/SR_Menu1.fla
Link to movie:
http://www.geocities.com/matteoelbow/SR_Menu1.swf
[CS3] Help Need A Cleaner Way To Write This Array Of Buttons
Hi there,
not sure how difficult this is going to be, but I have 30 movie clips, which will all be sequentially numbered. (pos1, pos2, pos3......pos30).
They will all have the same functions, with the only change being the number.
I know there is a more efficient way to write this code using arrays, but I will need help with it. I would rather have 10 lines of code than 150.
I also need help with writing the code, that will disable all other movie clips, once the first one is clicked.
Also, not sure how tricky the javascript part will be.
Below is the code i am trying to achieve, but the long version.
PHP Code:
pos1.onRelease=function(){
this.gotoAndStop("selected");
getURL("Javascript:JSposition('',1)");
(all other buttons).enabled = false;
}
pos2.onRelease=function(){
this.gotoAndStop("selected");
getURL("Javascript:JSposition('',2)");
(all other buttons).enabled = false;
}
pos3.onRelease=function(){
this.gotoAndStop("selected");
getURL("Javascript:JSposition('',3)");
(all other buttons).enabled = false;
}
pos4.onRelease=function(){
this.gotoAndStop("selected");
getURL("Javascript:JSposition('',4)");
(all other buttons).enabled = false;
}
... all the way to
pos30.onRelease=function(){
this.gotoAndStop("selected");
getURL("Javascript:JSposition('',30)");
(all other buttons).enabled = false;
}
AS Guru's please help!!!
Thanks.
Cleaner Movie Clip Dragging
I briefly remember seeing a tutorial for this somewhere but I cant find it anywhere. But is there a way to drag movie clips around using startDrag but with a cleaner more fluent motion as it a bit jolty when moving?
Anydony know the answer?
Flash Media Cleaner Addons
I'm looking for an add-on lilke Sorenson Squeeze for Flash, but this is a little pricey for me.
http://www.sorensonstore.com/product.../sq4mfwin.html
Does anyone know of something comparable for less? I know. You get what you pay for, but I need something to get me by while I'm learning Flash.
I'm not looking for shareware, etc. Just an inexpensive, nifty program to get me started as a newbie.
Thanks in advance for any help.
Can I just say I'm loving Flash. I just starting using it a few days ago, and I'm hooked! This is so much nicer when embedding video to webpages. Whoa!
Edit:
Does anyone know if the addon comes with Studio MX 2004? Because I plan on upgrading very soon. I definately don't want to dish out $119.00 for the addon if it ships with Macro's latest studio.
Quick Question For Cleaner Code
Just need some advice on how to clean this code up. I know there has got to be a way to combine the 2 movieclips....
Basically I have 4 movieClip buttons. currently only the first is working.... How would I add the other f2, f3, f4 MC's without having to write a function for each one?
Here is the code I have:
Code:
f1.addEventListener(MouseEvent.MOUSE_OVER, hoverOver);
f1.addEventListener(MouseEvent.MOUSE_OUT, hoverOut);
f2.addEventListener(MouseEvent.MOUSE_OVER, hoverOver);
f2.addEventListener(MouseEvent.MOUSE_OUT, hoverOut);
f3.addEventListener(MouseEvent.MOUSE_OVER, hoverOver);
f3.addEventListener(MouseEvent.MOUSE_OUT, hoverOut);
f4.addEventListener(MouseEvent.MOUSE_OVER, hoverOver);
f4.addEventListener(MouseEvent.MOUSE_OUT, hoverOut);
function hoverOver(event:MouseEvent):void
{
f1.gotoAndPlay(2);
}
function hoverOut(event:MouseEvent):void
{
f1.gotoAndStop(11);
}
f1.buttonMode = true;
f2.buttonMode = true;
f3.buttonMode = true;
f4.buttonMode = true;
Problematic Flash Files: "Cleaner" Needed (Paid)
Hello all,
I've hit a wall in several small Flash movies that are integrated into one online course, things that I'm sure I can figure out with time, but time is something I ain't got. I need a Flash wiz who can figure out what I've done wrong, improve the actionscripting where necessary, and also finish off some elements that have me stumped (and tell me what I've done wrong in the process). It's actually pretty basic stuff...and all the major groundwork has been done...but there might be a few challenges. You need to be familiar with video/audio integration...everything else is standard stuff.
If you're interested, please send me an e-mail and let me know your preferred method of payment: hourly or project-basis...and if you prefer hourly, please let me know your hourly rate since I have to get approval. Also, please include a link to your Flash portfolio.
BTW - This could possibly lead to a long-term project-basis work relationship.
Thanks! I hope to hear from you!
John
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!!!????
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..
Cgi Scripting
How do I create scripts needed for submitting forms in Flash 5? Is there any toturials?
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
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
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
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.
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
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++;
}
}
Scripting
What is the name/format of the scripting that you write in flash mx? is it c++, or a special flash script, or something else?
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!");
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
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
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.
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);
}
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.
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
Help Me With This Scripting
what is wrong with this script
if (success) {
i=1
while (i <= 9){
user[i] = this.user+(i);
password[i] = this.password+(i);
i = i + 1
}
}
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
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;
}
}
Scripting With ASP?
Is it possible to update image and text content within a Flash site with ASP?
If it is what would be the best course of action to take?
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??
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
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....
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()"><!-- -->
Scripting?
I was wondering if there was any way to find who the person is logged in as, using either java or a/s? any help?
thanks
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.
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!
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
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.
.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?
|