ActionScript 3.0 :: Use A Webcam To Initiate Buttons / Functions?
Feb 4, 2010
How does one go about creating a webcam interface in Flash using as3?
Which classes need to be imported and what is the code required for Flash to interpret a movement (waving of the hand) into initiating a function.
View 2 Replies
Similar Posts:
Jan 14, 2010
URL...the problem is why it takes as long as it does to initiate the loading of the site if it's already loaded the site, here's the code for the preloader that loads the file that is being waited on:[code]
View 2 Replies
Sep 30, 2011
Making a game and I have a preloader class which is linked to the main 'game.fla' file, in the preloader class I have imported the 'Game.as' class that contains ALL the code to run the game. The problem I am having is that I can't seem to 'initiate' the game once all the elements are loaded.
View 2 Replies
Sep 3, 2009
I am trying to initiate a delayed drag like the one being implemented here: [URL].
View 1 Replies
Nov 30, 2009
I've got a simple tiling class, and it works as long as its a document class... how do i create a new instance and initiate it kinda like this:
Code:
var newTile:bgTile = new bgTile();
newTile.tile(pattern_name);
[code]....
View 2 Replies
Jun 17, 2004
after several hours tinkering I've set up a movie to initiate a set of actions triggered by a movieclips _x position. Im using Math.round to keep my intergers whole and im using ease on my movie clip. If the movie clip starts at 0,0 and the buttons are hit 1,2,3,4 everything is fine, but hit the buttons out of order (2,4,1,3) or set the start point of the mc to anything but 0,0 and the movie becomes a mess.I don't understand what im doing wrong. I tried some simple loop commands and my comp just locked up repeatedly so I broke down and used frameloops, it's closer to complete but still so far
View 4 Replies
Apr 22, 2009
I have lots of buttons on the stage but they all do the same thing, ie. CLICK & DOUBLE_CLICK.How can I group these functions so that if a button in a certain group is clicked then the functions of buttons in all other groups are disabled?
View 2 Replies
Feb 26, 2010
I am building a Flash site with a boombox animation. I have the below code I am using. I am using just two frames. First frame, is where I put the code in the actions layer, boombox is still. In the second frame, I placed my movie clips on layers (woofers vibrating & tape deck spins). No code in second frame. So, if you hit the play, previous or forward button a song goes on and the animation start. If you press the pause button, animations stop with music. I have created 2 functions per button.
2 questions: 1 - Is this the best way to do it? If I press the buttons quickly, sometimes a song gets stuck and I can't stop, forward, etc. I was wondering if this was the code?
2 - I am tweening in my pages using AS3 - not timeline. I have a music and video page (each a movieclip). Is there a way that once I tween in the new movie clip (non-music of vid page) that the music or video can shut off?
[Code]...
View 3 Replies
Dec 9, 2011
i have 4 buttons below
ActionScript Code:
home_btn.addEventListener(MouseEvent.CLICK, goto_home);
about_btn.addEventListener(MouseEvent.CLICK, goto_about);
portfolio_btn.addEventListener(MouseEvent.CLICK, goto_poftfolio);
contact_btn.addEventListener(MouseEvent.CLICK, goto_contact);
[code]....
View 9 Replies
Oct 29, 2009
I was wondering how to accomplish this. I have a .swf embedded into an html file with html links on the top. Within the .swf file I have a continue button that takes the user through all the frames. Is it possible to include some kind of code so that when they reach the end of the .swf the "next" link will become initiated and take the user to the next .html page. I am working with captivate is this feature in captivate? If anyone could point me in the right direction or share some wisdom it would really make my day
View 1 Replies
Oct 22, 2009
I have an app that when it starts loads up about 200 small gif images from the web server. Code looks something like this:
for each (myValueObject in myarray) {
var req:URLRequest = new URLRequest(myValueObject.getImageURL());
var imageLoader:Loader = new Loader();
[Code]....
This worked fine in testing for a few dozen images. But now I'm running it with about 200 images, and about half the images load fine but the other half I get an error:
Error 2044: Unhandled IOErrorEvent.
Each time I run it, different images succeed and fail. This gives me the sense that I have somehow reached a limit on either the number of concurrent URLRequest threads that Flash can run, or the number of concurrent HTTP requests that the image server can handle... or maybe there is a timeout on Loader that I can make longer?
View 2 Replies
May 26, 2004
I have a product demo in Flash that's roughly 1MB in size. When people access a page that this demo lives on, the demo doesn't visibly "appear" until over half of the total bytes have already been loaded..You can see this by clicking here, and seeing that by the time the swf materializes on the screen, the preloader progress bar is already over 50% (or so).How can I fix it so that at least something shows up right away, so that the user isn't staring at a blank screen for 30 seconds? The preloader seems to work ok.
View 3 Replies
Aug 4, 2007
Can you not initiate events with jps and loaded clips?
I am trying just to do a basic roll over function and its not working
Code:
function loadItem(itemID) {
newsTitle = _root.newsxml.firstChild.childNodes[itemID].childNodes[0].firstChild.nodeValue;
[Code]....
View 7 Replies
Sep 10, 2008
Even though i know not much of actionscripting, i like to make sites that are flash-based, so i keep on challanging myself with that. But now i stumbled into something, and i just cant find a solition! here is my problem: I have made dropdownmenu's in a movieclip and the mc works with hittest like this:
[Code]...
View 1 Replies
May 10, 2009
I'm still stuck on this! I've tried so many things and still can't get it to work. I've watched Tim Perkins' Lynda.com stuff and I still can't get this to work!
This is where I'm at now with the code. It works to an extent, but doesn't lock out the other bArrays when the first one is clicked. I would like the code to stop bArray2 & bArray3 from functioning when a button in bArray1 is clicked. Is this at all possible?[code]...
View 7 Replies
Feb 5, 2011
I'm using the below code to have a button that adds a MC to the stage. The problem is that I have over a dozen of these buttons and I'd rather not have to write out the event listener and function for every single button. Is there a way to use a single function for all the buttons and just change what MC is added based on which button is clicked? So if the user clicks on the draw5 button the function adds the deck5 MC to the stage?[code]
View 7 Replies
Aug 24, 2009
I have been trying to figure out this by myself for a while and needless to say, I have been completely unsuccessful. I have various a loop that creates multiple movie clips called: movie1, movie2, movie3, movie4... (you get the idea...) i want to assign roll over,roll out, press functions to all of theme.g. when you press on one movie, it highlights it.but I am trying to find a summarized way over writing each one out:
movie1.onRollOver=function(){
something happens
}
someonne once told me to use chartAt to do this, to reference different mcs, but I cant figure out how to do it.
View 1 Replies
May 20, 2008
here's the essence of what i'm doing:
[Code]....
View 9 Replies
Feb 15, 2009
im trying to create a series of buttons that will take the user to a link, each link different (obv.). i dont know how many buttons im going to have because im taking in an xml file and from there determining the number of buttons ill need but i need the buttons to go to their own sites. i cant get the buttons to remember where they have to go, they just get stuck on the last 1 through the loop.
[Code]...
View 2 Replies
Jul 27, 2005
I have searched many actionscript tutorials and forums in order to find a solution to my problem, so far no luck. My problem: To randomly deal 13 cards, face up, onto pre-designated coordinates of the main stage. Each card is, of course, different. Once dealt, how to get and set the value of each card to initiate the game?
View 10 Replies
May 6, 2011
I've been trolling through the forum and I've seen similar instances however I can't seem to get my head around how to make scripting work;What I'm trying to make is similar to an interface where users can input data into a list (myArray) should they need to remove information they can click the corresponding button to remove it, the current code is repositioning a button that's already on the field as opposed to creating a duplicate from the library
here's the full code:
stop();
//hidden hyperlink to AR
[code].....
View 6 Replies
Nov 18, 2011
I'm working on a simple image processor in AS3 and as usual I almost had it finished when an annoying little problem appeared. I want to open an image using a dialog box, and once the image is open I want the "selectBtn" (which is in my Library) to disappear. However when I try the code below I get a: "Error #1009: Cannot access a property or method of a null object reference". I'm sure it's something simple but I just can't figure it out!
// declare variables
var image:Bitmap;
var loader:Loader = new Loader();
[code]....
View 1 Replies
Feb 10, 2010
is there a way to start a stream, let it buffer, but pause it on the fast frame? (or not start it at all) the manual pause call is way to slow.
View 4 Replies
Jul 13, 2011
I'm working on a background music class and found that you cannot use the Sound class in a class file. Specifically, initiating and attaching the sound. Starting, stopping, getting the duration and such seem acceptable (though I haven't tested this yet). I've done a few searches and haven't found any work arounds other than when the class is called, hand it the sound object with the sound already attached, like this:
ActionScript Code:
import bgMusicClass;
var bgSnd:Sound = new Sound(this);
bgSnd.attachSnd("newWave.mp3");
var bgMusic = new bgMusicClass(bgSnd);
View 2 Replies
Feb 26, 2007
I have a main movie called home.fla. In this movie I only have one frame and I have place 5 different movie clips (not SWF) on this frame at different positions but on the same layer. These five movie clips are named mc_main1, c_main2.Each of these movie clips contains 5 frames, with a button on each frame. Each of these buttons also has a movie clip inside them (mc_sub1 mc_sub5). You can only go from frame 1 to frame 2 of each clip (main1, main2 etc.) my clicking on the button on frame1.The user can go to any of the main movie clips in whichever sequence they want. For example, they can choose to go to clip main3 and click on it twice (this will take the user till frame 3 of main3 and play the movie clip that is inside frame3) and then they can decide to click on main1 once and then main4 three times until they have visited all the parts of (all the 25 mc_sub) all the movie clips (main1 main5).
Once the user has visited all the 25 mc_sub i.e. once they have finished going thru all the 5 main movie clips completely, I want to display an animation (mc_animation) on the frame1 or any other frame of the home.fla movie.Is there away to determine if the user has finished watching all the 25 mc_sub i.e. if the user has gone thru each and every frame of each of the mc_main movieclips.I think the problem is that since the user can select any of the mc_main clips in any sequence, I am finding it difficult to determine when they have finished going through everything. If it was all in a sequence then I know I could have calculated if the current frame is equal to total frames and then I would have displayed the animation if the above was true; but that is not the case here.
View 3 Replies
Apr 16, 2005
a SWF that will serve as the main movie for the site. Inside this SWF, I have a script that loads a JPG into a holder MC that's on stage. So basically it's like this:
- main.fla
-- holder_mc (this isn't an empty MC, it has some PNG's inside)
--- external JPG loaded in by loadMovie
I'm ok with building a preloader for the holder_mc and the rest of the FLA (without the size info of the external JPG), but how would I incorporate the size of the external JPG into my initial preloader before I actually start playing everything. Would I have to set the holder_mc visibility to false, call the loadMovie, initiate the preload, and then set visibility back to true. There's gotta be a better way?
View 7 Replies
Aug 18, 2010
I've been having trouble in creating a game where I need to disable some buttons so that an animation can play. I've tried using a function to call a timer, but I keep getting a coercion error. Can someone steer me to where I need to go to be able to figure this out?
View 8 Replies
Jun 24, 2009
i'm having real issues with what I thought would be quite a simple transitional effect.I've made a simple test fla with 3 images (movieclips) which move on to the stage from left to right and fade from alpha 0 -100 at the same time. Images move on to the stage in response to clicking 3 separate buttons (Image 1, Image 2 and Image 3). Buttons are set to perform transitional effects which have been 'saved' as functions in the actionscript.
The image that is currently on the stage should fade out as a new image is called in - but I cannot seem to achieve it. Trying to research how to achieve this is getting me nowhere fast, just getting more confused with 'image loaders','transition manager','arguments' etc, etc .Here is my (embarrassing) sample code so far:
import mx.transitions.*;
import mx.transitions.easing.*;
//transition functions[code].....
There is more code, but nothing that relates to the transitional effects.Currently, each transition function 'tells' the other 2 images to fade out (whether they are on the stage or not). This works, but some images appear above others which means that they fade out on top of the image that has just been called on to the stage, which is a serious problem.
I guess some additional functions are required in the code that somehow differentiate between what is the current image (which should fade out) and what is the new image (which should move in and fade in above any other image on the stage).
View 1 Replies
Jan 27, 2009
I don't really use Flash anymore but have been approached by a client to work on a simple-function mp3 player with play, pause, prev, and next song buttons for their website. I'm using [URL] and wanted to learn how to create next and previous song buttons. Here is my code:
[Code]....
View 1 Replies
May 23, 2011
I want my site's users to be able to record videos straight from their webcams into my site. Videowhisper is one such tool which seems to work fine - [URL] But I'm looking for opinions on better / more scalable / reliable solutions. Paid solutions are fine.
View 4 Replies