Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Help With Button Acting Onto Another SWF File



Hello all!

Is this possible?

I have one file named menu.swf that contains buttons loaded in the browser. Inside the same browser I have under the first one another file named anim.swf that contains an animation.

My question is: When the user clicks a certain button in the first file (menu.swf) can it interract an action within the other file (anim.swf)?

Like when the user clicks the button in menu.swf the looped animation stops in anim.swf. Note that these are not loaded movies but 2 seperate movies inside the same browser thus within the same html page...

Thank you so mutch for your help!



FlashKit > Flash Help > Flash ActionScript
Posted on: 02-21-2005, 11:45 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

PNG File Acting Funny On Export
I have a png with a black border around in that I have exported into flash. When I export it as flash 7 the entire image is in tact. But when I export it as flash 6 the image bumps down and to the right, getting cut off on those sides. Has anyone had problems with this in the past?

My Button Isnt Acting Like A Button On Stage
I made a simple button and put it on the stage and when i go to preview the scene the hand cursor doesnt pop up in the traditional way like a button. It shows up but it doesnt give me my mouseovers or anything like that

its on its own layer and on the top of the stack anyone have any clue? Its so wierd

Variables Loaded From .txt File Acting Strangely.
I am trying to make a dynamic "goal" thermometer where I can update a txt file and have it reflect on the height of the mercury. I have everything set up the way I want it, however when I load from a txt file, I can use those variables in a dynamic text box, but I can't manipulate it as a number.


Code:
loadVariables("http://mysite.com/yatherm.txt","");
trace(currentMiles);
currentMiles is a variable loaded from yatherm.txt, and it is displayed if I set a dynamic textbox's variable to be currentMiles, but the trace of currentMiles returns

Code:
undefined
How can I use this imported value as a number, not a string, and have it be able to be used by more than text boxes.

Thanks, and ALL FEEDBACK IS WANTED, even if it uses a completely different strategy.

Movie Acting Like A Button
i have a movie clip that i want to play starting at a certain point when the mouse moves over it, then play to another point when the mouse moves out of it, how do i assign something like the onmouseover event to a movie clip

Button Acting Very Strangely
I have 4 scenes and on each scene is a row of 4 buttons with the following actions:

on (release) {
gotoAndPlay("scene 1", 1);
}

on (release) {
gotoAndPlay("scene 2", 1);
}

etc...

When you click on the buttons something very strange happens. If you click the 'scene 1' button once it goes to the first frame of scene 1, but if you click the 'scene 1' button a second time it goes to the first frame of 'scene 2'!

Does any one know what might be causing this?

AttachedMovie Is Acting Like 1 Big Button
My first post here...I was google'ing around to find an answer to my question and came across this site....what a find!

I have an .as file with a custom a class. When I call the function below, it does everything I expect it to do...and then some. The mc that is loading (attaching) acts like a button. The cursor turns into a hand and it also clickable. I do not currently have any links inside this mc...but eventually I will.



Code:
function loadContent() {
if (_level0.currentpage != null) {
_level0.currentpage.removeMovieClip();
}
//Load content movie clips
var clipName = this._name + "_content";
_level0.currentpage = _level0.attachMovie(clipName, clipName,
this.getNextHighestDepth(), {_x:401, _y:300});
}
What am I doing wrong...or what am I not doing at all?
Any help or guidance would be greatly appreciated. I am new Flash, but not programming. If any info is required I will be glad to do so.

Thanks in advance

John

Background Acting Like A Button
Hi,

I have created a website with Flash on a Mac. I use dreamweaver to place the flash into an html page. On the Mac the site works fine, but on a PC you have to double click the buttons for them to work. The background is acting like a button but it isn't. The home page doesn't even have a background. The address is: http://www.graceofspringhill.net so you can see what I am talking about.

Any help would be appreciated.

Movie Clip Acting As A Button
Can anyone explain how one would draw a movie clip to act as a button. Any suggestions would be greatly appreciated.
Pranas

Button Hyperlink Acting Strange:
Now bear with me, as I'm a Flash super-newbie.

I've got a button whose hyperlink doesn't seem to cover the whole button. I can't really explain it, but I can show you:

