ActionScript 3.0 :: WTF - CS5.5 HitTestObject - Drag Player And If The Play Htis "ground" Nextframe Should Be Played?
May 21, 2011
It was long time sense i play with Flash so i decided to start agian. I wrote this really easy code in AS3, in FLASH cs5.5: PHP Code:
[Code]...
That means that i can drag my player and if the play htis "ground" nextframe should be played. BUT it doesnt work for some wierd reason? Why?
View 1 Replies
Similar Posts:
Apr 27, 2011
I have a function that states when movieclip1 is dragged and hits a line then it stops the drag, however it seems to stop the entire drag function in the swf on the other movieclips even though they arent called in the function.[code]
View 1 Replies
Sep 14, 2011
I have made racing games in the past, but never a side scrolling type.Im trying to make one similar to this: http:[url]...But how would you keep the player on the ground? well not stuck to the ground because we would want the player to be able to use things like ramps.
View 5 Replies
Aug 19, 2010
Fk says my last login was 3/23/2006! So I'm rather rusty! All I wanted for now is to drag an image and update the view on release. So, I have two frames:
[Code]....
When I play, it starts and stops dragging nicely. But it will not advance the frame. If I try something else like getUrl, that works fine too. gotoandPlay does nothing as well, though. What am I missing? This is Flash MX2004, as2.
View 4 Replies
Dec 11, 2009
First off, I'm a total noob when it comes to actionscript. I'm attempting to create a flash movie file that basically has a number of thumbnails in a straight line. As the user puts their mouse over a button I'd like the movie to advance to the next frame and keep playing until the user's mouse leaves that button. I found an online tutorial to accomplish this in AS 2.0 but I would rather do it in 3.0 so it's current.I have the following code that sort of works; when I hover over the right_btn, it advances to the next frame, but only advances 1 frame instead of playing the movie forward. The left_btn should go to the previous frame and play the movie backwards.
right_btn.addEventListener(
MouseEvent.MOUSE_OVER,
function(evt:MouseEvent):void {
[code].....
View 1 Replies
Jun 30, 2009
I'm building a flv_video AS3 player. I'm using steaming-video.The player is working fine, but there is something that I want to improve. Currently when I push play button and if I drag&drop the scrubber of progress-bar somewhere in the area that is still not buffered, the player doesn't start to play from that position. So I want to do it.
View 2 Replies
Nov 5, 2010
Hw is it possible to make an drag&drop object and make it "physical", so main game character can walk on it, jump on it ect. as on a ground?
View 9 Replies
Dec 29, 2011
I want to trigger via mouseDown a function that plays a 30 frame mc while the mouseX coordinate increases and the mouse Y decreases. Then when the mouseX coordinates decreases and mouseY increases ie. the mouse moves up on the stage - mc plays in reverse So basically the movieClip is scrolled by the mousemovement. When the mouse is not moving mc stops at currentFrame
View 3 Replies
Mar 15, 2010
I am working on a multipage Flash piece in Actionscript 3.0. I have a drag and drop game inside it. My goal was that there were two correct answers (owlBtn & cougarBtn, both are movieclips not buttons) and there are two hitTestObjects (box1 [top movieclip] and box2 [bottom movieclip]). I am trying to write the code so that if the owl or cougar are dropped in box1, the label beneath the box appears and the movieclip snaps to box1s dimensions. This of course, is the desired reaction for box2 as well. I only have two functions, a start drag and a stop drag, and a wicked long if statement.Yet, I have this problem. Whatever the user puts either the owl or the cougar in box1 and then proceeds to put the correct answer in box2, the correct answer snaps up and locks in box1.
DragNDropProcess.doc is a word document that has images that show what is happening.And this is my if-statement. Someone I was talking to, suggested that it's the hitTestObject that is still active once a drop has been made and this is messing up the rest of the code. If this seems like a solution, is there anyway to remove the active state of a hitTestObject, once the hit has been made? Or make it null? Flash tells me I can't just attach a null to it, so I'm just stuck as to how to continue.[code]
View 1 Replies
Jul 22, 2009
I've uploaded a video produced by Camtasia, but it's not played at all! Have a look: [URL] You see that the video is being downloaded, but not played.
The player is ARPlayer 1.7. The video is a mp4 file.
The file is perfectly played on a local computer, but after uploading to ftp stops being played. I don't why...
P.S. It's interesting that if I make simply an swf-video file, it's played good: [URL]. But I don't like this option, because the swf-video is 30MB vs 5MB of the mp4-video.
View 2 Replies
Nov 8, 2010
I just updated to CS5 - I'm working on a custom video player. It works fine embedded in a web page both locally and on the network. It works fine in the debug player. However, when I test it in the authoring player I get a NetStream.Play.StreamNotFound error and no video. I have tried setting the Local Playback Security publish settings to both local and network - doesn't find the video either way.
It used to run fine in CS4 in the authoring environment.
View 1 Replies
Mar 30, 2011
I wasn't able to add all the code before. Essentially after a movie plays I want the swf to reset to it's first original loading frame.
function stopVideo() {
showPlayBtn(true);
Tweener.addTween(videocontrols.stopBtn, {
_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
myStream.stop();
[Code] .....
View 1 Replies
Jun 24, 2011
I need to know how to make video play only once because code below is put on 102frame and when i go back i go to 50frame and video starts over again... I need video to play only once... no matter what...here is the code i put for video...Code:var nc2:NetConnection =
[Code]...
View 1 Replies
Jul 22, 2010
In my game the player can create turrets, those turrets will be put into a array but my problem is that i dont want the player to be able to build 2 turrets or more on the same spot. this is what i have tried so far:
[Code].....
View 1 Replies
Aug 24, 2010
I have a video player in flex which constantly plays a movie. Is there a way to see how many times it has played? So each time the movie is played, text filled populates with +1.
View 1 Replies
May 6, 2009
I need to know how to make video play only once because code below is put on 102frame and when i go back i go to 50frame and video starts over again... I need video to play only once... no matter what...here is the code i put for video...
Code:
var nc2:NetConnection = new NetConnection();
nc2.connect(null);
[code].....
View 1 Replies
Oct 20, 2009
(I have on a server an mp3, and the server is HTTPS that requires an certificate and a key (TLS) and I need to get that mp3 on flash)I found some classes (Crypto) but there the TLS it's only partial implemented and support for client-side certificates is not implemented yet.So maybe some of you worked with this and you know more things about it.f you don't know many things about the TLS security how can I protect from download my music that is played with an AS3 audio player on my website
View 4 Replies
Jun 25, 2006
I'm trying to figure out how to get the name of the current file being played using a flash 8 video player (custom). Here's the code im using :
[Code].....
How does flash know which video is currently being played? Basically I want to set it up so that there is a 'activeVideo' varible that updates based on what video is currently being played.
View 1 Replies
Jul 24, 2008
i am having some problems linking my mp3 player swf file to my website. It looks like it loads fine, and the buttons work and change the track of the song, but there is no sound heard or played. Here is the code i used to do this:
[CODE].....
As i said before, the player loads up and shows up on the website with no errorsand the buttons work (going to next or previous song as well as the pause and play buttons pausing and playing the music properly), but no sound can be heard. (this is being test on the latest version of firefox).
View 6 Replies
May 20, 2009
I have 2 swf's and a activex media player on an asp page. I want the buttons on my swf to control what live stream the activex player plays. The stream urls are in a webservice that i connect with one swf then send to the other swf using "localconnection". So when you click on a button on the first swf, it then sends a list of available streams to the other swf, displaying them in their designated dynamic text fields, which are located on top of their corresponding buttons. In my "localconnection" i send both the name and the url from the first swf to the second. Basically I want to know if its possible to click on a button in a swf and control what stream is played through the media player on the same asp page.
View 1 Replies
Jun 7, 2010
Working with ActionScript 3.0, is there a way to determine if my SWF file is been played in the standalone Flash Player or using a browser plugin?
View 1 Replies
Sep 8, 2009
I've created a website which uses a flash header incorporating the navigation. Each time a user loads a new page, the header replays.Is it possible for a bit of script to detect if the header has played and not play it again on every page load?
View 1 Replies
Aug 3, 2010
I have two mp4 video files on webserver, i wanted to play them in flash player(flv player) on my asp.net page, but i couldn't be able to play them, i also tried to play them in quick time player the same prob occured. but i waz giving the accurate path, there were no spaces in mp4 file names etc. Does it need to have mp4 player(or codec etc) installed on webserver?
I have also some wmv files on that server , and i am playing perfectly using silver light player, and media player object on my website.
View 1 Replies
Oct 14, 2008
im making a 2d game with platforms and walls and floors and such, i've got most of the physics i need. gravity, speed, ect. But when he is supposed to stop after "hitting the ground he just goes straight thru. The ground he should stop at is a mc called bg and inside is a mc called platform. what am i doing wrong?
Code:
onClipEvent(enterFrame){
//Keeps Character from going thru the floor, roof & walls
if(this.hitTest(_root.bg.platform)==true
gravity = 0;
}
View 4 Replies
Aug 21, 2010
i'm currently making a flash game which has ground and water.And its going to be big.For someone whos 13 like me i have problems.The script was edited recently so sorry to anyone who was working on it.the issues are underlined.here the script.
onClipEvent (load) {
grav = 2;
speed = 15;
[code].....
View 2 Replies
Mar 16, 2009
I have to play a sound file and show the progress of the sound file being played. I am using import flash.media.Sound; import flash.media.SoundChannel; But the PROGRESS event gives theprogress of loading of file. I want to know of much of the song has been played and how much more is left.
View 3 Replies
Apr 27, 2009
I wonder if there is a way to have an flv which is added with the netstream to the swf to not play. Instead it should be a slider bar that you can drag front and back manually to view the content in the video. The drag bar should be a movie clip that you can drag on a horizontal line which is then connected to the timeline of the flv to view the content in the flv front and back. Is there a tutorial available somewhere or does anyone know how to do this?
View 1 Replies
Nov 2, 2011
I have three movieclips in my library (Ground1, Ground2, Ground3). Depending on the game level I want to use a different one but I reference the ground movieclip through out the game. How can I declare the variable (i.e.
var ground:Ground1
So I can set ground to a different library clip like this:
if(level == 1){
ground = new Ground1();
} if(level == 2){
ground = new Ground2();
} if(level == 3){
ground = new Ground1();
} ground.scaleX = 10;
ground.scaleY = 10;
worldSprite.addChild(ground);
View 1 Replies
Jul 25, 2010
I have a flash file, where I want to use default zoom function from Flash menu in swf player. Clicking "Zoom In", zooms into the swf file. Then when I try to use drag from mouse to change visible area, it does not work on moviclips. If I click on top of blank area, I can drag. Though this works fine in Flash as2 file.
View 5 Replies
Nov 4, 2009
I'm trying to create a record player using drag and drop to play MP3s, like this one... [URL] so that the needle 'drops' onto a different ridge of the record. (single item - multiple targets) I've created a prototype which plays the mp3 on the first 'drop', but if i try and replay the song, i have to drag it elsewhere then re-drop it into the ridge again.
View 0 Replies