ActionScript 2.0 :: Create 'internal Clock' As Alternative OnEnterFrame()

Oct 8, 2006

I am designing a couple of games in flash and i came to the conclusion that i need a more flexible solution for timing instead of onEnterFrame; An interval based system which i can pause or change the speed, independent of the frame-rate of the flash file. So some processes might be running at frame-rate while others use the clock. One of the trickiest parts might be controlling animations with the clock, but this would allow to make a real slowmotion effect.. Since i really have to brush up my skills, i have some problems/questions;

what technique would be most usefull for this? thinking of an interval and 'addlistener's type of thing. Is this heavy on performance?Not sure if the animation part would work.Do You guys think it could be a usefull function? is there another way?

Ps. I posted this here, because to me this is more about the technique than its application (the game).

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Clock - The Digital Clock Works Fine, But The Analog Clock Just Starts From A Random Time?

Apr 12, 2011

I have to make this analog clock for a university assignment and despite some really good efforts last night and tonight I just can't work out how to get it fully working. There is both a digital and analog clock; the digital clock works fine, but the analog clock just starts from a random time whenever I play the test movie. I am supposed to use the date object, not the timer object. And I am also supposed to add a sound every minute - I have added the sound to the minutes layer and selected but I don't know where to go from there. I seem to be able to find lots of example code for the timer object but not the date.