http://portal.iowarecorders.org

The "Services" button is the one that is messed up. If you click on the right side of the word "Services" it actually takes you to "default.asp". I'm not sure what I messed up, but could someone please take a look at my .fla file and tell me what I did:

http://portal.iowarecorders.org/flash/banner.fla

Thanks,
Matt

Text Button Acting Strange
Hello:

This is my first attempt at flash and I ran into some problems when creating buttons from text. When you roll over the text it does not activate the buttons down or over state.

I made a rectangle over the text in the hit area but that does not seem to work on rolling over the text. It works around the text but not on it.

I then made the text static and gave it a variable name, because I did not know what else to do.

I am at a loss and figured I would ask the community.

Here are the links to get to the site and access the fla.

Link to flash intro


link to flash fla

Thanks for any help

Button Acting On Independent Movieclip
is there an actionscript code for a button to start or play a movieclip that it is not a part of?

Movie_mc.onRollOut Acting Like A Button?
So I've got a movie clip that contains a menu list that I want the user to scroll, select, and all that jazz. However, if they roll out of the mc, I want the movie clip to go away. The clip work absolute perfect until I add the following


Code:
chapMenu_mc.onRollOut = chapMenu_mc.end();
chapMenu_mc.end(), among other things, sets chapMenu_mc._visible = false.

The minute I add the above line, chapMenu_mc stops behaving like a movie clip and starts acting like a button. It switches the cursor to the click hand and won't let me interact with the list inside the mc.

What gives? and how do I get it to behave properly?

How Can I Have..Movieclip Animation Acting As Button?
i'm having troubles with linking my movieclip as a button..


my movie is set to animate, onMouseOver it plays a little animation (the button flashes and moves)..

however when i add this code

kupite.onRelease = function() {getURL('http://www.kupiteonline.net');
}


then it stops animating onmouseover; however the link works...


id like to make it work, so the button continues to animate/act as movie, but also make the link work, how can i achieve this?

thanks

Movie Clip Button Acting Up
Hi everyone,

Having some trouble with a button (with the flashing grey box). It's looping through the animation, and I want the grey box to appear on mouse over. It's messing up the other animations as well. I'm getting error that the property can't be found even though the naming looks right to me.

This is probably a simple mistake, I'd be extremely grateful if someone could take a look at it. When I add AS, the animation above breaks too, without the AS, it plays correctly. (Arrow animation stops, bars continue motion)

Thanks!

-Andrew

Movie Clip Acting As A Button
I have a movie clip that stops all sounds and also stops the timeline. On.Release, it also goes to a frame on the movie clip that displays a play button. I don't know action script well enough to understand how to allow the user to click the same button (now that it is stopped on the play frame) to restart the sound and play the timeline. This is what I have:

pause.onRelease = function():Void {
if (pause._currentframe ==1) {
pause.gotoAndStop("on");
stop();
_root.pageSound.stop();
}else{
pause.gotoAndStop("off");
}
};


Look forward to help on this - once I can get it right - I'll use it over and over.

Movieclip Acting As Button Not Quite Working
Hi all,
I'm trying to make a movieclip act as a button (I've done this before and it works for the most part) My problem this time is that the movieclip is simply a piece of text, and light text at that, so when I rollover or press the movieclip, the mouse has a hard time seeing where the movieclip is because it is thin type. When using buttons, you can have a hit state, but what do you do if you are using a movieclip? The movieclip is on a translucent background, so i can't fake giving it a background so it has something to hit on.
Any ideas?

MOvie Clip Button Not Acting Like It Should...?
Hey guys,

Im hoping osmeone can help me here, im struggling to understand why something is happening in my flash movie...

I have movie clips as buttons, which work, they are just expanding buttons, but when you are right on the edge the movie clip seems to not be able to decide if the mouse is over it or not, it 'flickers' between the states of over and off...

Anyone with any info would be great,

I would post the .fla file, but i odnt know how on here...

OK, have linked it form the old site webspace

site.fla

Thanks,
Cokes

Admin: Sorry this is a reposting of my previous thread, because the title was ribbish in the old, if you can delete, please do, thanks

Button Misbehaving OnRollover Acting Crazy
I really don't know what and how this is happening..

I took one Imported Image, converted it to Symbol (Graphic). Another vector art i created. I combined these two to form one main Symbol (Button).
Now i applied an onRollover action with a script to do something on this button.

Very strangely, when the mouse goes over the Vector art area.. the script activates, but it doesn't do so when the mouse goes over the Bitmap Symbol area.. WHY!!!???

Thanks,
Rahul

Button With Context Specific Actions, Acting Up
Howdy.
I've got a button nested in a movie clip. The user can interact with the button through a set of "verbs" expressed as variables in the main timeline (specifically: inspect, talk, and look). When the button is clicked, the button script needs to refer to the verb variable on the main timeline, and depending on the value, attach a specific movie inside the movie clip the button sits in, not on the main timeline. (although it wouldn't attach a movie to the main timeline either when I tried that)

This is the code I've written on the button (I'm not the cleanest actionscript writer)

code: on (release) {
//check the root variable and let me know what it is
trace(_root.verb);
//if the selected verb is inspect, attach this movie
if (_root.verb=insp) {
attachMovie("hall_i_veallife", "box", 1);
//if the selected verb is talk, attach this movie
} else if (_root.verb=talk) {
attachMovie("talk_false", "box", 1);
//finally, if the verb is observe, attach this movie
} else if (_root.verb=look) {
attachMovie("hall_o_veallife", "box", 1);
}
}


(note: I know I haven't specified co-ordinates here for the attached movies, that's not the problem)

NOW, the trace action returns the correct values from the verb variable in the root timeline.
The movies to be attached are in working order, and I can get the button to attach the movie perfectly if I don't include the "if" statements (but it needs them to load different responses).

But I haven't got a clue why, when I press the button, the movies are not attached at all. Have I just totally overlooked something in the way it's written? What's wrong?

Button Script Acting Weird... I'm Stumped. HELP
Hello and thanks for your help in advance. I'm having a weird problem with what seems like a very simple issue to me. I have an action attached to a button:


Code:
on (rollOut) {
gotoAndStop (65);
}
on (release) {
gotoAndPlay ("C Viewer");
}
It's the "on (release)" part that isn't working... the rollout works fine. It just sends me back about 12 frames and not to the scene (or frame i tried that) indicated. I have also tried going to a different frame, creating a new button to try to go to the scene etc etc. It never behaves by sending me to the scene or frame I specify. I am really stumped. Please help. I can email or post the .fla if necessary.

Movie Clip Acting As Button Question.
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}


I have this code on a movie clip which is acting as a button. I also want to have the ability to hit the movie clip and allow it to jump to a further frame in the original timeline. I did use this:

on (release) {gotoAndStop("frame6");

}

Under the coded above as this would make sense, but its just not working. Im pretty new to flash and would really like to get this function to work.

If you can let me know where im going wrong, that would be kind, thnak you.

Sprite With Textfield Inside Acting As A Button
Hi everybody,

i've an AS 2/1 programmer for as long as it has been around and recently i've been getting more and more work done in AS3. I absolutely love it, but there's still some small parts ruining the fun for me

This is just a small thing bugging me and i'm not finding a solution very quickly, here it is :

i have a sprite on stage , and within that sprite is a textfield. Now the sprite has buttonMode enabled and has listeners attached.
But the thing is that when i hover on the sprite, i see a nice handcursor, but when i hover on the textfield inside this sprite, the handcursor dissapears, but the listener is still fired when clicked here.

How can i fix it so that the entire sprite feels like a whole button?

Many thanks for reading


*Edit *
Also, it seems that the textfield and sprite fire off the same event to the same function, but the event target seems to differ depending on what you clicked, it seems illogic because i have no listener attached to the textfield, is there also a fix for this?

HitTest Working, But Acting Weird (MC As Button)
I was playing around last night trying to learn simple AS to make a movie clip act like a button. I wanted the button movie clip to reduce the alpha value of the other movie clip when you rollover the button and when you roll off the button the alpha of the movie clip goes back up. It works, but if you keep rolling over and out of the button movieclip sometimes the alpha gets stuck at a certain value for a bit, then does what its supposed to. Any ideas why? I'm using onEnterFrame () to do the hitTest constantly.

