ActionScript 3.0 :: Stop Directly When Player Touches Wall?

May 26, 2011

I got another problem that I just can't figure out how to solve.

PHP Code:[code]......

When I click Player, player goes to the right in speed 20. When he hits the wall he stops. BUT, he doesnt stop until the registation point hits the wall. Registation point is in the center. But I want him to stop directly when Player touches Wall.And Im gonna have wall around the "map". So i need him to stop if he touchs LeftWall, RightWall and what ever.

View 5 Replies


Similar Posts:


ActionScript 2.0 :: Movieclip To Move Against The Player When The Player Touches The Movieclip

Aug 25, 2010

I need a movieclip to move against the player when the player touches the movieclip i used:

[Code]...

When i put the code in the movieclip on stage level it works perfectly. but when i put it INSIDE the movieclip it only moves right. no matter which side the player is, when the player touches the mc it moves right no matter what.

View 1 Replies

ActionScript 3.0 :: Stop Other Videos In A Video Wall?

Dec 9, 2010

So how to stop others videos in a Video Wall when clicking another video?

I'm having a video wall, which was created with a for loop so that every i a new VideoPlayer instance was created. The source was inputed through XML.

Code:
for (var i:int = 0; i < 3; i++)
{
video = new VideoPlayer(source);
this.addChild(video);
}

When I click the play button the clicked Video is playing great. And when I click another video on the wall it also starts playing. BUT HOW can I stop the other video(s) when another is clicked?

I know I need to kinda get access to the Netstream of all other videos and close them

Code:
netstream.close();

I tried is with a Custom Event inside the VideoPlayer class:

Code:
this.addEventListener(PlayerStopEvent.STOP, stopVideos);
function stopVideos(event:PlayerStopEvent)
{

[Code]....

From the output panel I can see the stopVideoPlayer function is being launched, but I'm guessing it's being launched only in the clicked video not in All videos, even though the code is in the VideoPlayer class.

When I tried using a timer event, to close the netstream after 5 seconds it worked for all videos.

How can I make this work? Or make an event similar to the timer event? Access the netstream for all videos?

View 5 Replies

Php :: Publish Flash Player In User Wall Does Not Work

Sep 20, 2011

I want to publish this link [URL] into wall via Graph Api. If you see the code of the link you can see that the required metas are wrote. In fact, if you paste the link in Fb, you can see that it recognise and even publish the player.For test purpose i have used the Graph API Explorer [URL]) with this parameters:

Method: "POST"
Api : https://graph.facebook.com/user/feed
oauth_token : ...
message: "Test from API Explorer"

[code]....

I do not understand why, whith the API Explorer works fine, but whit my PHP call does not.

View 3 Replies

Flash :: Embed A Custom SWF Based Audio Player Into Facebook Wall Posts?

Nov 12, 2010

How to embed a custom SWF based audio player into facebook wall posts? I want to start posting mp3 links on my and other walls and at one point I saw someone do this and a mp3 player was embeded in facebook to play the audio. When I post a link all I get is the link people can click. How do I: 1. make a flash playable on the FB wall via the clickable play thumbnail. 2. Make a mp3 playanle on the FB wall via the mp3 player fb uses.

View 1 Replies

Open Avi File Directly Into Windows Media Player?

May 7, 2009

How do i open an .avi file directly into windows media player or winamp on button click in flash.

View 2 Replies

Actionscript 3.0 :: Saving Files Directly From Flash Player 10

Jul 21, 2009

Read about saving files directly from flash player 10 recently. If I can pull this off then it will be a life saver with a project I am working on. I read a tutorial on [URL] But i am not able to understand fully what's going on there. For my project I allow users to drag and drop object around the stage and save the the whole thing as an image once they are done.

View 5 Replies

Flash :: Flex - Running Good In Browsers But Error By Player Directly ReferenceError: Error #1056

Jul 13, 2011

I wrote a flex demo, customized spark TextInput skin with rounded corners and a search icon in it, like mac os x search box, it's running good in browsers (by Flash Player browser plug-in) either .html or .swf, but error by flash player directly.

[Code]...

View 2 Replies

Android :: Know Where The User Touches?

Mar 7, 2012

I'm trying to do that when the user touch (not click with mouse the program runs on androidthe code gets the (position of) touch x and y (like _xmouse but it dosen't work on ndroid)
How can I do it?

