ActionScript 3.0 :: Sliding Puzzle - Each Panel Detect If There's A Free Space Near It When Click Them?
Sep 29, 2010
I'm trying to create a simple 2D sliding puzzle in AS 3.0, but I haven't gotten further than splitting up the image and placing it into a grid. My main issue is to figure out how each panel will detect if there's a free space near it when you click them.
so i have some buttons that i want to put on a sliding panel. The panel and the buttons are on the same layer. The buttons are buttons i created. there is a seperate button, instantiated as channels, that i use to slide the panel out. I read an online example that made it seem as though if i just placed the buttons on the panel in the stage, they would just slide out with the panel. This is not the case however. here's my code
i want to make a sliding panel with 2 buttons on it. The panel pops up from the bottom of the screen when the mouse is hovering over the the bottom 25 pixels of the screen. The panel is set to disappear when the user hovers the mouse off of the panel. At first i just tried to put buttons on the panel and covert the whole thing to a symbol, but then i could not access the individual properties of the buttons. What i tried instead is to make invisible buttons over the area where the image of the buttons were on the panel. The problem is that when now when the user hovers over the button, flash reads it as the mouse leaving the panel and the panel disappears.
I had Flash 8 on my computer, and back when CS3 came out I purchased the full suite and installed that. Yesterday (years later, now) I was cleaning up installs on my computer to free space. I used Control Panel to remove Flash 8 from my PC.Now Flash CS3 still launches and works, but I cannot get .swf files to launch on their own at all. When I double-click them to open them, I get the message:
The file does not have a program associated with it for performing this action. Create an association in the Folder Options control panel. I've googled to figure out what that means or how to do it, but I haven't found a decent reply that's been effective. If I try to drag a .swf into a browser window (or just open it with a browser), it is also not recognized. Oddly enough, I can view Flash files on web pages no problem (when browsing online)...
Some necessary components must have been removed when Flash 8 was installed. I suppose I could try re-installing Flash CS3, but the problem with that is that I'm out of town on business for the next 10 days. My Studio install discs are back at home, and I need to get work done this week!.
I'd like to make an options bar in my project that shrinks when clicked to hide away but when clicked again, opens again to reveal itself. The problem I'm having is that the panel squishes everything inside of it when it shrinks and I dont want that, instead I want everything to stay the same and just hide away.[code]...
If you use FMS 3.5 as a DVR to record the live streams, whether it can determine that the hard disk has 100 megabytes? It is necessary that I live streams redirected to another server.
I am writing a program that need to load photos. However, there is limitation in flex that users cannot load photos with pixel above 4069 x 4069 into a bitmapdata. How can I check photos pixel before running to error? Since some pictures are big nowadays, I would like to check the user's system memory and free harddisk space. See if the computer have enough space to load the photos.
I have created a sliding rollover panel so that a user can hover over an invisible button to reveal the panel itself. The panel itself is under a movie clip which basically motion tweens the panel to slide in and out effectively. Then there is the panel_mc inside the movie clip which contains an img. The one panel can slide out but for some reason cannot slide back, even when you rollover the button(popUp_btn)!!!! The compiler errors does not even display this error!!!
Here is the code for the main AS timeline in the site: stop(); panel_mc_arrangement.panelInner_mc_arrangement.popUp_btn.addEventListener(MouseEvent.ROLL_OVER,rollFarrange); function rollFarrange(event:MouseEvent):void{ if(panel_mc_arrangement.currentFrame <<2){ panel_mc_arrangement.play(); }else{ panel_mc_arrangement.gotoAndPlay(20); }}
i am writing a program that need to load photoshowever, there is limitation in flex that users cannot load photos with pixel above 4069 x 4069 into a bitmapdata.how can i check photos pixel before running to error? since some pictures are big nowadays, i would llike to check the user`s system memory and free harddisk space. See if the computer have enough space to load the photos.
I have a variable that contains the text from an input box.
let's call it "name"
People may enter the persons first and last name into this box. If they do .. I want to be able to capture just the first name from that string. So somehow capture everything before the first whitespace.
I am trying to make my websites backgrounds do this [URL] ignore the pop up that comes up.. I want the background to scroll whenever I click on a button and i have it all set up and it is still confusing cause i cant get it to work [URL]. How to get these buttons working right.
But I have a simple problem I think.I have a moving panel of images, and I want to be able to change the direction of the panel with the click of a button. Here's what I have so far:
var panelSpeed:Number = 1; var leftDirection:int = -1; var rightDirection:int = +1;
I'm trying to get a button to toggle playing or stopping an mp3 if I click it or hit the space bar. The code I have does that but it does something funny I don't understand. This is the code:
var s:Sound = new Sound(new URLRequest("song.mp3")); var sc:SoundChannel; var playtggl:int = 1;
[code]....
As you can see I've added two event listeners on the button, one for the mouse and for the spacebar. Thing is everytime I hit the spacebar, my function for the mouse click fires up. I don't understand how this is happening.Also, how do you have the event listener listen for a spacebar event without having to first focus on the button by clicking it with the mouse?
I just wrote an "Hello World" in Flash CS5, and now I wont to detect the mouse click.[code]This is the Main class of the SWF.I dont understand why cases 1 and 2 dont work, and 3 does ?
I have many input text boxes, I want to do something when a user clicks on an input text box but I don't know how to detect which input text box got clicked?
I'm building a flash app that has some draggable buttons on it and I want them to behave like this:
You click on it, ClickEvent1 happens, You click and hold on the button, you can move it. If you release from the hold, it does NOT trigger the ClickEvent
I'm running into the logic problem of not knowing whether a user is just clicking or starting a drag event. Does anyone know any logic to get around this issue? I have thought of alternatives such as placing regions of the button that are only draggable or only clickable, but I've seen this type of functionality in other flash apps and I'm wondering how it is accomplished.
Is there a way I can have JavaScript/jQuery know when a Flash object has been clicked (and still have Flash process the click)?
I tried putting a table on top of the object with position: fixed and a z-index and the object set to param name='wmode' value='transparent' so I could have my JavaScript detect which column was clicked using jQuery's click(), but the clicks were never intercepted by JavaScript (Chromium Linux).
How I can detect a click on the border of a canvas, not its contents?.I am aware that I can validate ranges event.mouseX (Y),but my canvas has rounded corners and in some cases appears to be a circle,is there any way of knowing if the border of the canvas is under the pointer?I have:
I just downloaded Flash CS5 for mac which installed without any errors. However, when I first launched the software I am getting the following error: The following panel layout is missing or could not be read: /users/rob/Library/Application Support/Adobe/Flash CS5.5/en_US/Configuration/Workspace/Essentials.xml The application will not have a correct layout. load one from Windows ->Workspace Once past this message none of the panels load.
I have a map in a panel.When maximizing the panel,the map remain the smaller size.How to make the map growing synchronizely with the Panel? When maximizing the Panel,I added Resize Effects.How to apply Resize effects on the Map when the extent of the map changing? It seems to me that I should dispatch extentChange event when maximizing the panel.
I discovered this while doing some programmatic panel resizing:Components in a spark Panel will still be visible when their location is outside the physical Panel boundaries. This does not happen with the mx Panel.unning Flex 4.1 on Windows 7I tried putting mx and spark controls in the spark Panel, and they both appear outside of the boundaries. Note this doesn't happen with the mx Panel. What am I missing to make the spark behave like the mxSample Code:
I've created a rather simple Flex application using Flex Builder 4, which connects to a webcam on the user's PC. To do so, Flash is presenting the user with the infamous privacy warning.
Now, the problem is that user can't click on the panel, as it seems unresponsive to any user interaction.
Some more details:
Firefox 3.6.12 on Mac/OSX, Snow Leopard.Adobe Flash Plugin 10.1.85.3 / 10.1 r85The Flex app is working fine in its own window/tab but the problem shows up as soon as the html page with the Flex app is embedded into the iframe of another page.If I artificially put an Alert box before connecting the camera, the user is able to interact with the Flex application but as soon as the Privacy panel is shown, the Flex app stops interacting. The app works fine under Chrome and Safari but I have not tried this under Windows.I've read that there are problems with CSS positioning so I removed any CSS style impacting the Flex app.
Before I change my strategy and get rid of the iframe (which will cost me quite some effort) I'd be happy to know whether others have experienced the same problem and if there are workarounds.
I'm going to create a new website where i've a main swf that loads all the other that are called by the menu. I'm going to use swfaddress for deeplinkng, but my question is: when the user click on one menu voice the main swf load an external swf. now, when i click on another swf i must make a out-transition of the current loaded how can i detect in the external swf that the user click another menu voice? Or i must do the out-transition in the main swf?