Thanks

Here's the SWF and FLA files for you to look through:

hitTest SWF
hitTest FLA

Here's the AS code I used in the frame to do this:


Code:
onEnterFrame = function() {
if ( background._alpha > 100 ) {
background._alpha = 100;
}
if ( background._alpha < 0 ) {
background._alpha = 0;
}
if (hitTest( _root._xmouse, _root._ymouse, true)) {
background._alpha -=25;
}
else if (hitTest( _root._xmouse, _root._ymouse, false)) {
background._alpha +=25;
}
}

Button In SWF Loaded Into Scrollpane Acting Strange
I finally figured out how to load the SWF into a scrollpane, which is so easy. ( you still have to figrure out placement )

Anyway I have buttons in the swf, and when clicked load an external swf.

Well, it loads the external swf, but unloads the scrollpane at the same time.
SO WIERD

Why would this happen? Is it suppose to happen? HELP PLEASE!!!

thanks so much!!!!

HitTest Working, But Acting Weird (MC As Button)
I was playing around last night trying to learn simple AS to make a movie clip act like a button. I wanted the button movie clip to reduce the alpha value of the other movie clip when you rollover the button and when you roll off the button the alpha of the movie clip goes back up. It works, but if you keep rolling over and out of the button movieclip sometimes the alpha gets stuck at a certain value for a bit, then does what its supposed to. Any ideas why? I'm using onEnterFrame () to do the hitTest constantly.

Thanks

Here's the SWF and FLA files for you to look through:

hitTest SWF
hitTest FLA

Here's the AS code I used in the frame to do this:


Code:
onEnterFrame = function() {
if ( background._alpha > 100 ) {
background._alpha = 100;
}
if ( background._alpha < 0 ) {
background._alpha = 0;
}
if (hitTest( _root._xmouse, _root._ymouse, true)) {
background._alpha -=25;
}
else if (hitTest( _root._xmouse, _root._ymouse, false)) {
background._alpha +=25;
}
}

[F8] Dynamic Button Not Acting Like A Button
I am not familiar with ActionScript, though I am familiar with programming in general. I have been trying to use AS to create a scene that contains some buttons. I have a movieclip attached as the background, and some buttons that I want attached as well. I can get them all to appear fine using attachMovieClip. When I try to get the buttons to have onRelease functions, though, they suddenly lose their 'button'ness. That is, they no longer have the animation involved in the rollOver, the up, etc. Here is the ActionScript.

code:
var LN:Number = 3;
//layer number for keeping track of movieclips
//Initialize empty movieclips:
_root.createEmptyMovieClip("roomRight", LN);
LN++;
_root.createEmptyMovieClip("roomLeft", LN);
LN++;
_root.createEmptyMovieClip("doorLeft", LN);
LN++;
_root.createEmptyMovieClip("doorRight", LN);
LN++;
_root.createEmptyMovieClip("titleScreen", LN);
LN++;
_root.createEmptyMovieClip("navLeft", LN);
LN++;
_root.createEmptyMovieClip("navRight", LN);
LN++;
_root.createEmptyMovieClip("navDown", LN);
LN++;
titleScreen.attachMovie("titleScreen", "TS", LN);
titleScreen._xscale = 180;
titleScreen._yscale = 180;
titleScreen.onRelease = function() {
titleScreen.removeMovieClip();
runGame("left Engine");
};
createDoorLeft = function () {
doorLeft.attachMovie("doorLeft", "DL", LN);
doorLeft._visible = true;
doorLeft._x = 58;
doorLeft._y = 205.5;
};
createDoorRight = function () {
doorRight.attachMovie("doorRight", "DR", LN);
doorRight._visible = true;
doorRight._x = 532.7;
doorRight._y = 205.5;
};
createNavLeft = function () {
navLeft.attachMovie("navLeft", "NL", LN);
navLeft._visible = true;
navLeft._x = 0;
navLeft._y = 0;
};
createNavRight = function () {
navRight.attachMovie("navRight", "NR", LN);
navRight._visible = true;
navRight._x = 693;
navRight._y = 0;
};
createRoomLeft = function () {
roomLeft.attachMovie("roomLeft", "RL", LN);
roomLeft._visible = true;
createDoorLeft();
createNavRight();
};
createRoomRight = function () {
roomRight.attachMovie("roomRight", "RR", LN);
roomRight._visible = true;
createDoorRight();
createNavLeft();
};
killRoomLeft = function () {
roomLeft._visible = false;
doorLeft._visible = false;
navRight._visible = false;
dy_text.text = "Killed room left";
};
killRoomRight = function () {
roomRight._visible = false;
doorRight._visible = false;
navLeft._visible = false;
dy_text.text = "Killed room right";
};
runGame = function (room:String) {
switch (room) {
case "left Engine" :
dy_text.text = "You are in the "+room+" room.";
createRoomLeft();
navRight.onRelease = function() {
killRoomLeft();
runGame("right Engine");
}
break;
case "right Engine" :
dy_text.text = "You are in the "+room+" room.";
createRoomRight();

doorRight.onRelease = function() {
killRoomRight();
runGame("left First Class");
}
break;
case "left First Class" :
dy_text.text = "You are in the "+room+".";
createRoomLeft();
break;
}
};


