ActionScript 2.0 :: Synchronize Movies Depending On User Choice?
May 1, 2011
I have a flash project where I have two movies that are supposed to synchronize, depending on user choices. Most of the time they do, randomly they do not. So I thought perhaps there is something wrong with the code I am using.
Code:
on (press){
this.movie1.gotoAndPlay(random(this.movie1._totalframes));
if(this.movierandom.enabled == false){
this.movie2.gotoAndPlay(this.movie1._currentframe);
}}
What's supposed to happen is, when the button is pressed, movie1 goes to a random frame and plays. If movierandom is not enabled, movie2 is supposed to go to the same frame as movie1 and play. Movie1 and movie2 have the same number of frames. Occasionally, movie2 goes to a different frame.
View 1 Replies
Similar Posts:
Jul 9, 2009
I've got an SWF that'll be viewed via a webpage, that loads a choice of 7 different web pages/SWFs depending on buttons clicked.The problem is these files are quite big and take a good few seconds to load each, so for each SWF, I created a progress bar on frame 1, that then loads frame 2 (where all the code and content is) once it's ready. The code I used is as follows:[code]The problem is as you can see from is that it takes ages to load the loader! So I end up with a blankurl... screen then the loading bar, then the content. Making the loading screen pretty useless!
View 2 Replies
Jun 25, 2009
I want to make a flash form where the viewer/user can watch a video clip of their choice (from a drop-down control or something else if there's a better way). I've found myself totally unable to find our how to do this. I mean, frankly, I don't even know what kind of file to start from the "New..." form at the beginning of Flash (CS 3.0, btw)!
I know how to create a Flash Player and link it to a single video. What I envision is that after the page comes up, with a single player component (initially empty), the user chooses a video from the drop-down list and that video starts playing in the player. What kind of file should I be starting with? {I kinda assume I'll be making an SWF to put on a web page.} Where on earth do I learn how to get the simplest things (e.g., button clicks, etc.) to work?
View 2 Replies
Apr 25, 2008
Its meant to be a background preloader, so it loads stuff in, but if the user selects something it stops, loads the choice item and removes it from the "to be loaded"...loadArray. so when it restarts it knows not to load it again
Setback/feature 1: if a user choices to select an item, it will continue to load whatever is loading and start to load the item they want.
Setback/feature 2: the preloader will not restart until the user calls userCont().... should I have a timer so after awhile it kicks back in?
Error: just realised I have to stop it when it gets the end of the list.
Code:
stop();
//loadArray = stuff to load
//targetArray = target for stuff to load into
//loader(loadArray, targetArray);
// call loader function
[Code] .....
View 1 Replies
Jul 28, 2005
I'm developing Flash for a CD.I want to create a button for the user to click and then have a choice to save or open file (like PDF or Word file).
i have the following code:
Code:
myButton.onRelease = function()
{
getURL("abc.doc");
}
I can't see anything wrong with the above. I intend to use the code for a CD ROM.abc.doc will sit on the CD ROM. When I click on the button, it opens a browser window and tries to go to google.com.I had it working the other day.
View 2 Replies
Sep 27, 2009
i have a flash movie that has a clock , slideshow and text scroller that plays all day in my resaurant. I want to change it so that it plays a movie with special offers in the mornings, then plays a movie saying we're reopening at 4.15 in the afternoon and then play another movie wit clock/slideshow inteh evening. How can i set my flash code to play these 3 different movies at the specified times automatically.
View 14 Replies
Aug 22, 2011
Is it posible to make a flash site, which will change the size when the vistors resolution is diferent? Practicly, every visitor will see the same size of the site, even if he has 800x600 or 1280x1024??Maybe making html go fullscreen but make the swf occupy only 80% of the screen, so it always have the same proportion to the users monitors.Do you have any example?
<center>
<table border="0">
<tr>
[code].....
View 1 Replies
Mar 29, 2010
Anybody has an idea how to accomplish something similar with the gallery in this website?
I have an XML gallery in my project that has pre-specified numbers of columns.
- How it could be possible to detect user's screen resolution (use of Event.RESIZE?) and according to this to change the number of columns - and of course rows?
Forgot to mention that I load records from a database so I am not aware of the total number of images...
View 6 Replies
Feb 22, 2012
If you don't add an asset (text field, mc, btn etc) to the stage / create the object dynamically, is it possible for the asset to move x,y position or alter it's properties depending on the user environment? If so, what environments can cause this? IE what browsers, op. systems, player versions etc?
View 4 Replies
Dec 1, 2003
is it possible if i have two versions of a flash file made, to have a redirect or detection that would choose the swf depending on what version of flash player the user has? so if they have flash five they get 5.swf and if they have flash 6 they get 6.swf
View 7 Replies
Jan 19, 2006
I need to open a popup(html) form a Flash projector.
And I need save Files with "Save as window" from a CD to user choice...
View 1 Replies
Nov 24, 2009
Is there a way for flash to detect a user's bandwidth, and depending the size of bandwidth, stop loading, or continue with the load? Now that I'm thinking about it, this would probably be a javascript detection script and if the bandwidth is high, load .swf, if not load a .jpg?
View 3 Replies
Feb 7, 2011
I want to synchronize sounds perfectly to do a kind of Audio Mixer, using different sounds. All I have been able to do is to play 2 sounds at the same time, but I cannot do it with 3 audios or more, they don't go synchronized. JamStudio.com does it perfectly, I've been researching and researching and I just don't know how to do it! How does JamStudio.com synchonize audio so perfectly? you can even change sounds and the new ones will come on time! How do I do that? Is it just Action Script? or are they using something else?
View 5 Replies
Oct 29, 2010
The question is how could I stop a method being called twice, where the first call has not "completed" because its handler is waiting for a url to load for example?
I have written a flash client which interfaces with a java server using a binary encrypted protocol (I would love to not have had to re-invent the whole client/server object communcation stack, but I had to encrypt the data in such a way that simple tools like tamper data and charles proxy could not pick them up if using SSL).The API presents itself to flas as an actionscript swf file, and the API itself is a singleton. the api exposes some simple methods, including:
login()
getBalance()
startGame()
endGame()
Each method will call my HttpCommunicator class.HttpCommunicator.as (with error handling and stuff removed):
public class HttpCommunicator {
private var _externalHalder:function;
public function communicate(data:String, externalHandler:APIHandler):void {
// do encryption
[code]...
Will the second call trounce the first calls communicator variable? i.e. will it behave as if its static, as there is onlyone copy of the API object?If say there was a button on the GUI which had "update balance", and the user kept clicking on it, at the same time as say a URLLoader complete event hander being called which also cals the apis getBalance() function (i.e. flash being multithreaded).
View 1 Replies
Nov 18, 2010
I'm experimenting with P2P on Flash, and I've come across a little hurdle that I'd like to clarify before moving forward. The technology itself (Flash) doesn't matter for this problem, as I think this problem occurs in other languages.
I'm trying to create a document that can be edited "live" by multiple people. Just like Google Docs pretty much. But I'm wondering, how would you suggest synchronizing everyone's text? I mean, should I message everyone with all the text in the text field every time someone makes a change? That seems very inefficient.
I'm thinking there has to be a design pattern that I can learn and implement, but I'm not sure where to start. Optimally, the application should send the connected clients only the changes that have occurred to the document, and have some sort of buffer or error correction that can be used for retrieving earlier changes that may have been missed. Is there any established design pattern that deals with this type of issue?
View 2 Replies
Dec 10, 2008
making two web banner commercials where a bottle is supposed to fall from one banner to the other. The two files are separate and I dont think I can communicate between them. I need a quick solution to make the animation start at the same time in both files (if one file is loaded quicker than the other). Is this possible? Ive seen commercials where this has been done, but I dont know how they did it. I use as2 but if you have a solution in as3 its no problem.
View 1 Replies
Feb 10, 2011
I've just learned this process in the Flash CS4 help manual (page 276), but unfortunately the sound track I placed in a movie clip timeline (used as a button OVER state) doesn't stop playing once I mouse away from the button. So, I presume a simple myBtn.addEventListener(MouseEvent.MOUSE_OVER, clickHandler) could allow me to execute a method in a function to stop the repeating sound.
View 5 Replies
Dec 8, 2009
Multiple computers running a kinda of quiz (in asp.net). Every one of them plays a video as background (in the browser), sorta like a screensaver (with advertising). When moving the mouse a div pops up which allows the user to choose a quiz in fill out the forms. The catch is that the video needs to be synchronized on all the PCs.These are the constraints: The asp.net code is already there, so writing it completely in flash is no option. We know .NET, javascript, html, the standard webdev stuff best, so investing time is something new is a last resort.
View 1 Replies
Sep 2, 2011
[Code]...
addElement and removeElement is called by two separate timer events. And in each method it modifies the global variable NoOfElements. Is there a method to synchronize variables in acionscript ?
View 1 Replies
Jul 27, 2010
I have multiple children movieclips containing png images inside of a parent movieclip. The parent movieclip has a slow looping animation. The children don't stay in sync with one another during the animation. It becomes obvious to see because there is a background child clip with other child clips on top of it. It appears to only happen with movieclips containing a bitmap image. Does anyone have an easy fix or work around for this?
View 5 Replies
Sep 9, 2011
is there any best way to synchronize the audio with text in flash
View 1 Replies
Jul 27, 2010
I'm building a game with two main objects on screen.
1) An animated MovieClip with 144 frames inside.
2) A ball that will be moving around the screen.
I've animated both objects with two different timers. One has a delay of 0.0333 seconds (30 fps) and the other has a speed of 0.0222.
Now there is something I do not understand. If both objects start moving/animating at the same time... When my ball reaches certain point on the stage, I check the currentframe property of the other animated moviclip but it's never on the same frame at that point. It varies...
If they are both at a constant speed, even though they are different speeds, why would the animated movieclip be on a different frame each time? It varies a few frames each time I output it to check.[code]...
View 2 Replies
Apr 19, 2010
I plan to use a timer event to fire every second (for a clock application).
I may be wrong, but I assume that there will probably be a (very slight) sync issue with the actual system time. For example the timer event might fire when the actual system time milliseconds are at 500 instead of 0 (meaning the seconds will be partially 'out of phase' if you will).
Is there a way to either synchronize the timer event to the real time or get some kind of system time event to fire when an second ticks in AS3?
Also if I set a Timer to fire every 1000 milliseconds, is that guaranteed or can there be some offset based on the application load?
View 3 Replies
Oct 29, 2010
I'm trying to play multiple video streams simultaneously. However, I cannot synchronize these videos to play at the same rate.
I have three 45-second videos in FLV format and I use flash.net.NetStream to play these videos. I call netstream.play() of these netstream at the same time (by using a for-loop). However, these videos are out-of-sync even all videos files are on my local machine.
For example, when the wall clock is at 10th second, the first video is at 7th second, the second video is at 10th second, and the last video is at 5th second.
I think it may be affected by different jitter delays when streaming. However, I still cannot find the way to solve this problem.
View 1 Replies
Jan 23, 2010
I would like to have one controller to sync and control multiple video objects(start/stop simultaneously).
View 1 Replies
Jan 16, 2007
I have an intro.swf file that is basically a movie with sound that is exported for actionscript but not exported in the first frame. I just stuck it in a movie on my timeline and it works great and the preloader works because it doesn't load the sound before the preloader. I use :
musicSound = new Sound();
musicSound.attachSound("music");
musicSound.start();
to play the sound in intro.swf.
However, now this intro.swf gets loaded into an index.swf and everything works fine and the sound plays as long as I have the sound included in BOTH the intro.swf and the index.swf and the sound is exported on the first frame in the index.swf. I was hoping I could remove the sound entirely from my index.swf since it already loads into the intro but so far
View 9 Replies
Oct 25, 2005
I have been having trouble creating a movie clip with a reverse rollover effect within a movie which has a reverse rollover effect. that sounds confusing
In essence I wish to create a panel that rolls out on rollover and rolls back in reverse when the you rollout. I have done this using this script
[Code]...
However I wish to make movies within this movie that have the same effect on them. But when I create another movie or button within this movie it is not registering on rollover. I guess because the script on the main movie overrides it?
View 2 Replies
Jan 31, 2007
I have made a quiz from mixing and matching from various tutorials of the internet, and now want to make the questions (multiple choice) and possibly the answers appear shuffled. The xml looks like this:
<quiz>
<title>Quiz</title>
<items>
<item>
<question>In which continent is the country Japan located?</question>
<answer correct="y">Asia</answer>
<answer>Europe</answer>
<answer>Africa</answer>
<answer>America</answer>
</item>
and here is what I've got so far with the actionscript!
View 2 Replies
Apr 22, 2009
I have a project that i want to make which is a Multiple choice game containing questions and the answers is four pictures when you click on the right answer you move to next question when your are wrong a wrong sign appears i have zero knowladge about flash but i thought this is similar to Geo Challenge in facebook ,,Right ?? what software to download ? any tutorials online ?
View 4 Replies
Oct 18, 2009
I have declared an array which holds an object such as:
var myArr:Array = new Array({Question: 'Primary Colors Are?'});
How can I add the multiple choices to the object These are the choices:
red, green, blue
orange, red, white,
purple, yellow, green,
white, black, blue
I certainly can create the Answers as:
var myArr:Array = new Array({ Question: 'Primary Colors Are?', Answer1: 'red, green, blue',
, Answer2: 'orange, red, white, Answer3: 'purple, yellow, green', Answer4: 'white, black, blue' });
What I would like to do is to be able to store all the answer choices within an array called AnsArr. Can I declare a new array within the same obejct such as AnsArr and push these choices to it?
View 3 Replies