ActionScript 3.0 :: .check What A Mini Map Tile Is Playing At?
Jan 18, 2010
Basically i have a mini map and i want to check what a mini map tile is playing at.
so i tried to trace it, thinking that the error i get was only because the tile was not yet instantiated i made the following function appear after 1 second to be safe.
[AS] function startGame(e:Event) {
trace(getChildByName("tile1").currentFrame);
}[/AS]
Still get the following error.
1119: Access of possibly undefined property currentFrame through a reference with static type flash.displayisplayObject.
I placed .x (just a test value) instead of .currentFrame and i receive no error.
I guess .currentFrame checks for the MovieClips timeline during compilation?
View 2 Replies
Similar Posts:
Apr 19, 2011
I'm making a game where you place tiles on a grid. When placing a tile, I need to check the existance of another tile to the left, right, or above and below, otherwise the tile should not be placed.. Here is a function I thought would work, that accepts one variable (the position of the tile just as it is about to be placed) :-
private function checkSurroundingTiles(gridPosition:uint) { var t1 = gridPosition - 12; var t2 = gridPosition - 1; var t3 = gridPosition + 1; var t4 = gridPosition + 12; for(i = 0; i < gridRefArray.length; i++) { var checkTile = gridRefArray[i]; if(checkTile == t1) { return true;
[code]....
View 11 Replies
Mar 19, 2009
I'm using Flash 8 and new to actionscript and event listeners.
I have the following listener to check when the flv has stopped playing and set a couple of item to visible.[code]...
View 2 Replies
Sep 18, 2011
is there a way to check if a MC stopped playing?i have a MC on my stage and I guess I have to put some event on the last frame inside the MC. now I want that code to jump to frame X of the MAIN stage- not the MC itself. how do i do this?
View 3 Replies
Feb 16, 2010
is there a way how I can check if a clip is still playing or if it had a stop command an doesn't play anymore?
View 11 Replies
Feb 2, 2009
I would like to know if you can give me a direction how can I check if a movie clip is already instantiated, if it is, don't duplicated it, if it's not, create the object.I have an idea that it should be with an if statement I guess but I am not sure of the rest
View 1 Replies
Jul 25, 2006
How do I check if my music is playing or not? I need this so I can let my loop loop forever.
View 4 Replies
Mar 20, 2004
i got a STREAMING mp3 file in loaded by mySound.loadSound("test.mp3", true). and we all know that this function will run while sound completes
Code:
mySound.onSoundComplete = function(){
trace("Sound Completed")
}
and this one while the sound is FULLY loaded
[Code]...
well i know there is no such thing... but i think now u get my ideas is there any alternative way to do the similar thing? cuz since it's streaming mp3, the song will be played during the loading progress...so both onLoad and onSoundComplete won't work....
View 3 Replies
Oct 26, 2011
I have some effects which I use in my Flex app... They are all declared within mxml tags...
For example:
<mx:Fade id="fadeIn" alphaTo="1" duration="500"/>
<mx:Fade id="fadeOut" alphaTo="0" duration="500"/>
<mx:Move id="moveEffect" duration="500"/>
[code]....
View 1 Replies
Aug 9, 2011
How do we check if there is a sound already playing in a soundchannel?
View 1 Replies
Dec 29, 2010
Is there a way in AS3 to determine if a loaded sound file is still playing or not? I need to start an animation when a sound starts and stop the animation when the sound is done playing.
View 3 Replies
Jul 26, 2010
I'm using the FLVPlayback class to play my FLV files.
If I'm trying to play a FLV file which is not existed yet then I am getting a "VideoError: 1000" with message of Unable to make connection to server or to find FLV on server.
I want to check for the FLV file existence using the file URL or path, before playing that FLV by FLVPlayback.
View 2 Replies
Apr 8, 2011
I'm sure this has been asked before, but I couldn't find the right answer.
I want my MC to load after a button is clicked. When that MC is finished playing I want an imported FLV to play. [code]...
View 2 Replies
Dec 31, 2009
I brought my son a mini laptop for xmas that runs Windows CE , some of the websites he wants to go onto require "flash" , but when I try to install flash laptop says its not a valid Windows CE file.
Is it right that I need to install "flash lite" if so what version and where can I obtain it as I cant find download link on this site. If not is there any other way I can get these websites to work.
View 2 Replies
Aug 14, 2010
I am using a mini MP3 player to play an MP3 file. It is working fine, but I need to play the MP3 file in a loop. I have added a variable loop and set it to true but it still doesn't loop.
<script type="text/javascript">
var so = new SWFObject("player.swf", "mp3player", "0", "0", "8", "#ffffff");
so.addVariable("file", "1-05_Concert_ alla_rustica.mp3");
so.addVariable("loop","true");
so.write("flashcontent");
</script>
How can I get this to work?
View 2 Replies
Jan 22, 2009
Underneath the playing video (of a building) I have an image of the floor plans of the building.When the video .flv file is clicked, i want a "red dot" or some sort of pointer that will move, or appear on the area of the floor plans, in comparason to which video is being played when clicked. - something that runs like a mini map inside a game, where it shows the user where they are in relation to their environment
View 0 Replies
Mar 12, 2005
Or if there isn't any, does anyone have source code or thoery on how to make a diagonal wall for an object to bounce off of? I have ideas, but I'm not sure if they are as efficient as some other ideas may be.
View 2 Replies
Apr 11, 2006
I am trying to figure out the mini putt logic.. I understand that you give an angle and force then hit the ball. Now, once it hits a border, is it : the straight angle of the border minus ou plus (depending on the side) the angle of the ball that gives us the bounce angle? Any tips/formulas welcome
View 2 Replies
Jan 17, 2011
I am looking to build an app that allows end users to draw and save mini animations (simple predetermined shapes that move in 2D). So far I have a written a app that allows the user to draw a single frame using simple shapes and lines, but I am having some small troubles at this stage, and have not attempted to allow the user to animate or save the drawing.
If anyone knows of a tutorial or some other resource to put me on the right path I would be very grateful. I can also share what I have if anyone would be willing to give me some pointers
View 2 Replies
Oct 2, 2011
I would like to create a panning tool similar to the attached. I looking for something very simple, I would like to be able to scroll the large image from left to right using a smaller inset browser.
View 1 Replies
Dec 8, 2010
i having troublesome with the flash map.Actually i am doing the project which is multi-agent system (agents behave like human react in the map and have behavior just like human). i am one of the members of this project, i responsible for the mini map and i am using flash to do map. I have seen the examples of Pacman flash game and racing flash game(they used action script 2.0). i got the ideas after watched their coding.can i set the movement using matrices??
View 0 Replies
Dec 10, 2002
How do you open a mini window inside a flash movie, draggable of course and with a close X, im talking inside the SWF not a new Explorer win.
View 6 Replies
Jan 2, 2010
Currently I am trying to create a mini map which i can populate with the contents of an array.I can make any size grid with little to no trouble in AS3, for arguments sake I have been trying to get a 4x4 Grid populated.I can even make listeners inside the new class but i cannot figure out a way to give each new MiniMap tile a unique identifier like i would of in AS2 and then assign the current frame to play.I have looked around and tried a few tutorials with no success.I have been using this to create the tiles (inside two for loops to make the grid)
Code:
var MiniMap:MiniMapTile = new MiniMapTile();
addChild(MiniMap);
Here is how i did it in AS2 for anyone Interested.
Code:
_root.MapTile.duplicateMovieClip("Tile" add i, i);
Edit: I have done it the long way :/ made 12 separate objects. Incredibly convoluted.
View 3 Replies
Jun 23, 2003
Im trying to get my Swf File to Load My Flash Mini Button Site this is mY code...fscommand("SHELLOPEN" , "C://WINDOWS.DESKTOP + New Site.exe" Maybe it wont load because Im putting it on the frame I have no idea what i must do to get this to work!
View 7 Replies
May 3, 2010
I have been creating mini product movies in Flash using sound recordings, key frames, and tweens. This is the 5th in the series, and just NOW I'm having problems.I had my frame rate set to 30fps with one long sound bite, about 2.5 minutes. Everything looked fine on my end, but when I loaded it into a landing page in IE, everything was out of sync, but only on other people's computers. It still looked fine to me.
I compressed the sound file more, which helped some, but did not aleviate the entire problem. I noticed the frame rate when I did a quick preview (just pressed enter) would fluctuate from the 30 fps all the way to 9 fps.I then cut the sound bite up into 13 segments,shortened the tweens, and reduced the frame rate to 18fps. In development and in preview, it looked fine. However, when I put it into the landing page, the animation was way too fast for the sound and the sound bites looped.
View 3 Replies
Jul 29, 2010
is it possible for me to build a server in java so that i can let my different flash clients communicate with each other?
View 3 Replies
May 8, 2010
Is there a way to create a mini window in flash that contain an HTML web page?
View 1 Replies
Oct 2, 2009
See [URL] Now there is a button called Answera, which when clicked should have a symbol (movie clip) called Check appear at the cordinated specified. Check exists in the libary (but does not have an instance name) and no where else on the stage. when I run this code I get: 1180: Call to a possibly undefined method Check. -> var rightCheck = new Check(); How is it undefinded if it exists in the libary?
View 7 Replies
Jan 27, 2011
The following is my codes. This is still work in progress; so, you will see some functions with empty contents. Plus, this is my first Flex application; please bear with me. This is a quiz application that gets the questions and answers to each questions from a ColdFusion web service. There are three types of questions, True or False, Multiple Choice with single selection, and Multiple Choice with multiple selections. So, based upon the question type, the application would dynamically generate the appropriate amount of radio buttons or check boxes for the users to select. I got these working. The problem that I am having is, I am not sure how to check what the users have actually selected. In some other forums and posts on other web site, it said that I can use event.currentTarget.selectedValue to get the user selection. But when I actually do it, I got a run-time error saying, "Property selectedValue not found on mx.controls.FormItem and there is no default value." My question is, what do I need to do to capture the user selections?
[Code]...
View 1 Replies
Feb 5, 2009
I'm making a strategy game the uses a tile map to show information about the other players! Every tile is 50*50px and when you start the map it loads about 50 tiles and puts them together (all this from a Flash->ASP->MySQL which i managed to do on my own)
What i need to do is to make the map draggable (kinda like maps.google.com) and make every tile clickable! I can't manage to do both of these things at the same time All the tiles are in a movieclip called mapMc so by creating a big button above the visible map area and write:
ActionScript Code:
on (press) {
allSize = _global.fullMapSize/2; //This gets the size of the map after all tiles have loaded[code].....
And that kinda works (except for the boundaries)Second, when you press a tile, which i stupidly constructed as another button, so every tile is a button (loaded dynamically) with as that fetches the tile information (already fixed ) But how do I combine them?
View 0 Replies