Thanks for any suggestions/corrections/etc.

Moto

Help With Movie Clip Symbol Acting As A Button Pretty Please
Hello, and welcome to my post.

I am trying to use a movie clip symbol as a button and the code below allows me to do most of the functions apart from being able to take me to another frame in the scene and that is where i need help.

I am using the following code in a layer above the movie clip symbol:

this.button_mc.onRollOver = function() {
button_mc.gotoAndPlay("_over");
}

this.button_mc.onRollOut = function() {
button_mc.gotoAndPlay("_out");
}

I am using this for advanced animation when rolling over and out of the symbol.

Is there a code which can take me from this button to another frame in the scene. When i have tried i have only managed to go to another frame within the movie clip (as opposed to the scene).

Thanks for any help.

PS i am using Flash Pro 8

[CS3] Movie Clip Acting As Button Needs To Move The Play Head.
Ok so every one on the forum told me to make my buttons with movie clips. And I did it. But no I have another problem I've movie clips that are acting like buttons but they can't move the play head any where. How do you get a movieclip(acting like a button) to control timeline behavior.

Using AS Ver. 2 Thx for the help

[CS3] Movie Clip Acting As Button Needs To Move The Play Head.
Ok so every one on the forum told me to make my buttons with movie clips. And I did it. But no I have another problem I've movie clips that are acting like buttons but they can't move the play head any where. How do you get a movieclip (acting like a button) to control timeline behavior.

Using AS Ver. 2 Thx for the help

[CS3] Movie Clip Acting As Button Needs To Move The Play Head.
Ok so every one on the forum told me to make my buttons with movie clips. And I did it. But no I have another problem I've movie clips that are acting like buttons but they can't move the play head any where. How do you get a movieclip (acting like a button) to control timeline behavior.

Using AS Ver. 2 Thx for the help

Howto: Movie Clip Acting As A Button Plays Out Animation And Then Goes To Content
Ok I've got a problem. I would like to have flash movie and it plays to a stop on the main time line.
Then interface comes up. The interface is made of movie clips acting as buttons.
I would like to some how get it when you click on a button it jumps to frame in the main timeline playing an out animation for the homepage content. But here is the tricky part for me I would like to get it 2 play the content connted with the button after the out animation is played.
So to give a very short example:

Press the movie clip acting as a button > it then jumps to the frame of the start of the out animation > out animation plays > depeding on the button u pushed that content comes up. so if they click the resume button after the out animation on the home page the resume page comes up.

Sry I know question was very long winded and not well phrased but I do really need some help on how 2 do this

Thx take it EZ

Keyboard Back Button Acting As Browser Back Button
I'm having problems with a Flash MX Sign up form I'm implementing on my website.

The form has a series of frames which take the user through the sign up process, before clicking through to the online payment gateway. Each of these frames is anchored to allow the user to click the browser Back button to go back to the previous frame (rather than the previous movie).

However, the keyboard back button is now acting as a browser back button.... Any ideas why?