View 1 Replies

ActionScript 2.0 :: Can't Get Character To Die When He Touches The Enemy

Oct 25, 2009

I added attack to my character in the game and he attacks and the enemy dissapears, the problem if I can't get my character to die when he touches the enemy. I got it to work once but what happened was that even if I hit the enemy, as soon as I hit it I got to the game over screen and got stuck on a loop between the gameover screen and the moment I defeat the monster.

View 2 Replies

Flash :: Find Number Of Touches At A Point In Time?

Dec 7, 2010

I want to find out if the user is currently using more than one finger to draw on the screen.currently, the TouchEvent object doesn't have any property like touchCounts, which tells the number of touches on the screen. it just has a touchPointID, which helps to identify a particular touch.

do i need to handle this on my own ? for eg: in the TOUCH_BEGIN event handler i could see how many different unique touchPointID i have received and update the count myself.

View 1 Replies

ActionScript 2.0 :: HitTest - Object Touches Side Of Rectangle?

Oct 24, 2006

Just like the picture below, I only want the codes execute if the object touches the side of the rectangle, but not the corner, how do I do that?

View 1 Replies

ActionScript 2.0 :: Playing Sound When Character Touches Coin In Game?

Jul 5, 2011

I'm currently making a flash game and to insert sound. The sound effect has to play everytime the character touches the coin yet the coin still has to be able to unload. I never used sound before in flash.

View 1 Replies

ActionScript 3.0 :: Make It So When The Character Touches A Swirly Thing It Goes To Another Scene?

Jun 7, 2009

I'm making a game using Cs3, and As3, And I need a way to make it so when the character touches a swirly thing it goes to another scene...How do I do that?

View 3 Replies

ActionScript 2.0 :: Make A HitTest Script That Makes A Character That Touches A Few Spikes Teleports?

Nov 17, 2009

I am currently making a platformer game and I want to make a hitTest script that makes a character that touches a few spikes teleports to a position on the map.

[Code]...

View 0 Replies

Stop Player When In Another Frame

Nov 12, 2009

I'm trying to get a movie to stop playing when I click on a button (the second frame button) that brings me to another frame (frame 2). I created on frame 1 a video gallery and I would like to create another one in frame 2. Each frame has its own player. My question is while a movie is playing in frame 1 and I go to frame 2, the the new video gallery shows but the movie from frame 1 keeps playing. I would like to have player in frame 1 stop when it hears the button for frame 2 clicked.

View 3 Replies

Php :: Stop A Player When Another Starts?

Mar 23, 2011

I have multiple players on the same page (flash as3), but I would like, that when a player is playing, stops, when another player begins to play...

View 2 Replies

ActionScript 3.0 :: Make A Mp3 Player Stop?

Dec 10, 2009

I have an mp3 player on my website that load a track list from a xml file.the problem is that the player start automatically when the website is loaded...and i want to make it stop since the beginning...so that if i want to here the music i have to push play

View 2 Replies

Stop / Remove An Embedded Player?

Mar 8, 2010

I am working on a webpage where i have to include an embedded video.The video is hosted on some other domain.I am able to embed the video and autoplay once the web page is loaded.However i have a requirement where i have to remove the div displaying the video once it is played , and in place of the video i have to now display some text.

The problem is i am able to do autoplay by the autostart variable in the embed tag...but how do i know that the video has ended.The hosting company only provides an embed tag and they donot have any player apis to use.

One way (or rather a workaround) that i feel is to start a eventlistener in the background and see for the total time of the video and when that time is reached remove the content.But the problem is what if the user pauses the video, then also the div would be deleted.

View 1 Replies

ActionScript 2.0 :: Stop All MP3 Player Buttons?

Sep 17, 2010

I have a Flash playerbutton that plays MP3:s. I have about ten of them on a page. How do I stop the other(s) from playing when I press a new playerbutton?

It seems that I have to number the Flash playerbuttons somehow and send out a stopAllSounds(); or similair.

View 9 Replies

ActionScript 3.0 :: How To Stop FLV Player On Exit

Mar 29, 2010

I have a show reel page on my server which shows two movies. Page one has text info and two buttons to direct viewer to which ever movie they want to view. Each movie is on its own page in the flash file (page2 and page3) and is not embedded in swf (pulled from server on request).

