ActionScript 3.0 :: HitTestPoint Partially Hidden Movie?
Nov 8, 2010
I have a couple of movies, one of them hiding partially the other one. I would like to detect when someone clicks on a movie. I know that this can be done easily by using the hitTestPoint function. The problem is when the user clicks on the intersections of these movies. In that case the hitTestPoint function says that the user is clicking both movies. But actually the user is clicking only one movie, because the other movie is partially hidden. How can I program this behavior in a natural way?
View 3 Replies
Similar Posts:
Nov 16, 2011
I have a multi SWF movie that uses AS2 and is behaving differently in different browsers.The basic scenario is this . There is a root movie that acts as a control panel for user input. 1. It loads then parses some xml to determine how the interface should look (what images, radio buttons, etc. to display) 2. Then it loads and positions items on the stage ( rbs, thumbnails) 3. It loads child swfs
When the issue occurs step 2 is only partially completed and step 3 doesn't occur. No message about script error appears.
[Code]...
View 5 Replies
Jan 1, 2011
Which one is more efficient? Or is there even a noticeable difference? I did tests of a circle moving closer to a square and stopping when hitTestPoint returns true. The square was at 0 and the circle was at 500. My first test I did using hitTestPoint the entire time, my second test I did by checking the distance (Pythagorean Theorem way) and if it's below 50 then check with hitTestPoint.
I compared the FPS of each test but they were the same at 30 FPS with 200 circles and at 11-12 FPS with 500 circles. I thought the first test would be slower because I was testing every pixel the entire time while the second test I was only calculating the distance for the most part before testing every pixel.
View 2 Replies
Nov 1, 2011
Is there any way to play my partially loaded flash movie while loading is still in progress ?like progressive video download.My app is not video based.I have only animations and interactive coding.
View 1 Replies
Oct 20, 2010
Google says that[code]...
is the way to test for the mouse being over a DisplayObject. This works if my movie is displayed at 100% scale. But if maximise my browser window so the Flash movie changes scale, it all goes to pieces.
View 1 Replies
Mar 14, 2007
I need a few answers and pointers for my game [URL] First off, is it possible for a graphic to be hidden once a movie clip has been dragged over it? The plan is for the grid to be covered in question marks, until the users drags the small smiley over the same large smiley at which point the question mark will be hidden revealing the large smiley. The user then gets a 2nd chance to match up the other remaining smiley, if they fail to get the right smiley is it possible for the question mark image to appear back over the top of the smileys?
View 5 Replies
Oct 23, 2009
I could put a hidden button on my movie. I found this code over the internet but it seems not to work.
breadcrumbs_btn.onRelease = function() {
if (Key.isDown(99)) {
getURL("http://www.mysite.com/mypage.php", "_self");
}
};
99 is the keycode for letter c by the day
View 3 Replies
Aug 16, 2010
I'm not even sure what you call it. When you go to some of the major web sites and big flash movie with option to shorten it is displayed. I've search the web for this and maybe i not calling it right.
What is the name of this flash movie called when you come to site and big flash movie comes up and pushes everything down? It has a option to reduce size by clicking button.
Anybody know where you can find this tutorial?
View 3 Replies
Jan 6, 2010
I have a web based slide show that reads an xml file and loads images from a folder on the server. The client would now like to also offer this slideshow on a cd. I'm pretty sure that I can save all the assets to on the cd and the slideshow will work. But the client is concerned that someone with the cd will be able to directly access the images on the cd. So, here's my non-flash flash question, can the folder storing the images on the cd be hidden yet still be read by the flash movie?
View 1 Replies
Sep 15, 2009
well, I got this for my Play/Pause button (on stage):
Code:
import mx.transitions.Tween;
btn_play.onPress = function(){
[code].....
View 3 Replies
Sep 21, 2010
Just wondering is there any way to stop the Flash Player loading at specific points within the swf file?
View 1 Replies
May 5, 2009
I have a large ON2 VP6 encoded FLV video (334 MB, 75 minutes) hosted on the web and being played back using a basic Flash movie player:
[URL]
Many people are having problems getting the entire video to load. The loading progress bar will increase quite quickly at first, but then it will either slow down to a crawl or will stop completely. If the progress bar stops increasing before the video has fully loaded, it will not continue no matter how long you wait. Reloading the page does help.
Is this likely to be a problem with the FLV file, the Flash player or is it more likely to be a problem with our web host?
View 6 Replies
Apr 15, 2008
On the interactive section of my page here: [URL]. I have a bunch of externally loaded swf files that are supposed to load into the black square in the middle. As you can see, some of the swfs partially load, just the text for most, and then some don't. If you click another section then click back, it loads fine and you can see what it's supposed to look like. This doesn't make much sense to me, considering the swf files are done on a single frame, with the text just a layer below the image. So why does a portion of the swf load but the other doesn't and why do some and not others? I have the swfs loading using loadMovie. (Example below):
Code:
container.loadMovie("movieclipname.swf");
container2.loadMovie("movieclipname2.swf");
container3.loadMovie("movieclipname3.swf");
container4.loadMovie("movieclipname4.swf");
This works perfectly with every other site I've done, and I've used that same setup many times on this site. Yet for whatever reason. It doesn't work regularly.
View 2 Replies
Apr 15, 2010
I'm having trouble with my site [URL] As you may see, the animation is often all mixed up: the buttons do not take the user to the proper frame, the frames and buttons do not display or just partially... Sometimes everything goes back to normal when I empty the cache and/or refresh the page and click repeatedly on random buttons, but not always, and not for long. I don't know, it just happens somehow randomly, especially when I upload the swf file again to update the site. I understand it has something to do with the flash file itself and having to insert some code somewhere,
View 4 Replies
Dec 12, 2009
If I changed used in one of my project sdk to current sdk4 beta, set breakpoint and stop on them every occurrences of mx.* packages are labeled "[no source]". Is known any trick to fix this issue?
View 1 Replies
Jun 8, 2011
My sIFR 3 font replacement is working great in FF and IE except when I use it on a 'services' page that has an unrelated Flash object feature at the bottom. Only the first sIFR3'ed element shows up in IE on this page. I am also using jQuery 1.2.6 on this page to bring up random content. It is a windows xp pc.
In IE, the html on the 'services'page sIFR'ed elements has become garbled in the browser as I see when I view the source. Things like this: nodeIndex='1' and jQuery1307565945701='4' are added to the ul and li elements and should not be. The class 'sIFR-replaced' is not being added from sIFR like it is supposed to be.
The jQuery does not interfere with sIFR3 font replacement on my other pages because they don't have the extra Flash file on the bottom. The Flash file is a shockwave cab file, version 9,0,0,0 (that I did not add).I see this error in the console ' 'match(...).1' is null or not an object' but I got this same error elsewhere and it wasn't affecting anything.
View 1 Replies
Feb 10, 2012
I am implementing a charting tool for my project, which is very similar to Google's finance chart but much more tailored-made to meet different requirements. The charting interface is made up of the following core components:
Time selection panel: to change the time span of the chartMeasurement points panel: to select different points of measurementChart area: to display the measurement data of the selected measurement points over the selected time span
For example, the Apartment's power administrator can view the total power consumption in Unit 101 of Building A, in the Pacific Apartment's complex (a made-up name). Similarly, the administrator can also "stack" up charts of multiple measurement points, having an all-in-one view like below:
Only the chart is implemented in Flash/AS3, the other panels are JSP, JavaScript and Dojo. When an user clicks on a measurement point to add a chart to the chart area, the following things happen in order (briefly):
User clicks on a link (say, Total Amps)Dojo event listener attached to the link picks up the mouse click eventThe Dojo event listener calls an AS3 method (addChart) through the External Interface to add a chart to the Flash chart:The Flash chart picks up the method call, adds a chart to the stage and reposition all charts on the stage. Since the stage height is fixed at 600 pixels, each chart added will be fitted into the 600 pixels. Eg, 1 chart on the stage = 600 px/chart, 2 charts = 300 px/chart, 3 charts = 200 px/chart...etc.This is what the Flash chart looks like, when 3 charts have been added, before display the chart on the actually page (see below) Once a chart has been successfully added to the stage, Dojo will stretch the <div> tag that the chart resides so that each chart still "looks" like 400 pixels tall. For example, 3 charts on the stage means each chart is 200 pixels tall, but Dojo will stretch the entire <div> to 1200 pixels, making each chart look like 400 pixelsThe above step is the same concept as resizing the stage When an user adds more than 7 charts, the 8th chart will start have Flash contents disappeared. To be exact, I used firebug to increment the <div> height, and found that when height exceed 2924 (a magic number) pixels, Flash contents start to disappear. See below (the red-boxes indicate the missing contents)The situation gets worse when continue to add charts, eventually half of the bottom chart will disappear.
Some pre-work I have done:I have unit tested this component in standalone Flash movie, with 3 LCD monitors totalling 4000 pixels in height. I produced 10 charts in a single flash movie, and then resized the window from 600px to 4000px, no charts disappear. This happens in all of IE7, IE8, FF3+, and Chrome. Although slightly different manifestation, but they all have contents mysteriously disappeared. This also happens to GOOGLE's finance chart, when you enlarge the chart's <div> to over 10000 pxs (yet another magic number) The funny thing is, however, when a graph has been cut in half, the visible half is still operatable. For example, if the zoom window as been cut in half, I can still move it, zoom in and zoom out.
View 1 Replies
Oct 12, 2009
[code]...
when the program is run, the commands for up, down, and left, but right is completely ignored.
View 0 Replies
Apr 6, 2010
I have a movieclip that I'm using as a button- the rollover state is on frame two, the up state is on frame one and I used actionscript to apply the different actions. All of the actions work fine normally, but about 25% of the time only part of the button is active. The mouse doesn't change to the hand symbol and the rollover/release effects don't work on most of the button, just on a small band around the perimeter of the button. Its not like it happens every time and there doesn't seem to be any consistency in what causes it.
View 1 Replies
Jan 24, 2012
I have built a small program using AS 2.0 where you scroll through a list of products and click a button and it leads to a product video. EVERYTHING seems to be working except for the scrolling. I have a mask around the area of the categories and when you scroll down they dont scroll all the way. The categories scroll farther down then they do up and you cant click on the rest of the buttons. I feel like Im either missing something in my code or maybe made a mistake somewhere. (I'd like to post a sample but I can't seem to. It scrolls like an ipad screen.)
ActionScript Code:
stop();
container.setMask(mask_mc);
[code].....
View 0 Replies
Jul 22, 2009
I want to display a partially loaded image (as it loads), similarly to how images load on HTML pages.
View 1 Replies
Nov 22, 2009
I have a flash site (portfolio), and it uses buttons to load/remove different .swf file (it is an XML gallery that I did not write.) It works perfectly - the FIRST time I load/unload a .swf . . . however, every .swf file loaded after the first one comes in partially transparent (it normally fades in), but otherwise the .swf is fully functional. Each .swf has it's own unique name/images, but is otherwise identical to the original gallery. It doesn't matter which one I open first - the first one is always correct, the rest, not. Also, the degree of transparency varies randomly, but generally seems to hover somewhere around 1/2 way.
[code]...
I know that something in the XML gallery is causing this (switch to a completely different .swf and the transparency issues go away), but I also think that I am likely not unloading the .swf correctly and that some part of it is remaining in the memory and creating issues when it is used more than once.
View 2 Replies
Jun 15, 2010
I'm facing difficulties trying to drag and drop dynamic MC when their registration point go out of the stage.I'm using Tweener easing, and when this happens I get errors coming from Tweener and also from the stage.listeners..
View 2 Replies
Dec 27, 2009
How do I manage that, while the movie starts, some parts of the Display List are "hold in the backhand" and get loaded when I decide that they should.Can I only do that via external SWF-Files? Further question: Is it possible to stream the files, by calculating the download speed and starting the movie when I want it to do, or is Flash doing that automatically
View 4 Replies
Jan 10, 2011
I am drawing a rectangle at 0,0 with a line-style-thickness of 4px. It has height 100% and width 50%. The right-hand edge has a border 4px wide, but all 3 other sides are only 2px, suggesting the mid-point of the edge is classed as the border. Why isn't the edge drawn 'inside' the rectangle?
View 1 Replies
Oct 4, 2011
I have a flash file which loads data from JSON and parses it. It works fine expect on one machine (specs below). On that machine it loads an image URL specified in the JSON, but nothing else. I've tested with a other machines (Dell E6400, Apple MacBook Pro) and it works just fine in all browsers. I compared Windows Updates between the Dell E6400 and the Dell Optiplex 745 and they only differ by one update (KB2525694) which isn't applicable for my Dell E6400.
Machine Specs:
Dell Optiplex 745
Windows 7 SP1 64-Bit
IE9, Chrome, Firefox 4 & Safari
Flash 10.2.159.1 & 10.3.183.10
[code]....
View 1 Replies
Jan 6, 2011
On my stage I have a mc (videoLoader) with the mc (loadBar) inside it. When I preview the movie it shrinks loadBar to where it should, but it doesn't expand as the video loads.
ActionScript Code:
this.addEventListener(Event.ENTER_FRAME, loading);
function loading(e:Event):void[code].........
View 3 Replies
May 14, 2007
I click on the booking link and everyhing loads just fine, however, if I click on it again it only loads partially. Can anyone tell me why this is and how to resolve?
[Url]...
[Code]...
View 2 Replies
Jul 29, 2009
One of the swf files in my project is acting strangely.The file compiles perfectly, and is functional when running stand-alone.If I try to load it into the main swf in my project, the code stops executing just prior to the first for..
loop.To find out where the code was stopping, I placed a textfield on the stage named "stageText", and assigned different strings to it at various points in the flow of actionscript.It stops executing immediately after stageText.text = "init2";, and just before the first for..loop. (see comments in code)Why is the code stopping at the for loop?Why does it only happen when the file is loaded into another swf?
Code:
import gs.*;
import gs.easing.*;
var locationsXML:XML;
[code]....
View 1 Replies
Feb 29, 2012
Is there a way to hide partially shown text lines on a dynamic textfield that has more text than its size can hold? I want to avoid the situation found on the picture below by simply not showing the areas in red (the text comes from lots of sources, so I don't have control over it).
View 2 Replies