Any help with - or solutions to this probelm - would be greatly appreciated.

Thanks in advance for your time.

Regards

Rob

Keyboard Back Button Acting As Browser Back Button
I'm currently implementing a subscription sign up form in Flash MX. All of the frames of the sign up movie are anchored so that the user can click Back on his/her browser and go back to the previous frame of the movie.

However, when the user now tries to delete/amend info (eg, first name, username, etc) on the form using his/her keyboard Back button, it triggers the browser Back button.

Anyone out there experienced a similar sort of problem - ie, why the keyboard Back button is acting as the Browser Back button?

If anyone has any ideas/solutions, I'd appreciate any input.

Cheers

Rob

HELP Button Not Acting Like A Button.
I'm using Flash MX 2004 Pro. I have a play button in my flash file but it's not acting like a button. I have three other buttons in the file and they are working fine. I don't understand what is going on. I've attached my FLA file so maybe someone can help.

Button Not Acting Like Button
Have you ever had a button not work after the first click unless you move the mouse a little, or click a few times rapidly? This is also happening to me if I make the buttons movie clips.

This only happens after I've loaded a dynamic text field more than once.

The only thing that I've found to fix it is Selection.setFocus(myButton);. But that draws a yellow box around it. Not pretty.

Any advice?

Thanks,

Charlie

Button Not Acting Like A Button
I want to have a button that, when clicked, goes to the last frame (487). However, if I mouse over it when the movie is playing, the "button" just looks and acts like normal text. Here's my AS

on (release) {
gotoAndStop(487);
}

In the button, I created two layers, one for the text, and one to act as a larger area to trigger the action. Also, the button is in the very top layer, so there shouldn't be any interference from another layer.

Please help me figure this out.
Thanks

Changing A Button Stage In One File From A Seperate File.
ok - here's my problem.
I had to go in and redo a flash file that my company had done by an external person.
It didn't work when it was placed onto the domino server so - they are having me rework it.

so ok- i have one file which is the "frame" so to speak with 5 buttons on it- when a button is pressed it calls or loads a seperate swf file into the current one. (ex. would be to picture a tv - thats the main file - the external files being called into it are the different channels)

now ive gotten the buttons to change when it is hit so that the user can keep track of where he's at- but the problem comes in the other external files. - in the external files ( or the channels so to speak ) there are foward and backward buttons ( < > ) to progress or go back in the presentation. once it hits the LAST frame in that movie it loads the NEXT movie - the problem im having is when the last > button is pressed and it brings in the next movie how do i make the MAIN movie that has the buttons on it change the state of the button to the down position?

Its kinda hard to explain - but the only thing i can think of is the concept of a tv.
U have ur buttons below it and buttons in the channels to go threw each presentation.
I mainly need to know how to control one thing in a swf file from another swf file.

would it deal with labeling? the frames..then using the telltarget? or what?

I can't figure it out for anything and its gettin me madddd
ughz.. so please any help i would realllly appreciate!!!!


Thanks!

Michelle C.R

Can Button In Loaded SWF File Unload Or Close The File ?
Hi,
I am loading 2 SWF files A and B, I have a button on each. When I press button on SWF A it loads SWF B. However I cannot get the button to close / unload the SWF A.
Is this possible ?
To Load I am using:

Thanks,
Paul







Attach Code

var container:MovieClip = createEmptyMovieClip("container", 20);
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.loadClip("B.swf", container);

Gif Acting Weird
hey guys.

i have some .gif's in my movie -
they look great when im editing the flash file,
but when i preview / export it the gif's look slightly disjointed, almost as if they were cut and not quite stuck back in place properly.

i maxed out the jpg settings, turned on the gif export settings but the gif's are still choppy.

and it's not happening to all the gif's, just some.

any ideas?

thanks in advance.

My MX Is Acting Weird
Has anybody got the same problem? The user-interface in my MX has all of a sudden been enlarged. Meaning of the elements such as the Color Mixers, Properties, and everything contains large text which gives me a small area on the stage to work with.

I have tried the panel sets (my screen is at 1024 x 768) but it still stays enlarged.

Very annoying, if anyone has a solution to make it small again, it would be so helpful

