Scripting For A Timer
An arrow keyed mc moving around i need a timer to start once one or more arrow keys it hit, and I need the timer to stop and forward to a finish frame once it touches another object
FlashKit > Flash Help > Flash ActionScript
Posted on: 02-14-2004, 01:34 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Scripting SWF Load & Timer Question
I created 3 separate Flash based presentations, and wanted to put them all in 1 SWF so they can play in a loop. Currently, I just create an EmptyClip and use LoadMovie to get it working for the first movie. Then 1000 frames or so later, I have a 2nd layer which starts the second movie. Same for the 3rd one. This really feels clumsy, and I am wondering if there is no better way of doing this. I figured I could just use a few lines of ActionScript to do something like "on frame 1000, loadmovie 2", and "on frame 3000, loadmovie 3". Obviously, when a movie starts, I want the previous one to stop playing. Is this possible?
Also, I have a dynamic text field that I would like to refresh every 15 seconds or so. Which is the most efficient way of doing this? Keep in mind that I am still a 'newbie' Thanks!
Difference Between Timer.stop() And Timer.reset()?
Hello,
What is the difference between Timer.stop() and Timer.reset() functions because it seems that the 2 functions do the same thing? I image Timer.stop() to stop the timer and when Timer.start() is called the timer starts from where it stopped. For example, if I have a 3 sec. timer (3000 ms). If I stop the timer after 2.5 sec. and start the timer again, I would expect the timer to expire/trip within .5 sec. Is this a correct assumption?
Thanks,
Nilang
Difference Between Timer.stop() And Timer.reset()?
Hello,
What is the difference between Timer.stop() and Timer.reset() functions because it seems that the 2 functions do the same thing? I image Timer.stop() to stop the timer and when Timer.start() is called the timer starts from where it stopped. For example, if I have a 3 sec. timer (3000 ms). If I stop the timer after 2.5 sec. and start the timer again, I would expect the timer to expire/trip within .5 sec. Is this a correct assumption? Code is attached below.
Thanks,
Nilang
Attach Code
// Declarations
var url:URLRequest;// Url
var snd:Sound;// Sound Object
var sndChan:SoundChannel;// Sound Channel Object
var sndPosition:Number;// File offset
var tmr:Timer;// Timer object
var isPlaying:Boolean;// Flag to indicate whether file is
// playing or not
var isPlayDelayed:Boolean;// Flag to indicate whether starting
// of file has been delayed or not
var hours:Number = 0;// Hours
var minutes:Number = 0;// Minutes
var seconds:Number = 0;// Seconds
var milli:Number = 0;// Milliseconds
var pauseTime:Number = 0;// Time when paused
var pauseLength:Number = 0;// Length of pause
var buttonPressTime:Number = 0;//
var timing:Boolean = false;// Flag
// Initialize variables.
isPlaying = false;
isPlayDelayed = true;
sndPosition = 0;
// Get url
url = new URLRequest("sound1.mp3");
// Create new Sound object
snd = new Sound();
// Create new SoundChannel Object
sndChan = new SoundChannel();
// Create a new Timer Object with timeout of 5 sec.
// and repeat it only once.
tmr = new Timer(5000, 1);
// Load the audio file
snd.load(url);
// Enable Event Listeners
tmr.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete);
stop_btn.addEventListener(MouseEvent.CLICK, onStop);
pause_btn.addEventListener(MouseEvent.CLICK, onPause);
play_btn.addEventListener(MouseEvent.CLICK, onPlay);
this.addEventListener(Event.ENTER_FRAME, onEnterFrameHandler);
// Start time
pauseElapsedTime(false);
// Start Timer
tmr.start();
// Function that handles timer events
function onTimerComplete(e:TimerEvent):void
{
// Play audio file when timer complete event is received
sndChan = snd.play(sndPosition);
// Set the isPlaying to true to indicate file is playing
isPlaying = true;
// Set the isPlayDelayed to false
isPlayDelayed = false;
trace("onTimerComplete: " + e);
trace("target: " + e.target);
trace("current target: " + e.currentTarget);
}
// Function that captures frame events
function onEnterFrameHandler(e:Event):void
{
// Local variables
var totalTime:Number = (getTimer()/1000)-pauseLength;
var goTime:Number = totalTime-buttonPressTime;
// If flag is true, then calculate the time that has elapsed
if( timing )
{
// Calculate time
hours = Math.floor(goTime/3600);
minutes = Math.floor((goTime/3600-hours)*60);
seconds = Math.floor(((goTime/3600-hours)*60-minutes)*60);
milli = Math.floor((goTime-(seconds+(minutes*60)+(hours*3600)))*100);
// Display elapsed time
timeText.text = format(hours) + ":" + format(minutes) + ":" + format(seconds) + "." + format(milli);
}
}
// Function that captures mouse click events when user clicks stop button
function onStop(me:MouseEvent):void
{
// Reset time
restartElapsedTime();
if (isPlaying)
{
// If audio file is playing then stop the audio file, set file offset to zero,
// and set isPlaying flag to false
sndChan.stop();
sndPosition = 0;
isPlaying = false;
isPlayDelayed = true;
}
else if (isPlayDelayed)
{
// If audio playback is delayed then reset the timer and
// set isPlaying to false
tmr.reset();
isPlaying = false;
}
}
// Function that captures mouse click events when user clicks pause button
function onPause(me:MouseEvent):void
{
// Pause time
pauseElapsedTime(true);
if (isPlaying)
{
// If audio file is playing then stop the audio file,
// set file offset to current offset, and set isPlaying flag to false
sndChan.stop();
sndPosition = sndChan.position;
isPlaying = false;
}
else if (isPlayDelayed)
{
// If audio playback is delayed then stop the timer and
// set isPlaying to false
tmr.stop();
isPlaying = false;
}
}
// Function that captures mouse click events when user clicks play button
function onPlay(me:MouseEvent):void
{
// Start time
pauseElapsedTime(false);
if (!isPlaying)
{
if (!isPlayDelayed)
{
// If the audio file is not playing and playback is not delayed, then
// play the audio file from the last offset and set isPlaying to true
sndChan = snd.play(sndPosition);
isPlaying = true;
}
else
{
// If the audio file is not playing and playback is delayed, then
// start the timer and set isPlaying to false
tmr.start();
isPlaying = false;
}
}
}
// Function that sets the time to 00:00:00.00 (default)
function restartElapsedTime():void
{
timeText.text = "00:00:00.00";
buttonPressTime = (getTimer()/1000)-pauseLength;
pauseElapsedTime(true);
}
// Function that pauses time
function pauseElapsedTime(b:Boolean):void
{
if( b )
{
pauseTime = getTimer()/1000;
}
else
{
pauseLength = ((getTimer()/1000)-pauseTime)+pauseLength;
}
timing = !b;
}
// Function adds 0 to the front of the number when it is < 10 and
// returns a String
function format(n:Number):String
{
if( n < 10 )
{
return ("0"+n);
}
return n.toString();
}
Timer - Not Timer Class, But Time Taken To Do Certain Events
So i'm making a little game and want to know how to start a timer and display the number of milliseconds between the start and finish of two different events. I do not want to run a function after 5000 milliseconds or whatever, just record the length of time taken to say click two buttons.
Basically a stopwatch.
I saw the getTimer(); function but i'm not sure of how to use it or if that is what i need.
Once again, thanks for your time.
Running Timer And Timer With Offset
Hello all,
I'm trying to set up two timers in that dare feed the time in minutes and seconds from the server.
Basically, I've got a master running timer in seconds and minutes but also want to have a second cloned timer that is feed some seconds via flashVars to add to the the master time.
Both of these timers once set by the sever time feed in, and with one being offset, are called every second by a setInterval function call so they count up.
Setting up the master running timer isn't a problem but with my coding skills is a little messy..
Code:
_global.masterRunningTimeInMinutes = 59;
_global.masterRunningTimeInSeconds = 55;
if (_global.masterRunningTimeInSeconds>0 && _global.masterRunningTimeInSeconds<59) {
_global.masterRunningTimeInSeconds++;
} else {
_global.masterRunningTimeInSeconds = 0;
_global.masterRunningTimeInSeconds++;
if (_global.masterRunningTimeInMinutes>=0 && _global.masterRunningTimeInMinutes<=58) {
_global.masterRunningTimeInMinutes++;
} else if (_global.masterRunningTimeInMinutes>=59 && _global.masterRunningTimeInSeconds>=0) {
_global.masterRunningTimeInMinutes = 0;
}
}
if (_global.masterRunningTimeInSeconds<10) {
_global.masterRunningTimeInSeconds = "0"+_global.masterRunningTimeInSeconds;
}
_root.runningTime.text = "v"+_global.masterRunningTimeInMinutes+":"+_global.masterRunningTimeInSeconds;
Ideally I wanted to to get the master running time to display MM:SS so if anyone can help with that that would be great!
I suppose the real problem I'm having is is setting up the pattern for determining the cloned time with the offset.
This is becoming a real headache but if anyone can help I would really appreciate it! Basically I just wanted to have the running time with the cloned time always a certain amount of seconds ahead.
Many thanks, amp3
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?
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.
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.
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
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
How Do You Use The Scripting?
i dont know what it is... is it like java? or something like it? is it used for interacting?
<a href="http://www.llamalords.sictaar.com">llamalords.sictaar.com </a>
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?
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
Need Scripting Help
does anyone know a code that will make it so wherever you click on the screen, a MC will appear where you clicked
Scripting
is ther sumwer i can learn sum basic scripts?...a link 2 a site would be very helpfull...thanks...
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
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
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.
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
|