Help With Overlap Test
Hi. I would like to know if this is possible or not and how it might be achieved. Once I draw shapes on the background, i have actionscript code to dynamically create about 1000 small squares on the background which are movie clips. I would like to test if the movie clips -squares are "inside"/overlapping/contained withing/... the drawn shape. So if I draw some circles/rectangles, I would know if the squares drawn by actionscript overlap or not. Is there any simple way to accomplish this test? I dont even know what keywords I would search for this either to find help.
Thanks
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 04-29-2007, 08:42 PM
View Complete Forum Thread with Replies
Sponsored Links:
Hit Test - Don't Allow Overlap
Hi. I'm trying to make a basic game to use with my pupils. It's like dominoes, I have 13 movieclips on the stage and when they press play then words related to our study appear in the movieclips. I have the movieclips dragging and stopping. Ideally they would move the movieclips next to each other as you do in dominoes. But i would like to make it so that when they touch each other then the can't move or overlap each other. Should i seach under collision or hit test?
I have attached the fla file - hopefully
Cheers
Lesley
View Replies !
View Related
Flash 8 Quiz Guru Needed: Make Link Appear For Next Test Only If Test Taker Passes.
Greeings, all,
Flash 8 has quiz templates which are coded for multiple choice, true/false, text statement, and matching types of questions, along with hotspots and probably anoher type I am forgetting. The test taker makes their selection(s) or answers, and clicks a "check answer" button. They then get a feedback statements depending on whether they have answered correctly or not. Many questions involve multiple selections to be correct, but all must click on the "check answer" button to advance to the next question.
The point is that all of this functionality is coded in the component(s) which make the template so versatile. A copy of my .fla shouldn't actually be needed (I am guessing here), because the component code is what I believe needs tweaking, at least the part where the final percentage of correct answers is calculated at the end of the test, and that percentage is compared to a user-defined passing percentage score.
I think this requires a Flash Quiz Guru, who knows just how to connect the pass or fail result to a new button or a "go to" redirect. I don't know whether the same effect could be accomplished by frame scripting, but I expect tweaking the component(s) code would seem a more direct approach.
I cannot fill in the blanks for any idea that is just an idea. If anyone can code this, make it work and test it, and direct me to where the snippets must be placed, I would be deeply grateful. This is about education, not a game or commercial razz-ma-tazz.
Are there any Flash Quiz Guru's who can help me out with this?
Thank you.
regards,
stevenjs
____________________________________
"I am but an egg."
--Stranger in a Strange Land
View Replies !
View Related
Flash Quiz Guru Needed: Make Link Appear For Next Test Only If Test Taker Passes.
Greeings, all,
Flash 8 has quiz templates which are coded for multiple choice, true/false, text statement, and matching types of questions, along with hotspots and probably anoher type I am forgetting. The test taker makes their selection(s) or answers, and clicks a "check answer" button. They then get a feedback statements depending on whether they have answered correctly or not. Many questions involve multiple selections to be correct, but all must click on the "check answer" button to advance to the next question.
The point is that all of this functionality is coded in the component(s) which make the template so versatile. A copy of my .fla shouldn't actually be needed (I am guessing here), because the component code is what I believe needs tweaking, at least the part where the final percentage of correct answers is calculated at the end of the test, and that percentage is compared to a user-defined passing percentage score.
I think this requires a Flash Quiz Guru, who knows just how to connect the pass or fail result to a new button or a "go to" redirect. I don't know whether the same effect could be accomplished by frame scripting, but I expect tweaking the component(s) code would seem a more direct approach.
I cannot fill in the blanks for any idea that is just an idea. If anyone can code this, make it work and test it, and direct me to where the snippets must be placed, I would be deeply grateful. This is about education, not a game or commercial razz-ma-tazz.
Are there any Flash Quiz Guru's who can help me out with this?
Thank you.
regards,
stevenjs
____________________________________
"I am but an egg."
--Stranger in a Strange Land
View Replies !
View Related
Flash Quiz Guru Needed: Make Link Appear For Next Test Only If Test Taker Passes.
Greeings, all,
Flash 8 has quiz templates which are coded for multiple choice, true/false, text statement, and matching types of questions, along with hotspots and probably anoher type I am forgetting. The test taker makes their selection(s) or answers, and clicks a "check answer" button. They then get a feedback statements depending on whether they have answered correctly or not. Many questions involve multiple selections to be correct, but all must click on the "check answer" button to advance to the next question.
The point is that all of this functionality is coded in the component(s) which make the template so versatile. A copy of my .fla shouldn't actually be needed (I am guessing here), because the component code is what I believe needs tweaking, at least the part where the final percentage of correct answers is calculated at the end of the test, and that percentage is compared to a user-defined passing percentage score.
I think this requires a Flash Quiz Guru, who knows just how to connect the pass or fail result to a new button or a "go to" redirect. I don't know whether the same effect could be accomplished by frame scripting, but I expect tweaking the component(s) code would seem a more direct approach.
I cannot fill in the blanks for any idea that is just an idea. If anyone can code this, make it work and test it, and direct me to where the snippets must be placed, I would be deeply grateful. This is about education, not a game or commercial razz-ma-tazz.
Are there any Flash Quiz Guru's who can help me out with this?
Thank you.
regards,
stevenjs
____________________________________
"I am but an egg."
--Stranger in a Strange Land
View Replies !
View Related
(Authoring Mode-test Scene-test Movie )Different Results WHY?
(Authoring mode-test scene-test movie )Different results WHY?I will get mad working on a quiz for a month plz help: im working on quiz game -frame by frame- its 15 scenes each scene contain about 70 frames with 70 action script :go to and stop - go to and play - stop every thing is fine till scene No. 11 in the authoring mode when choose from control menue enable simple buttons - enable simple frame action : its working fine scripts executed fine but when going to test movie mode some scripts doesnt work WHY? what mistakes i have done? what should i do ? how can a void such a problem ? any suggestions PLZ??? Thanks in advanced
View Replies !
View Related
Div Overlap
Hello,
I have two flash objects in div.
One DIV - A of flash should overlap the other DIV - B
So i mean two flash should overlap each other.
Can anyone help ?
Thanks.
View Replies !
View Related
Loading Test File In To A Dynamic Test Box
i am making a flash app and part of it is being able to enter the name of a text file in an input text box and hit a button and if there is a text file with the name you entered in the same folder as the swf it will load it in to the dynamic text box. attached Is a file of how far i got on my own.
thanks
View Replies !
View Related
Sound Overlap
Hi ,
I have made two different swf files.First one of them contains some annimations along with a sound file that i want should play continously in the background. Then after finishing out the animations in that movie i loaded 2nd swf file in the level1.
This file contains the main movie and has many voice over files in it , and some buttons on which these voice overs are called accordingly....
Now what i did was on pressing any of these buttons i used "stopallsounds" and then played the corresponding voice over ..... this was done to stop any sound file playing in this 2nd swf .... but it also stops the main music in level0
Now what should i do ... i want the background music to play on continously and to change voice overs according to the button clicked on....
Please help me out....
View Replies !
View Related
Movieclip Overlap
need some help!
I have 8 buttons that I have programmed to show MovieClips when pressed. Problem is,if I click on Button 1, it displays MovieClip 1, which is what its suppose to do. But when I go to click on Button 2, the MovieClip 2 that is programmed to play when button 2 is clicked, overlaps the movieClip 1 that was activated with button 1.
How do I get the previous movieclip that is showing, to disappear when you click on another button to view its movieclip, there for not having any of the movieclips over lapping etc.
this is the actionscripting I'm using for button 1, although the rest of the buttons have the same scripting just different tellTarget info numbers. Info stands for MovieClip:
on (release) {
tellTarget ("/info1") {
play ();
any help would be great, Thanks!
}
}
View Replies !
View Related
Overlap Swf Inside Swf
Ok, I have already once asked this question and got no answer. I think it is a pretty easy one, so i attached the zip file of what i am talking to make it easier.
I want to load a external swf into another swf. (loadmovie command i know). I got that part happening.
First question : How do i tell this window where on the screen to load? rathan then position x=0 y=0
Now whilst the window is loaded if you move the mouse around it and pass over the links from the main swf file you are able to click on them. I don't want to be able to click on them.
How can I prevent this??
files are attached. anyhelp would be great. Thanks in advanced
Trent
View Replies !
View Related
Movie Overlap
I am trying to play movies over each other in my scene using the instance.play(); command, however they just overlap and I want the existing movie to dissapear first, I plan to use this system for thumnails and wiuld be using about 12 movies. Is there away to give the button a command to clear the other movies before playing the new one?
I would really appreciate anyones help on this.
Thanks
View Replies !
View Related
Sound Overlap Through AS
is it possible to over lap music using AS like.....
---- = music
-----------_________
________------------
coz i made a little loop in FLstudio, and it has like 1/2 second gap at the end. the thing is it is for my site, so there is only one frame to have it on, so i cant just overlap it manualy. or if theres any other way that would be appreciated thanx
View Replies !
View Related
Can't Overlap Buttons...what To Do?
I have created 5 buttons that point to an object. When each buttons rolls over the object animates with a background fading in.
However, when you roll off one button and onto another, it starts the animation over. How can I set it so that when you are over the image or any of the buttons, the animation starts and doesn't stip until you roll out of this entire area.
I trie dusing a big button over the area, but the overlapping buttons cause a problem. Only the button on top worked. Any help would be greatly appreciated!!
My flash is too big to attached here, but I have posted the swf so you can see how this is working currently.
View Replies !
View Related
Sound Overlap ~_~
Here's the code for frame 1 of the main timeline;
Code:
stop();
introsound = new Sound;
introsound.attachSound("intro");
introsound.start(0,999);
However the problem I have with this code is that evertime it returns to this frame, the sound starts, overlapping with the original;
I have a button that moves to frame 2, another button that moves back to frame 1, and so the problem starts;
Is there anyway to have a sound object play through multiple frames?;
View Replies !
View Related
Stage Overlap
Hi. I'm not a complete newbie to flash- have made a few sites in it and learned some basic action script. I'm wondering if I'm missing something really simple which has changed in more recent versions of flash.
When I first published my movie (with scaling set to 100% x 100%) I got everything off stage also viewable in the browser. No problem, I simply erased excess graphics that overlapped the stage.
The problem reoccured when I wanted to load an external SWF. I made a movie exactly the same size for it to load into. (138h x 900w). The external swf was made in Swish Max with a stage of the aforementioned size, scrolling a long jpeg across the stage. Now when I publish the movie the external swf loads and plays correctly but the whole long jpeg is viewable overlapping the stage and crossing the width of the web browser!
Once again, I'm sure there must be an easy way to deal with this. As far as I know, only the stage is supposed to be viewable when published in a browser, right? Any help would be much appreciated.
View Replies !
View Related
Using HitTest For No-overlap
Hi All
I'm trying to use hitTest so that if any images overlap they will be replaced on the canvass.
ActionScript Code:
function imgSeed(){
for(i=0; i<5; i++){
a += 1;
duplicateMovieClip(test_mc, ["newImg_mc"+a], this.getNextHighestDepth());
_root["newImg_mc"+a]._x = myRandom(50,450);
_root["newImg_mc"+a]._y = myRandom(50,450);
//below code is for checking no overlap of images. Its with this that I'm having problems
if(_root["newImg_mc"+a].hitTest(HIT ANY OTHER EXISTING IMG){
//new random placement }
}
}
I'm stuck with the hitTest bit I want it to take the current mc and hitTest it for all the other existing mc's and if hitTest == true then I can re-run for a new placement.
Can anyone help?
Thanks
edit--
i've narrowed it down to a function
ActionScript Code:
function overLapCheck(){
for(k=0; k<5; k++){
if(_root["newImg_mc"+a].hitTest(_root["newImg_mc"+k])){
trace ("hit test == true: newImg_mc"+a+" hit newImg_mc"+k);
}
}
}
although this works, It checks against itself, so it always true at least once, how can I tell it not to check against itself?
View Replies !
View Related
LoadMovie Overlap Help Please
hi.
i have 5 different buttons on my website. 2 of them
call seperate swf's to load into my main.swf and the others
are a part of main.swf- they're on the same timeline/scene, etc...
the other buttons are text pages, and now seem to appear behind
the loaded movie swfs....basically the loaded movies wont go away
upon clicking another button.
do you know why this is happening?
here's what i have on the buttons calling external files
on (release) {
loadMovieNum("accessories.swf", 1);
gotoAndPlay("accSF2005");{
}
}
View Replies !
View Related
Object Overlap
I have made a series of MC's on a single layer. Each is triggered by a button, however I am having trouble getting the imgs to remain on top of the others for the MC. Does anyone know how to get multiple images to the same depth on the stage? Cheers.
View Replies !
View Related
Button Overlap Tip
Here's the situation:
I have an expandable banner, that when the mouse moves off of it should go back to it's original size. The way I would normally do this would be to add a big button over the expanded banners full size and put a onRollOut action to it.
Trouble is, this specific banner has three other small buttons in it. So what happens is, when I move over one of the three small buttons the onRollOut action is called since these small buttons are in the way.
What would you guys suggest in this case? I tried calling faking the onRollOut by just getting the mouses coordinates onEnterFrame, but that is kinda buggy since if you move the mouse out of the banner too fast it doesn't detect the roll out.
View Replies !
View Related
Button Overlap?
I am working on a map of the usa that as you roll over each state the name of the state appears and the state is highlighted. I had no problems until I was done and tested it. Some of the roll over parts of the button (the text of the state names) fall underneath of the button (state) right next to it. Why would the rolled over button be affected by the untouched button to it's sides?
I do have all of these buttons on the same level and they are close/touching each other. How do I make it so that the button that is rolled over and it's text are in the forefront and exposed?
Any thoughts? Thanks.
View Replies !
View Related
Overlap Function Help
Hi, wonder if anyone could help me with this problem.
Basically the following code is creating concentric circles.
I've got a collision detection and overlap function script at the end which is telling me if two or more circles have interacted with another.
What i'm basically after is for flash to give me a string of numbers to tell me how much of an overlap is occuring.
I know the end of this script is wrong - I'm getting a boolean outcome instead of a number, I think "return true;" needs to be "return dist;" and "return false;" should be "return 0;" but if I try and change that then I get:
"The Expression returned must match the function's return type"
and if I try and change :boolean to :number in that function then I get:
"Type mismatch in assignment statement: Number where Boolean is required"
Any ideas?
Heres my script:
circles = new Array();
circle._visible = false;
var drawCFlag:Boolean = true;
listener = new Object();
listener.onMouseDown = function(){
_root._quality = "MEDIUM";
instructions._visible = false;
msDown = true;
}
listener.onMouseUp = function(){
msDown = false;
drawCFlag = true;
}
Mouse.addListener(listener);
var circleCount = 0;
this.onEnterFrame = function(){ // updates every frame
if (msDown==true && drawCFlag == true){
circleCount++;
var newCircle:MovieClip = _root.circle.duplicateMovieClip("circle"+circleCou nt, circleCount);
circles.push(newCircle);
_root["circle"+circleCount]._x = _root._xmouse;
_root["circle"+circleCount]._y = _root._ymouse;
trace ("[x value= " + _root._xmouse + "]")
trace ("[y value= " + _root._ymouse + "]")
trace ("[circleCount= " + circleCount + "]")
trace ("[circles size = " + circles.length + "]")
_root.max.send("; x_value " + _root._xmouse + ";"); //send info to max/msp
_root.max.send("; y_value " + _root._ymouse + ";"); //send info to max/msp
drawCFlag = false;
}
andgo();
}
function andgo(){
//Collision detection:
for(var i:Number = 0;i < circles.length;i++)
{
var src:MovieClip = circles[i];
for(var j:Number = 0;j < circles.length;j++)
{
if(i == j) continue;
var dest:MovieClip = circles[j];
var touching:Boolean = checkOverlap(src,dest);
if(touching)
{
trace("Circles : " + src._x + " " + src._y + " : " + dest._x + " " + dest._y + " overlap");
}
//else
//{
//trace("No overlap between : " + src + " : " + dest);
}
}
}
function checkOverlap(c1:MovieClip, c2:MovieClip):Boolean
{
// distance between centers
var dx:Number = c2._x - c1._x;
var dy:Number = c2._y - c1._y;
var dist:Number = Math.sqrt( (dx*dx) + (dy * dy) );
if(dist < c1._width + c2._width)
{
return true;
}
else
{
return false;
View Replies !
View Related
Image Overlap Each Other
Why Does my photo's dont make a space between them .. but overlap each other
ActionScript Code:
var i = -1;
function loadContent(aImage:Array) {
var nxFrame:Number = 3;
var nyFrame:Number = 3;
//var i = 0;
//for (var i = 0; i<aImage.length; i++) {
i++;
if (i<aImage.length) {
var my_mcl:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
var nxBlok:Number = 0;
myListener.onLoadComplete = function(target_mc:MovieClip) {
target_mc._y = nyFrame;
target_mc._x += nxFrame;
nxFrame += 50;
};
myListener.onLoadInit = function(target_mc:MovieClip) {
// you can now do any setup required, for example:
target_mc._width = 40;
target_mc._height = 40;
showImage(target_mc, aImage);
};
myListener.onLoadError = function(target_mc:MovieClip, errorCode:String) {
trace("*********First my_mcl instance*********");
trace("ERROR CODE = "+errorCode);
trace("Your load failed on movie clip = "+target_mc+"
");
};
trace("BLAAAAAAAAAAAAAAAAAAAAAAAA");
my_mcl.addListener(myListener);
this.createEmptyMovieClip("clip_mc"+i, this.getNextHighestDepth());
my_mcl.loadClip(aImage[i], "clip_mc"+i);
}
}
function showImage(target_mc, aImage) {
target_mc._alpha = 0;
var nAlpha = 5;
target_mc.onEnterFrame = function() {
nAlpha += 3;
if (target_mc._alpha<95) {
trace("alpha"+target_mc._alpha);
target_mc._alpha += nAlpha;
} else {
loadContent(aImage);
target_mc._alpha = 100;
delete this.onEnterFrame;
}
};
}
View Replies !
View Related
AS2 - Overlap Problem
I have problem in new created movie clip position because it's dyanamic.
if i create new movie clip it is not overlap on previous movie clip. that position will be new or different place.
find attachment show this problem
so please give me code of positioning movie clip without overlap
thanks
Dars
View Replies !
View Related
Overlap Sounds
At the moment I have a flash menu, and each button has an over state keyframe, and for the over state keyframe I have set a sound to play ('event' in the drop down box), but the problem is, when the user moves the cursor quickly across the buttons, they play consecutively, therefore delaying the sounds.
I want each sound to overlap the other so that the sound plays at exactly the same time as the cursor is over the button, but I don't know any methods of doing this. If you know how, please tell me!!!
Thanks alot!
Mike
View Replies !
View Related
Html Img Overlap
I'm loading html into a textfield which works appropriately. However, the html displayed in the textfield contains images that are overlapping (directly on top of each other).
Imported HTML
Code:
<img src='file1.png' width='200' height='200' hspace='0' />
<img src='file2.png' width='200' height='200' hspace='0' />
<img src='file3.png' width='200' height='200' hspace='0' />
What can I do to separate out the images besides putting in a dozen break tags?
View Replies !
View Related
Voiceovers In My Tutorial Overlap.please Help
Hello everyone,
I have 5 keyframes and each keyframe has its own wavefile on it. I want to play the wavefile when i enter the frame and stop playing the wavefile when ileave the frame.
navigation between these frames is thru buttons
when i go to the second frame the first wavefile overlaps with the second.
How do i correct this problem ?
i used stopallsounds on the button press but of no use ...
please help
kiran
View Replies !
View Related
Button Overlap Issue
Hey there . . .
I'm fairly new to flash, and am getting the hang of it. My problem is a simple one; I've created a calendar, and populated it with button symbols for events. I've set the button's 'over' keyframe to be much larger than the regular button, so that when the user mouses over a given date, that date pops up w/ info about the event on that date.
the problem I'm having is that when these pop-up, I get overlap problems; ie. the larger area of the pop-up frame is cut off by neighboring buttons. It seems to be some kind of priority; the ones I put down first are underneath all the others. Is there an easy way to make the button symbol overlap all neighboring symbols when moused over, but to allow itself to be overlapped when *not* moused over?
thanks in advance . . .
Ron G
View Replies !
View Related
Movie Menu Overlap Help Please Help
Hi all...
I have been working on the main interface of my site and have definitely run into a stumbling point. I originally used a menu from here at flashkit called smoothmenu.fla and have had trouble relocating it so i could contact the creator.
I have provided links for the fla files in in question so ppl can take a look at them...
The problem i have been having is getting the slide sub menus available by clicking on one of the 5 'zooms' or circle buttons...
what happens is that even with the sub menu options/buttons in there, if you click twice on the same main 5 button it will play other submenus or a blank one. I am totally stumped and it has put off work on my site for about 2 months... PLEASE PLEASE help... with anything!
http://karmakat.ca/smoothmenu.fla : is the original script for the menu
http://karmakat.ca/may.fla : my latest incarnation and stumblings without the submenu buttons properly there
http://karmakat.ca/april.fla : another older incarnation with the submenu buttons... which are all willy-nilly all over the place and overlapping eachother for some inexplicable reason!!!!
-Aleksandr Berland AKA KarmaKat
http://karmakat.ca
View Replies !
View Related
Movie Menu Overlap Help Please Help
Hi all...
I have been working on the main interface of my site and have definitely run into a stumbling point. I originally used a menu from here at flashkit called smoothmenu.fla and have had trouble relocating it so i could contact the creator.
I have provided links for the fla files in in question so ppl can take a look at them...
The problem i have been having is getting the slide sub menus available by clicking on one of the 5 'zooms' or circle buttons...
what happens is that even with the sub menu options/buttons in there, if you click twice on the same main 5 button it will play other submenus or a blank one. I am totally stumped and it has put off work on my site for about 2 months... PLEASE PLEASE help... with anything!
http://karmakat.ca/smoothmenu.fla : is the original script for the menu
http://karmakat.ca/may.fla : my latest incarnation and stumblings without the submenu buttons properly there
http://karmakat.ca/april.fla : another older incarnation with the submenu buttons... which are all willy-nilly all over the place and overlapping eachother for some inexplicable reason!!!!
-Aleksandr Berland AKA KarmaKat
http://karmakat.ca
View Replies !
View Related
HELP Trying To Overlap The HIT Area Of A Button
Hi, I'm just trying to overlap the "Hit" area of a button with another graphic, but I just can't make it. No-matter if I put a graphic over the button or even in higher layer...the "hit" area is always there, even when the button is not visible any longer.
Could anybody give me a trick or roundabout to accomplish what I'm trying to do? I guess this is extremely easy but...no way..
Thank you very much in advance,
Manare
View Replies !
View Related
Overlap Music Loop
I need help on this:
I have a MC that loops music for the background of my main site. The music will normally start with a fade in and it will fade out.. but when it starts reaching to loop, the ending sound will overlap the beginning, hearing from the music's both ending and beginning segments.
Is this possible to do ...with actionscript maybe?
thanks,
En-TACT
www.en-tact.com
View Replies !
View Related
Help Help Help... Can You Overlap Buttons? PLEASE SAY YES Ahhhhhh
k... what im trying to do is overlap two types of button clips...
one button rolover is the main "rollover animation" basically it controlls a movie as you move your mouse back and forth... the "hit extends over all the buttond"
but i need a way to actuall navigate... so i another rollover (5 seperate ones [one for each button])... these buttons actuall control the "load movie" and in the rollover will be a small explination of wht the section is about...
when ever i preview it, flash recognizes only one button at a time (the forground button) is there a way to have both work together rather than just the one in the fron
PLEEEEAAAASSE help
View Replies !
View Related
Drop-down Menus That Overlap
My current problem is trying to create submenus that exist in the same space. Well, basically what I'm trying to do is rip off the main menu on www.macromedia.com, but it isn't working so well yet.
First, I have a menu that uses a hitscan=nextFrame/prevFrame setup to animate the buttons. You know, if you move in the hitscan area, the submenu appears. If you move the mouse off, the submenu disappears.
Creating multiple instances of movie clips that occupy the same space obviously don't work. I thought moving the submenu off of the first frame of each button would remove it from the hitscan area, but no. Moving all the buttons onto separate keyframes in the main timeline is pretty cumbersome, and near-impossible to manage...
Is there a vital command I'm missing? (You know, every time I ask that question, chances are that I am.)
View Replies !
View Related
SOS Sound Overlap Spam :-)
Let say you got a row of buttons ok if you happen to move your mouse on all over over and over very fast, it overlaps and sound ugly.
Does any one have a code to make the sounds not play antill the previous sound has stoped. i dont wont the sounds to be in que just no sound can play antill the sound stops then sounds are activated agin.
;/ an hints or clues welcome
so you know how im using the sounds i will show you...
Code:
There in an mc in _root
onClipEvent (load) {
SND_000 = new Sound();
SND_000.attachSound("click_000");
}
I call them from the other movies.
View Replies !
View Related
Duplicated MC: Overlap Problem
Hello everyone.
I have a duplicateMoiveClip function but all the duplicates seem to be on the topmost layer, that is, they overlap/cover everything else on the stage (things like my crosshair or a wal)l. Is there a way to set the duplicated mcs in a certain layer?! I know it has to do with the depth parameter, but I thought the depth was related to clone duplicate mcs, not to the whole stage. Shouldn't the duplicates be in the same layer/depth as the original mc?
Here's the code:
code:
var intBird;
intBird = setInterval(makeBird, 1000);
i=100;
function makeBird() {
duplicateMovieClip("bird_mc", "new"+i, i);
--i;
}
View Replies !
View Related
Troubles Getting Sound To Not Overlap.
Ok, i changed a sound linkage to export for actionscript and export to first frame. than in frame 1, i used new(sound) and than attached that sound "footsteps" to the var footsteps. now i want it to play when i have a key pressed, and stop when i lift up. I got that to work, but it starts many times while i hold a key down. sounds terrible i want it to play the sound once than again.. instead of overlapping it, is there an if statement i can add that checks to see if it's playing allready?
(*whoops didn't see the sound help forum, can a mod move this?)
View Replies !
View Related
Transparency So One Can Overlap Graphics...
I know how to do transparency on version 7 flash MX, but I have version pro and I can't get the colour pop-up menu that allows you to change alpha and what not, I found alpha setting in the colour mixer, but that's just for mixing colours and won't let me immediatly affect the transparency of my colour/graphic. Does anyone know what I press to get that menu?? Or to change the transparency?
Thank in advance,
Tarren
View Replies !
View Related
Slidding Blocks With No Overlap
Hi Iv'e searched under Hittest, Collission, Overlapping and Dragging but I can't find anything that I can (or know how to) modify to make a slidding block without overlapping other blocks.
I have some blocks with letters on them and I want to be able to slide them up, down and sideways in order to make a word, But I don't want them to overlap as I'm sliding them.
I have a drag action on all blocks but right now I can drag them all over the place (which I don't want)
I have attached the fla file If anyone can help me get started with one of the blocks.
Thanks
View Replies !
View Related
Slidding Blocks With No Overlap
Hi I've searched under Hittest, Collission, Overlapping and Dragging but I can't find anything that I can (or know how to) modify to make a slidding block without overlapping other blocks.
I have some blocks with letters on them and I want to be able to slide them up, down and sideways in order to make a word, But I don't want them to overlap as I'm sliding them.
I have a drag action on all blocks but right now I can drag them all over the place (which I don't want)
I'M using Flash 8 and I have attached the fla file If anyone can help me get started with one of the blocks.
Thanks
View Replies !
View Related
[F8] Dynamic MC Overlap Problem
Hi,
I am using attach movie to populate the screen with a bunch of mc's. That part is working. Each mc is represented by a small red dot and each also has a rollover function that displays a label. Many of my attached mc's are very close to each other and on the roll over they are all overlapping or showing under the other mc's. What I want is on the roll over it should bring the currently rolled over button to the top level. Currently I am using swapdepths for each button to set the depth very high(swapDepths(100000000)), but still some are not appearing on the top.
On the first page load all works fine but once you add a city the depth problems appear. Check the link to see what I mean.
http://www.joeshields.net/flashlab/cityviewmax/
Any help would be appreciated.
View Replies !
View Related
Flash Overlap With Z Index
Hey all,
I have a menu drop down issue that was looking to get some help with. I have a flash drop down menu that overlaps a separate flash piece in an HTML page. The example of what I am talking about can be found here: http://www.cspa.org/cleaning
When you hover over product types, you'll notice that the drop down falls under the 'water banner'. I have set the z-index of that specific banner to be lower than the flash header but it still did not work. When I change the 'water banner' to a static image instead of a flash file, the menu overlaps without a problem.
This is the style that I have applied to the navigation bar
#flash_piece {
z-index: 1;
position:relative;
top:0px;
}
I made another div for the banner and set the z-index to 0. Any help with this would be most appreciated. Thanks!
Vation
View Replies !
View Related
SetInterval Fucntion Overlap
Hi all
I have a function that is called when a check box is selected. In that function I have a a set interval function that is defined and called. This works fine as long as only one check box is clicked. There are multible check boxes. if more then one check box is clicked before the set interval runs out it seems to keep it running. What I mean is check box one is clicked setInterval starts. Check box two is clicked before the set interval from the first check box runs out. It seems to reset the timer on check box one and it keeps going till check box two finishes. Basically I use the set interval to load an xml file that takes some time to generate from a cf script. The basic onload check does not seem to work as the function runs past it before it loads the xml. That is why I set up the set interval so it keeps checking if the xml has loaded. Like I said it works great as long as only one check box is clicked at a intervals long enough to allow the xml to load, the setIntervel to expire. If two check boxes are quickly pressed it keeps going.
Code:
function checkBoxClick() {
if (this.selected) {
libNumXML = new XML();
libNumXML.load("myxml.cfm");
libNumXML.onLoad = function(success) {
intCount = 1;
function updateTimer() {
if (libNumXML.loaded) {
//do some stuff with xml
clearInterval(intervalID);
} else if (intCount == 300) {
clearInterval(intervalID);
//could not load get out
}
intCount = intCount+1;
}
};
}
}
hope that makes some sense
thanx dave
View Replies !
View Related
Fading Images - But With Overlap?
hi guys — much thanks for your help already.
i have my already copied code from this site (!) working fine, loading in external images and fading with as.
i just need the images to now fade over each other. eg; when an image fades in, it has a delay, then i need the new image to fade in over the top of the already loaded/faded image.
here's my code i am using. much thx in advance!
<start of as>
pathToPics = "pics/";
// fill this array with your pics
pArray = ["1.jpg", "2.jpg", "3.jpg"];
pIndex = 0;
fadeSpeed = 30;
delay = 3000;
// MovieClip methods ----------------------------------
// d=direction; should 1 or -1 but can be any number
//loads an image automatically when you run animation
loadMovie(pathToPics+pArray[0], _root.photo);
changePhoto = function() {
// make sure pIndex falls within pArray.length
pIndex = ((pIndex + 1) < pArray.length) ? (pIndex + 1) : 0;
_root.onEnterFrame = fadeOut;
clearInterval(myInterval);
};
function fadeOut() {
if (_root.photo._alpha>fadeSpeed) {
_root.photo._alpha -= fadeSpeed;
} else {
delete this.onEnterFrame;
loadPhoto();
}
};
function loadPhoto() {
var p = _root.photo;
p._alpha = 0;
p.loadMovie(pathToPics+pArray[pIndex]);
_root.onEnterFrame = loadMeter;
};
function loadMeter() {
var i, l, t;
l = _root.photo.getBytesLoaded();
t = _root.photo.getBytesTotal();
if (t>0 && t == l) {
_root.onEnterFrame = fadeIn;
}
else {
trace(l/t);
}
};
function fadeIn() {
if (_root.photo._alpha<100-fadeSpeed) {
_root.photo._alpha += fadeSpeed;
} else {
_root.photo._alpha = 100;
myInterval = setInterval(changePhoto, delay);
_root.onEnterFrame = null;
}
};
myInterval = setInterval(changePhoto, delay);
<end of as>
View Replies !
View Related
Is It Posssible To Overlap Two Buttons?
Hi,
I'm trying to work out the apocolypto gallery:
http://apocalypto.movies.go.com/
It seems that they have two buttons on top of each other each controling it's own mclip.
I tried this and it didn't work, is there some complex actionscript for it or something?
Cheers
View Replies !
View Related
Grids Overlap A Line
Hey
If have a line that is shot from my guy. The angle, distance and start and end points are known. I have again, a 30x30 grid. Is it possible to find out which grid spaces the line crosses? E.g. a line from 0,0 to 0,90 will cross grid spaces 0,0 0,1 0,2. Its obviously easy in this example just Math.floor() the numbers but when it is at an angle is gets much more complexe.
Thanks for any help I get!
Dan0
View Replies !
View Related
Can Flash Overlap HTML?
OK here is the problem. I want to make it so my flash menu can overlap the hTML part of my website. Is this possible through Layers in FP or Dreamweaver? I have seen adds with flash that overlap HTML but i KNow thats with some transparent background so i think its possible. Thanks
Mike
View Replies !
View Related
Image Overlap Problem
I have four buttons on level 5 of my movie each linked to a swf containing an image that slides into view overlapping the previously viewed image, level 1 overlapping level 2 etc... this is where I need help! can anyone tell me how the buttons that's pressed can tell which image went before so that the new image can overlap the previous one? many thanks
View Replies !
View Related
|