Mx Acting Really Strange
hi all, i have just installed flash mx and am over the moon with joy but it seems that when i quit mx after doing some work that my desktop icon names all start to appear in larger fonts ???

i installed mx while flash 5 was still on my pc, if this helps any.

thanks protocol

Why Are The Preloaders Acting Like This?
take a look at www.gistec.org/teste/

and please tell me, is it just my connection or are the preloaders acting wierd? why?

thanks in advance!

Voice Acting
Well, I am currently working on a flash movie and I need some voice acting to be put in my movie and let us just say my voice isn't that good . I cannot pay you, but if you can do this for me I would relaly appreciate it. PLease respond soon if you can do the job. It is a very small job. thx.

RemoveMovieClip Is Acting Up...
I'm somewhat new to Flash, and don't know many of the specific little things it doesn't like.

I'm working on a zombie simulation to try to learn more about actionscript. I'm currently having problems with shooting. I can create the bullets and all, but weird things are happening when I remove them. As long as they are removed in the same order they are created, there is no problem, but if I try to remove a later shot before earlier shots are removed, it doesn't, but waits until the earlier shot is gone, and then both disapear.

Code:
onClipEvent (load) {
number = _root.n;
function cleanse() {
for (i in _root.b) {
p = {x:_root.b[i]._x, y:_root.b[i]._y};
_root.b.localToGlobal(p);
trace("eh? "+p.x);
if (p.x>550 or p.x<0 or p.y<0 or p.y>400) {
offscreen = true;
} else {
offscreen = false;
}
if (offscreen) {
_root.b[i].removeMovieClip();
}
}
}
function fire(p, v) {
p2 = {x:_xmouse, y:_ymouse};
this.localToGlobal(p2);
trace(p2.x);
xvel = p2.x-p.x;
yvel = p2.y-p.y;
d = Math.sqrt(Math.pow(xvel, 2)+Math.pow(yvel, 2));
xvel /= d;
yvel /= d;
trace(xvel+" "+yvel);
_root.bullets++;
_root.b.b0.duplicateMovieClip("b"+root.bullets, _root.bullets, {_visible:true, xvel:5*xvel+v.xvel, yvel:5*yvel+v.yvel});
}
function intervene(z) {
z.gotoAndStop("player");
_root.player = true;
}
function zombify(z) {
if (!z.zombie) {
z.play();
}
}
function zdistance(pt1, pt2) {
return Math.sqrt(Math.pow(pt1.x-pt2.x, 2)+Math.pow(pt1.y-pt2.y, 2));
}
function collision(c1, c2) {
//find direction vector
dx = c2._x-c1._x;
dy = c2._y-c1._y;
d = Math.sqrt(Math.pow(dx, 2)+Math.pow(dy, 2));
dx /= d;
dy /= d;
//find velocity in direction of collision
v1dx = (c1.xvel*dx+c1.yvel*dy)*dx;
v1dy = (c1.xvel*dx+c1.yvel*dy)*dy;
v2dx = (c2.xvel*dx+c2.yvel*dy)*dx;
v2dy = (c2.xvel*dx+c2.yvel*dy)*dy;
//find other velocity
v1px = c1.xvel-v1dx;
v1py = c1.yvel-v1dy;
v2px = c2.xvel-v2dx;
v2py = c2.yvel-v2dy;
//change velocities to apply collision rule
c1.xvel = v2dx+v1px;
c1.yvel = v2dy+v1py;
c2.xvel = v1dx+v2px;
c2.yvel = v1dy+v2py;
}
for (i=1; i<number; i++) {
this.z0.duplicateMovieClip("z"+i, i, {_x:Math.random()*300+300, _y:Math.random()*200+100, _alpha:Math.random()*50+50});
}
}
onClipEvent (enterFrame) {
cleanse();
if (!_root.g.z0.zombie) {
_root.g.z0.play();
}
if (!_root.stopAll) {
for (i=0; i<number; i++) {
for (num=i+1; num<number; num++) {
p1 = {x:this["z"+i]._x, y:this["z"+i]._y};
p2 = {x:this["z"+num]._x, y:this["z"+num]._y};
this.localToGlobal(p1);
this.localToGlobal(p2);
//trace(zdistance(p1, p2));
if (!_root.stopAll) {
//trace(Math.sqrt(Math.pow(eval("this.z"+i+"._x")-eval("this.z"+num+"._x"), 2)+Math.pow(eval("this.z"+i+"._y")-eval("this.z"+num+"._x"), 2)));
}
if (zdistance(p1, p2)<15) {
if (this["z"+i].zombie or this["z"+num].zombie) {
zombify(eval("this.z"+i));
zombify(eval("this.z"+num));
}
collision(this["z"+i], this["z"+num]);
//trace("collide");
//_root.stopAll = true;
}
if (zdistance(p1, p2)<80 and eval("this.z"+i+".zombie")) {
//set(this["z"+num].calm), true);
}
if (Key.isDown(Key.SPACE) and !_root.player) {
if (!eval("this.z"+i+".zombie")) {
intervene(this["z"+i]);
_root.playerN = "z"+i;
}
}
}
}
}
}
onClipEvent (mouseDown) {
if (_root.player) {
p = {x:this[_root.playerN]._x, y:this[_root.playerN]._y, xvel:this[_root.playerN].vel, yvel:this[_root.playerN].yvel};
v = {xvel:_root.g[_root.playerN].xvel, yvel:_root.g[_root.playerN].yvel};
this.localToGlobal(p);
fire(p, v);
}
}