If you click on one movie button then change your mind and go to the second one then thats ok, but if you then decide to click back to your first choice then the crap hits the fan, that first movie is still running and hasn't returned to beginning. Visually you just get the green loading bar freaking out.

So I need some code to stop the FLV player each time viewers exit from one of the movies.

Here is my actionscipt on frame1

stop();
buttonOffice.addEventListener(MouseEvent.CLICK, goOffice);
buttonWild.addEventListener(MouseEvent.CLICK, goWild);

[Code].....

View 1 Replies

Stop Video Player When Accessing Another Page?

Mar 17, 2009

I'm looking for a (simple) way to make the vidplayer to stop playing when moving from one page to another one (on the same timeline hey). As it is right now if you start to watch a video and don't push the stop button before going to another page it keeps playing - hence you still hear the sound playing in the background while you're actually looking at another page. And that's not good.

View 3 Replies

ActionScript 3.0 :: Stop The Video Player When I Exit The Swf?

Dec 8, 2008

I have a project that has multiple swf files for each of the sections. One of my sections has some videos in it. When I start playing a video and click on a button for the main menu (button code is on the main menu page with addChild to place them on the additional swf pages) the video keeps playing on the new page. I don't want to hear the video on the different pages. I was wandering if there is a way to stop the video player when I exit the swf? Or are there any other ways to get the video to stop when I go to a different section of my project.

View 9 Replies

ActionScript 3.0 :: Audio From Flv Player Won't Stop Playing?

Nov 17, 2010

I have a swf loading in another swf that has a video player in it. When I remove the swf from the stage, the swf goes away but the audio from the swf keeps playing. Is there a way to tell that swf to stop playing from the parent swf?

View 7 Replies

ActionScript 3.0 :: Stop MP3 Player From Playing Automatically?

May 16, 2011

It is perfect, except that I'm not sure how to keep it from playing automatically. I tried removing the playSong() part under the loadSong function and it just removes the ability to play the song altogether. Here is the code:
 
import fl.controls.ComboBox;import fl.data.DataProvider;
///////////////////////////////////Variables/////////////////////////////////var song:Sound;var channel:SoundChannel;var xform:SoundTransform;var

[Code].....

View 7 Replies

Flex :: VLC-Player In Adobe Air App Can Not Stop / Quit

Aug 9, 2010

I have an adobe air , downloaded from below link.. it is wonderful app.[url]...

and this works fine. It captures my screen , record audio but it just does not stop or quit as vlc-player.exe continues to run in the task manager.

i tried lots of vlc- commands but it just does not stop once it starts capturing screen video.

View 2 Replies

Flash AS3 Audio Player Seems To Just Stop Working

Nov 16, 2011

So far my code stops the sound but once it has stopped the sound no longer works. I don't see any errors reported. It is as if the event listener no longer listens...
stop();
var soundClip:Sound = new Sound();
var sndChannel:SoundChannel = new SoundChannel();
var soundClipCompleted = false;
var isPlaying = false;
soundClip.load(new URLRequest("tune.mp3"));
[Code] .....

View 2 Replies

ActionScript 2.0 :: Stop Auto-playing In Mp3 Player

Dec 8, 2010

I am using a free flash music player. It will be found here URL...When the player open, it starts music autoplay. But I do not want that. I want stoping auto play and when I will push PLAY button it will play music one after one.Optional: Is it possible to add an dancing Equalizer Bars during play time?[code]

View 5 Replies

ActionScript 2.0 :: YouTube Player Won't Stop Sound

Sep 1, 2011

I'm having a big problem using youtube player API (AS2)... Here's the thing: I have a movie in library wich I load when clicking a menu. This movie is attached to stage using the following function:

[Code]....

View 3 Replies

ActionScript 2.0 :: Cant Stop Loop In Flash 7 Player?

Oct 28, 2003

When I publish my movie to flash 6 using the 2 methods below the code works fine but when I publish this to flash 7 neither method stop the code from going into a loop and eating the cpu when you view the files online.

Code:
onClipEvent (load) {
easeMove = function (xpos, ypos) { _x += (xpos-_x)/5;_y += (ypos-_y)/5;};[code]....

The same thing happens on mac computers when published to 6 using the flash 7 player

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved