Actionscript :: Display An Image For X Seconds?
Aug 27, 2010Is there any opensource flash/actionscript code to display an image for x number of seconds.
View 1 RepliesIs there any opensource flash/actionscript code to display an image for x number of seconds.
View 1 RepliesI'm trying to create a simple image player that tweens from one image to the next every 5 seconds. The data is being pulled from xml.
So far, I have managed to load the image onto the stage, but am now stuck as to how to get it to remove the child showing, the add the next child every 5 seconds.
My Code:
Code:
var tweenTimer:Timer;
var imageLoader:Loader;
var xml:XML;
[cod]...
how to display seconds in my Date/Time display. right now I have Year, month, day, Hours and minutes displaying. But my Seconds are showing up undefined.
Here is my code...
function howlong(arg) {
if (length(arg)==1) {
arg = "0" + arg;
[Code]....
I am trying to make a banner like item for a website I am working on, I have 1 external text file 4 external swf's and 1 external .jpg that I am trying to get to do this: On page load display img1.jpg for 60 seconds and then randomly select a number and then display the file that is associated with that number, for 60 seconds, and do it again, and again until all of the text and swf files have been displayed and then start over from the beginning,
Now I can get it to select a random number and then pull up a file that is associated with that number with this code. I have shortened the time to see it work but still no avail
Code:
Movienum = Math.floor(math.random()*5);
if(Movienum == 0) loadVariableNum ("loaded_Text.txt", 0)
if(Movienum == 1) loadVariableNum ("1.swf", 0)
if(Movienum == 2) loadVariableNum ("2.swf", 0)
if(Movienum == 3) loadVariableNum ("3.swf", 0)
if(Movienum == 4) loadVariableNum ("4.swf", 0)
Code:
Movienum = Math.floor(math.random()*5);
function countDown() {
if (Movienum == 0) {
loadVariablesNum("loaded_text.txt", 0);
[Code] .....
I've build a simple video chat application. The problem is that there is a delay of seconds between video display i.e. user1 video motion change displayed bit late at the user2 window. I'm using FMS 3.5 and FLEX.. IS THIS PROBLEM RELATED TO THE BANDWIDTH. My FMS bandwidth is 256kbps.
[Code]...
I am developing a static flex application which does not have a database connection, all the values are hardcoded(its just a prototype for the original app). Now when I click the save button, i need to get a message like saving in progress... please wait, I need to display this message for 3 seconds.
View 3 Repliesi have a Flash Application with a button and an onRelease event. How can i load an external swf File, display it for 5 seconds on top of the main stage and then fade it out? Will this be possible with createEmptyMovieClip()?
View 2 RepliesI want to Display images at every 10 seconds while music is playing in Action Script 3.0. I have started to learn As3.But I need to do this in very quick time.I dont know what is the starting point for acheiving this.
View 2 RepliesI have eight images in a MC that I would like to sequentially fade in, display for a few seconds and fade out using _alpha function. So far I can fade one in with this AS:
img1._alpha=0
img1.onEnterFrame = function() {
this._alpha +=10;
}
Assuming my instances are img1, img2, img3, etc, etc... how would I go about sequentially fading each instance from 0 to 100, letting it display on the stage for a few seconds and then fade out (like a slideshow)?
On my homepage, when I enter, I want only the flash to appear first while the rest of the content is being loaded in the background. Once the flash has loaded, display it for 5 seconds then fade out to reveal the content. Is this possible with jQuery?
View 1 RepliesI have a movie clip symbol that is place on my main time line.I want the movie clip to display frames for (x) seconds then go to the next frame.I have a chunk of code that works by itself but when placed into my flash site it is causing some strange problems. Such as navigating to a label (page) prior to the movie clip that has the wait function code, freezes the flash.I am wondering if I need _root or a this in there somewhere.
The reason I want to do this is so I don't have to add a bunch of frames to get the pause time I need.Is there a way to use the code below and not have it cause problems with the rest of my time line?Here is the wait function code
stop();
i = 1;
function Wait() {[code].....
I want to display the current time into a dynamic text box. The time comes correct but the seconds is not running... I want live seconds. what modification should i do to my following code?
[Code]....
I am doing a tutorial from [URL] and I have a question. How can I have this swf reload the image every five seconds? the file name stays the same, but the image changes every 5 seconds and I would like the swf to show the updated images.
View 4 Repliesi want to rotate 3D an Image called img1 in Flex. I want to rotate it around y axis 180 degree. I can do this by using 3D effect already built in Flex but i want to do a bit more different. I want during rotating, there's another image called img2 appear on back of img1 (in default case, the image appear on the back is img1) and when rotating finish, the image will be img2.
View 2 RepliesI'm attempting to load a new image into a Movieclip from an Array assigned in KeyFrame 1 on the Main timeline and I am trying to use setInterval and clearInterval to get this working, but I think I may have layout or the function incorrect.[code]This loads a new image every time the panel is clicked on (Panel 2 - Trusted) but I can't get it to automatically cycle through the images in the array. Here's a link to the SWF in question: URL..And in case someone wants to see how I have it setup, here's a copy of the FLA: URL... (CSS and images are loaded externally)Does anyone see what I'm doing wrong? I need to apply this function to 2 other panels, so I need to streamline.
View 3 RepliesI have a website that I'm working on, and it's background consists of different full-screen images. right now, it's set up so that each menu button loads a new image file from a folder into the background mc. What I want instead is for it to load a new image every 30 seconds or so. There needs to be a transition between these images...either a direct fade or a fade to black then to the next image if easier. I doesn't necessarily need to be random.
View 1 RepliesHow can I make an image appear (a button) after a delay of say 15 seconds?
I need the image to display after 15 seconds, and then stay. I have read to use gettimer or setInterval, but I'm not sure how to do it in my particular case. In very rough terms, I need something like this:
onEnterFrame:
setInterval to 15000 and then
_root.button.gotoAndPlay(2); (this will display my image)
clearInterval
[URL]
But I wanted to make mine cycle through each image every 2 or 3 seconds
im messing with a movieclip symbol and i want to make a button, what'd i mean on Mouse over display/change this image in this X,Y cords or replace this image, something close to what buttonSymbol does but i want to make it using movieClip symbol...
and i have no idea how to do it.. i started like this:
[Code]....
After browsing for the images, and selecting them. How can I display a preview of the image in the datagrid? I am able to display the file name, file size, but was unable to display the image. Below are the codes I have written, it is not a complete code but just enough to make it understandable.
// variables used
var list:Array = new Array();
var listDP:Array = new Array();
[Code]....
I need to create an interactive slideshow where the each image automatically slides to the left every 10 seconds. There should also be the option of clicking a button to move both back and forth as well.
View 1 Repliesi've got 5 images. i want the following things to happen:
1. the placeholder movie clip automatically tweens to adjust to the image's dimensions.
2. the transition between each image is a la: www.barbariangroup.com -- front page when you enter
3. the images stay on the screen for approx. 5 seconds each.
I am using this following code to display images using xml.Everything is working fine for me but i have to add background image or border to the displayed image using function BitmapFileMaterial.
using BitmapData or Bitmap Class but same functionality.
[Code]....
I'm getting a data which contains a certain number.
I need to find how many hours, minutes and seconds it stands for.
for example:
I'm getting the number 248 which means:
00 hours : 04 minutes : 08 seconds
When i use time varaible and then minus the time. Ive noticed that flash does not count down in seconds, but the speed of light. My maths are not very strong so how can i get flash to count in seconds
var time =60;
sprite.onEnterframe = function(){
time -=1; ( this counts faster than seconds)
}
I'm trying to figure out how I can make the sound file that I load into Flash start at x seconds and end at x+30 seconds.So basically, I just want a 30 second sample to play starting at a specific time position. Does anyone have any advice on how to do this or have links to somewhere I can read up on it?
View 4 RepliesI'm working with the youtube API and I'm getting the current time on the video as seconds.What I want to do is to convert them into this: MM:SS.I've tried to google and try different things by myself but nothing seemed to work and be efficient.
View 4 RepliesI am currently using the following code to display the secconds of a FLV being played:
ActionScript Code:time_txt.text = Math.round(_root.video_mc.videoZ.playheadTime*100)/100;I need to change this to display MM:SS (minutes:seconds) rather than just seconds and decimals.The javascript people here at work suggested something like this:
ActionScript Code:
function strPad(str, places, pad, side) {
while (length(str) < places) {
[code].....
What I'm trying to do is have an image fade in, pause for 6 seconds and then fade out.My 6 seconds is doing something, but it's not what I want it to do and I'm not sure why. Here's my code:
import fl.transitions.Tween;import fl.transitions.easing.*;import fl.transitions.TweenEvent;var myTween:Tween;[code]...
I have a video player and trying to make a time indicator of minute and seconds.
View 3 Replies