There is a small amount of code elsewhere, but it only handles movement.

bullets should dissapear once they go of screen, marked by the box.
Here's the swf.

SWF Acting Weired
My computer is acting weired with my swfs. It tells me this to acces any site that has an swf "Click to activate contorl" and after I click I can have acsses to the menu or whatever interface it has. Any ideas? Is it my firewall?

Help Please, Link Is Acting Up On Me
Hi, im trying to ser a simple link on an animation.

this link simply opens up another website.

my action script is:

on (release) {
getURL("www.mysite.com.mx","_blank");
}

and it opens up a new ie page but the address on the explorer is

http://www.mysite.com.mx/www.mysite.com.mx

please help!!

Pen Tool Acting Up
Hi folks,

I want accurate and unfettered use of the pen tool to create line segments, and I've turned off everything I could find in the drawing preferences and turned off all snapping and also the "object" and "snap to objects" buttons on the tool pallette. But STILL when I draw consecutive segments that are within a degree or two of parrallel, Flash just turns them into one big long line. This is driving me NUTS. Does anyone know how to get a pen tool that doesn't "help" you into insanity?

Thanks!

Actionscript Acting Odd
I have a flash file that works perfectly until I try to add a link.

There's a movie that has text swooping in and out. To keep the text still for a few seconds I added this on certain keyframes:

function wait() {
stop();
var myInterval = setInterval(function () {
play();
clearInterval(myInterval);
}, 2*1000); // stop for 2 seconds
}

wait();

And then at the end of the movie I told it to stop entirely.

Everything works perfect until I try to add a transparent box with a link on a completely different layer. The text no longer pauses for a few seconds and the movie will perpetually loop.

This is what I use for the link:

on(release)
{
getURL("http://www.google.com");
}

It's pretty typical stuff. I can't imagine what's going on. Anyone have an idea?

Thanks!

FLV Player Acting Up
does anyone have any idea why the flv player changes size and position after the button is pressed?

here is my code:

Code:
//empty clip
var mc_empty:MovieClip = new MovieClip();
addChild(mc_empty);

//remove our instance of the flv player on the stage and put it in the empty mc
var myPlayer:FLVPlayback = flv_player;
removeChild(myPlayer);
mc_empty.addChild(myPlayer);


btn_button1.addEventListener(MouseEvent.CLICK, buttonClick);
btn_button2.addEventListener(MouseEvent.CLICK, buttonClick);

function buttonClick(evt:MouseEvent):void{
if(evt.target==btn_button1){
myPlayer.source = "alchemist.flv";
}else if(evt.target==btn_button2){
myPlayer.source = "freezeframe.flv";
}
}


test.html

thanks!

Copyright © 2005-08 www.BigResource.com, All rights reserved