Load On User Click
Aug 3, 2009
I'm using the following section of AS:[code]You do not need to import the sound file into Flash. You just have to make sure that the .mp3 file is in the same directory as the .swf file. You should also make sure that the .mp3 file is named the same as faFile in the FlashAmp .txt file. The benefits of this method are that the .mp3 file only downloads if the user gets to the bit in your Flash file where you call it. It also plays as it streams although there will be a slight delay as it buffers (FlashAmp will take account of this delay as the arrays are based on the position of the sound).
View 1 Replies
Similar Posts:
Aug 3, 2009
I'm using the following section of AS:
onClipEvent (load) {
//sets up a sound object, loads the .mp3 file and starts the sound.
this.faTrack = new Sound();
[Code].....
You do not need to import the sound file into Flash. You just have to make sure
that the .mp3 file is in the same directory as the .swf file. You should also make
sure that the .mp3 file is named the same as faFile in the FlashAmp .txt file.
The benefits of this method are that the .mp3 file only downloads if the user gets
to the bit in your Flash file where you call it. It also plays as it streams although there will be a slight delay as it buffers (FlashAmp will take account of this delay as the arrays are based on the position of the sound).
View 9 Replies
May 19, 2011
on clicking the Search Icon , a search bar will be visible (ON) if user click anywhere on the stage the search bar will be NO visible(OFF) OR user click on ICON again the search bar will be OFF but it Stage CLICK is triggered without clicking
[Code]...
View 1 Replies
Dec 10, 2009
I'm creating a site and i want to let the user to click a button and open a windows componenet that will load a movieclip that will content a Loader that will load an external image
my problem is that I want to set the contentpath of the loader dynamically
so i create a global variable and it works well , my problem is how to set the contentpath with this value
how to get the reference on the loader , i have tried alot of things many times but when i try to trace the values , i'm always get undefined value
View 1 Replies
Mar 23, 2011
I'm working on a slide show that auto plays but I want the user to be able to click the numbered buttons to go to that slide. See below link for the slide show.[URL] I know this is simple but I've tried on release gotoandplay and I tried some event handler code but don't know AS3 at all.
View 9 Replies
Aug 9, 2009
Is there a way to set an #include based on a user click?
When I load a .txt which contains all the variables used in a pre-made solution I purchased using loadVars, none of the as code works. It only functions when it's done as an #include:
#include "myvariables.txt"
Is there a way to do have the code use the .txt as if it was an include, but have it set by user click?
View 3 Replies
Sep 29, 2007
I load an image onto the stage and attempt to write this code to allow the user to click and drag the image, but it doesn't do anything!
[Code]...
View 2 Replies
Jun 16, 2009
this['dinamicallynamedmc'+dinamicnum].addEventListener(MouseEvent.CLICK, myFunk);how do I know which dinamically named MC was clicked?the function myFunkinstead of making a myFunk1-8 for each of the dinamically named mc's, is there a way i can figure what was clicked on? by instance name or something else. I plan to make a case for it then depending on which one was cliced, go to a URL.
View 6 Replies
Oct 21, 2010
i can only find info on this using AS3.i, however, am still using AS2.i need to create a button that a user can click to download an MP3.the only thing i could think to do was use a getURL, but when i do that, it opens the MP3 file and starts playing it in the browser. i need it to open a "Save As" dialogue, instead. I'm totally stuck on this one.the MP3 for download is located in a folder called "music" (music/A.mp3)
View 6 Replies
May 14, 2011
When the user clicks on the video once its ended id like it to pop up a window with a new url in it - how can i do this in jw player?
View 1 Replies
Feb 17, 2009
At the end of each video, i want an arrows to appear (left or right [or both]) in order for the user to click, so that they can "go into the next room" by watching the next video.
The "undefined" part is to check if an object has a variable set, if the variable is not set it will be "undefined".
To know which is the current video, I think i need to store the object that relates to that video once it starts playing. So any time a video starts, store that object in the variable. But im not sure how to do this.[code]...
View 0 Replies
Mar 22, 2010
I want to have an application where the user click on a movieclip, and is then taken to a another page. What I need is the code so as a user clicks a moviceclip (for example MC_1) it holds a variable (say = 1), as the movieclip is pushed a movie plays which at the ends checks for the variable change and then re-directs the user some where?
View 1 Replies
Jul 27, 2010
I have a problem with the input text. I have a empty input text box on the frame one. Its name is "w". Then i m waiting for user input to that box. When the user input a text, i want him to click the button (called "manage_s") which will take him to the frame 2 and show the result of his input. (basically its quering the server).
[Code]...
View 9 Replies
Jan 1, 2010
If I have several items that move across the screen but the user can click any of them at any time, how do I record the current position of the item in order to use that data to change the position of the item?
View 4 Replies
Jan 1, 2005
I am working on a website where I want certain images to load whenever a user clicks on a thumbnail. I want a preloader to appear before the image is displayed. I created this so far:
mcLoader = new MovieClipLoader();
loadListener = new Object();
mcLoader.addListener(loadListener);
mcLoader.loadClip("foto.jpeg", placeholder_mc);
loadListener.onLoadProgress = function(placeholder_mc, loadedBytes, totalBytes) {
[Code] ....
When I preview this of course I see my image, but I want to know if the preloader works. So I hit ctrl+enter again and... nothing. The progress bar (bar_mc) blinks once and then blank... a white screen... Besides, I want this code to be executed when a user clicks a thumbnail, how can I implement this on a button, while at the same time, the first thumbnail should load automatically, so there's no exmpty page when the user first opens the website?
View 1 Replies
Mar 19, 2009
I have created an activity in which the user is invited to click on some buttons. There are approx 60 buttons to choose from with 7 of them being the correct ones. If the user clicks on 1 of the incorrect 53 buttons i want a hint pop up to appear to steer them in the right direction. Is there a efficient way of doing this without having to create a function and apply it to all the incorrect buttons? Perhaps an event listener? (AS2).
View 1 Replies
Jul 22, 2009
Eventually I would like it to show our projects along a horizontal axis, when the user clicks an image additional images and text is revealed. At the moment I have got the horizontal axis working with images loading in and separating into each project. Now I am trying to code it so that for every project a mask is loaded in with the height of the mask equaling the length of the pictures (which I think may need me to restructure my code). So that only the first image is shown.
The important code for this is:
function processXML(e:Event):void{
var myXML:XML = new XML(e.target.data);
xPos = 0;
yPos = myXML.@YPOSITION;
thumbWidth = myXML.@WIDTH;
thumbHeight = myXML.@HEIGHT;
[Code] .....
I'm not sure if i need to restructure the code so that for every project in the xml file it inserts the images of that project into a new movieclip, not sure how to do that though.
View 1 Replies
Mar 16, 2010
how to get 4 FLV to seamlessly run from one to another without the end user having to click a button?
View 4 Replies
Apr 9, 2011
I unserstand security restrictions about working with clipboard. The user must do an action then clipboard may be written.
But what if on mouseclick i have to load some text from server using URLRequest and copy obtained data to clipboard?
Like this:
protected function clickHandler(e:MouseEvent):void
{
this.fileReference = new FileReference();
this.fileReference.addEventListener(Event.SELECT, this.fileSelectHandler);
[Code]....
View 2 Replies
Oct 1, 2009
I need to develop, what would be like, a projector screen that the user could pull down, read what is on it, and click to "roll" back up. I know how to do the interaction with the mouse and all, but how do I make the object "grow" so it is hidden when it is "rolled" up and slowly reveals itself like a projector screen would?
View 4 Replies
Dec 29, 2011
I am trying to create an interactive animation which allows the user to click on objects which then starts a new animation and i'm having trouble with removing the old animation movieclip and adding the new one my code is this:
stop();
var snake:Loader = new Loader();
var box:Loader = new Loader();
var snake2:Loader = new Loader();
[code]....
(its after the box is clicked I want the snake animation to be removed and the 2nd snake animation to be added)now I reckon I dont need the boolean.
View 3 Replies
Aug 13, 2006
how to play a sound when a user mouse click on anywhere in the stage?
View 1 Replies
Oct 1, 2007
I have a simple jukebox section on site and need a preloader, to let the user know that something actually is happening when they click on play, and wait for mp3 to load. What is best way to create preloader based on the code I am using (which is as simple as can be!) here is the code:
[Code]...
View 1 Replies
Apr 7, 2008
I have a slight issue with my application I'm working on. Whenever I attach new "windows" to the stage (using attachMovie), it seems that the window that is currently on top allows the user to click the buttons and components on the window behind it. I'm using Flash CS3 Professional, but exporting to AS2.0/Flash8.
View 3 Replies
Jun 18, 2008
I have a circle and a square on the stage. When you click on the square the circle will go to "circle._x = 300" when the circle is at 300 I want to make it when you click on the square the circle will go "circle._x = 45"
Code:
moveCircle = function () {
circle._x = 300;
if (circle._x >= 300) {
circle._x = 45;
}} square.onRelease = function() {
moveCircle();
trace(circle._x + "is the position of the circle");
}
View 5 Replies
Jul 10, 2009
that said, i have a simple movie clip animating that i want the user to be able to click different buttons to cycle through different versions of this movie clip. so, my question is, how do i allow the user to click one of these 4 buttons, and have the movie clip change to the corresponding version of that movie clip? again, this is all pretty basic stuff and i'd like to keep it as simple as possible, since i'm still new!
[Code]...
View 2 Replies
Apr 16, 2010
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?
View 1 Replies
Jul 12, 2011
I'd like to set up my splash page (all Flash) so that the login form is ready and waiting for input, without the user having to move the pointer to the first input text field and then click it.
View 3 Replies
Aug 21, 2011
I used code that kglad suggested to add a button that copies the embed code for a SWF to the user's clipboard:
clip_btn.addEventListener(MouseEvent.CLICK,clipcopy);
function clipcopy(e:Event):void{
Clipboard.generalClipboard.setData(ClipboardFormats.TEXT_FORMAT, s);
[code].....
View 1 Replies
Apr 6, 2011
I am using Flex Spark Slider as a time-line for a Flex video player custom component I have created.
I want to prevent the user from clicking on the slider and changing its value, but at the same time I should be able to change the value of the slider programmatically.
Setting the "enabled" property for the slider to "false" doesn't help as then I am not able to change the slider value programmatically.
View 1 Replies