this.addEventListener("enterFrame",clockHandler); false, 0, true;
function clockHandler(e:Event)
{[code].....

View 3 Replies

ActionScript 2.0 :: OnEnterFrame=null - OnEnterFrame=undefined & Delete OnEnterFrame

Mar 29, 2008

onEnterFrame=null, onEnterFrame=undefined & delete onEnterFrame....

Which one to use??? What are the performance considerations. If all my movieclips on-stage are running a MovieClip.prototype.onEnterFrame = function() {run initial stuff before setting onEnterFrame=null/undefined... }, will there be performance hits? It's sad that delete onEnterFrame doesn't work unless I delete the prototype enterFrame as well, which would make the clips reinitailise itself again once you declare the enterFrame prototype again (i need to do this since there's more movieclips that end up appearing on-stage, and they need to automatically initialises themselves the moment they appear).

[Code]...

View 5 Replies

ActionScript 3.0 :: Trying To Create An Unusual Clock

Jul 27, 2009

I have a clock image that has a space for the day (eg: M, Tu, etc)a space for the month (spelled out) and a space for the date. It refers to a page I'm working on in Flash CS4. I'd like it to show the correct date in a specific type style. How do I program that?

View 3 Replies

ActionScript 3.0 :: Create A Clock Background?

Jan 27, 2012

I want to create an analogical clock but i have a problem. I've created a new MovieClip that is a square. This square i want to use to represent the seconds in a minute and minutes in a hour.[code]...

View 7 Replies

ActionScript 2.0 :: Create A Digital Clock?

Mar 20, 2004

how to create a digital clock?

View 2 Replies

ActionScript 3.0 :: Create An Analog Clock That Changes Color When Its PM?

Oct 28, 2010

I'm trying to create an analog clock that changes color when its PM. The only thing is that the variable won't update. I made the code a function and put it in a code block that runs every second. To make it clear: The function DOES work, it just doesn't update the variable ampm which means when the clock passes 12, it won't change color. The function only gets the variable once from what I can tell. I traced the variable ampm when the local time was 3 PM but even if I changed the time to 3 AM, the variable didn't change. So it'll change color correctly when the flash file is first run but if the time goes from AM to PM while it's running it will not change color.

Code:
Here is my function code:

function color():void
{
/* AM PM, if hours is greater than 11, that is 12 and 12 is PM */
if (hours<12)

[code]....

View 5 Replies

Unable To Create Internal Links On Xml

Mar 24, 2010

Ive been sitting infront of this screen trying to create an internal link to my contact page from some text i have on my about us page.[url]...

View 1 Replies

ActionScript 1/2 :: Create A Clock Which Shows The Time Returned By The Server?

Jan 19, 2011

I'm trying to create a clock which shows the time returned by the server. get this code working with the server time on..(E.g.: time.php returns 1295532770)
 
server = new LoadVars();
server.onData = function (src){
clock_txt.onEnterFrame = time;[code]....

View 25 Replies

ActionScript 3.0 :: OnEnterFrame - The OnEnterFrame Is Not Triggered Automatically By Flash Player At Run Time

Feb 1, 2010

i'm very new to Flash (although have plenty of experience in Java, C++, PHP, etc). For a University assignment, I am creating a World Cup Guide and i'm creating a countdown to the tournament. I've followed a tutorial and modified it slightly but i'm receiving an error message. The error message is:

[Code]....

View 1 Replies

ActionScript 2.0 :: Create A Condition To Delete OnEnterFrame At Proper Moment?

Apr 16, 2005

[code]How can I create a condition to delete this onEnterFrame at the proper moment?

View 2 Replies

ActionScript 2.0 :: Add MovieClips From The Library At Runtime OnEnterFrame To Create A Trail Behind The MovieClip?

Mar 10, 2011

I want to add MovieClips from the library at runtime onEnterFrame to create a trail behind the movieClip that is moving on stage:
[Code]...

This just creates one instance of a movieClip "Follower". But how to make trail like effect - adding movieClips onEnter frame and positioning them according to "mcToFollow"?

View 4 Replies

ActionScript 2.0 :: Delete OnEnterFrame Start OnEnterFrame?

Sep 26, 2008

any consise methods to restart a deleted onEnterFrame that has been deleted?

View 3 Replies

ActionScript 2.0 :: Detecting Clock Wise And Anti Clock Wise Rotation

Apr 3, 2005

can you tell me if it is possible to detect if an object is rotating anti clockwise or not? at present i get x,y co-ords and use the code below to rotate it which is fine. now i could write an if statement to check if rotation is negative or positive but because rotation can be negative and positive when rotating clockwise and anti clockwise this wouldnt work.

[Code]...

View 2 Replies

ActionScript 2.0 :: Detecting Clock Wise And Anti Clock Wise Rotation?

Apr 3, 2005

at present i get x,y co-ords and use the code below to rotate it which is fine. now i could write an if statement to check if rotation is negative or positive but because rotation can be negative and positive when rotating clockwise and anti clockwise this wouldnt work.

Code:
theAngle = Math.atan2(diffy , diffx);
this._rotation = theAngle*360/(2*Math.PI);

[code].....

View 2 Replies

ActionScript 3.0 :: What Is Internal And The Use Of Internal In OOP

Jun 26, 2009

I am unknown about internal in OOP. Is there any body about internal. How we can use this in pratical world

View 1 Replies

Flex :: Timing Format "24-hour Clock" And "12-hour Clock"?

Sep 10, 2010

Timing Format in Flex "24-hour clock" and "12-hour clock"if "24-hour clock" Button is selected, the control should convert times to 24 hour clock time. For example, if 3:45 p.m. is entered, it should be converted to 15:45.if "12-hour clock" Button is selected, the control should convert times to 12 hour clock time. For example, if 15:45 p.m. is entered, it should be converted to

View 2 Replies

Can't See Alternative Content

Dec 17, 2010

[code]...

iphone safari can't see <a id="alternative" target="_blank" href="#">iphone can't see me</a>

But PC's safari,firefox can see the alternative.

View 2 Replies

ActionScript 2.0 :: If Then Else Alternative?

Nov 7, 2006

I made a script which will tile dynamic mc in a way that after a number of clips (say 5) in a row, i would like the 6th mc to position on the next row below the first row, like this:

1 2 3 4 5
6 7 8 9 10

i was able to do it thru series of if-else if statements but the thing is that i was wondering if there's a better logic in doing this, i was thinking of using switch statement but is there a way to type "i>=9 && i<=20" into a case parameter? here is the code and i have also attached the fla if anyone would like to see:

Code:
if (i>=20 && i<=25) {
item._x = item._width+275;
yVal = (i-20)*(item._height+5);[code].....

View 2 Replies

ActionScript 2.0 :: Better Alternative Than XML?

Oct 25, 2007

I have created a Flash application for a "big" client which communicates heavily with the server. Flash app is initially loaded with a big XML file, which is retrieved by an aspx file. Then every 5 seconds, it calls a different aspx file to update. There are 3 asp files, which also sends back XMLs, that it calls periodically on top of the aspx file. Buttons on the app calls 4 different asp files with data being sent via querystring, but, uses the XML.sendAndLoad commands since we want the communication being done behind the scene.

During testing on development and live sites, we noticed no problems. We had sporadic complaints about the application being slow, but, they were so rare that we let it slide.

Now, it seems more frequent. I went back to the application and tried utilizing the built-in garbage collection by deleting all temporary variables, but, that didn't seem to improve much.

Given this scenario... is there anything I could try to improve the speed of server communications?

View 1 Replies

Get Alternative Export Codecs For CS3?

Sep 5, 2009

I have an application requiring exporting of Flash animations to run on an embedded media player. This accepts a number of video formats. The most reliable I have found so far is DivX. The player supports DivX versions 3.11, 4.x & 5.x. The export codec in CS3 is DivX 6.8.5 which is not compatible with the player.The player also supports MPEG2 but the quality is not very good. Other options are Xvid Mpeg4 video (doesn't work) and MS Mpeg4 video codec V2 & V3 (also not supported in CS3).I have tried downloading a variety of alternative second source file converters but frankly tied myself in knots. Any idea how I can get around this problem and get a DivX 5.x codec to work natively within CS3?

View 2 Replies

ActionScript 1/2 :: Alternative To LocalConnection?

Sep 23, 2009

I'm having huge bug issues with LocalConnection that nobody seems to be able to find errors in my code/files. So... I'm looking for an alternative. I need a main swf file to load an external swf including the ability to have it move from one frame to another. If this isn't a possibility, I can also just have the main swf hide/reveal a div or just an image in the html.

View 9 Replies

Flex :: Alternative (free) IDE For It?

Jun 27, 2009

I am an Adobe Flex developer and I am sick of Eclipse. Is there an alternative (free) IDE for Flex? I am aware of Tofino, but I can't get that to work on my MSVS Express editions, and I don't want to buy the whole thing.

View 5 Replies

Flex :: Get Good Alternative IDE?

Mar 24, 2011

Good alternative Flex IDE? I am interested in free editions mostly but I will also take under consideration the paid ones.

View 2 Replies

Php :: Xcode As An Alternative Of Flash?

Dec 20, 2011

We have developed a magazine reader which is basically PHP application. Admin panel is built in PHP but when any user wants to read a particular magazine, it is handled by Flash i.e. we are embedding the .swf object with HTML in PHP page. But flash is not supported in iPad/iPhone. So we want to create this application in Xcode so that user can read the magazine in iPhone/iPad also. There is confusion how it can be accomplished.

View 1 Replies

ActionScript 2.0 :: If Statement Alternative?

Mar 17, 2004

I was reading through various source codes, trying to teach myself more and more AS as usual... and some things brought me to ask this question.let's say I place a movie clip on the stage, called gun. would:if (_root.gun) {} return a true statement, simply because a MC called gun exists on the stage?

View 1 Replies

ActionScript 2.0 :: Alternative To AttachMovie??

Apr 16, 2007

Is there an alternative to attachMovie that I can use to put my movieclips on to the stage. Here is my problem, I have 2 frames total in my fla file, and in each frame I have buttons that when you click on them it attaches the corresponding image from the library. Problem is when you click to go to the next frame, the attached image stays.

I basically want it to stay attached only until you hit the next frame.

View 4 Replies

ActionScript 3.0 :: Alternative To TileList?

Mar 9, 2009

I'm looking for a lightweight alternative to the TileList component. I'm currently designing and developing an MPU Ad Creative that references an XML doc and pulls in four FLVs and their appropriate meta data. These videos will then be playable in the merch window, and there will be some opt-in data capture going on as well.

I've got a prototype going at the moment that grabs the XML and populates a TileList, and then uses ListEvent Listeners to add functionality to each of the ImageCells. All working fine, except that the file size is already at 47k without any of the data capture form fields in there. This is already over the TZ polite-load limit, and I've only added maybe 60% of the functionality. When I remove the TileList class, the swf shrinks down to 3k (a much nicer size ), and even after adding the remaining 40% I can't see this going much above 15k.

So, anyone know of anything I could use to replace TileList? I thought about creating my own class that holds all the information for each Video I need, but I thought I should check first to see if there are any other alternatives.

View 1 Replies

ActionScript 1/2 :: Cannot Get The Clock Working

Jan 10, 2011

I can't get this analog clock working using time returned by the php.
 
server = new LoadVars();
server.onData = function (src){
counter.onEnterFrame = countdown;
counter._visible = true;

[code].....

View 1 Replies

ActionScript 2.0 :: Make A Sun Clock?

Feb 18, 2008

For an upcoming project the client wants an animated "Sun Clock" that shows the areas of the world map that are currently day/night. The Sun Clock changes continuously throughout the day to match the movement of the sun. I've attached an image of a Sun Clock as reference.

I'm really not sure where to start with this. I've found an example of a functional Sun Clock using Yahoo Widgets, but that's a bit different because I need to embed the Sun Clock on a web page.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved