It doesn't trace plus 10 because you're calling it when you declare
all your variables, rather than 10 seconds later when seconds ==
newSeconds. You'll need an onEnterFrame or other loop running to
check, and one of the checks will have to be invoked during the
single second when it's 10
Hi,
your example is:
seconds = a;
newSeconds = a+10;
if (seconds == newSeconds)
in other words
if (seconds = seconds+10)
that will never work.
Look into setInterval and there is a undocumented setTimeout function
somewhere I think.
Better yet write your own Timer and TimerEvent class to wrap
hi,
i think this might help with the flash timer
stop();
pausedAt = getTimer();
this.createEmptyMovieClip(frameLoop, 1);
frameLoop.onEnterFrame = function() {
if ((getTimer()-pausedAt)/500=6) {
play();
this.removeMovieClip();
}
// end if
};
I have used this many
Google:
http://www.google.com/search?q=zinc+write+files+to+hard+drive
2nd item down on the results page:
The Local File System and Flash
http://www.communitymx.com/content/article.cfm?cid=107B6
--Carl
On 3/23/07, Ned Perry [EMAIL PROTECTED] wrote:
Hi
I need to make a Projector that writes
Hello :)
do you use the setInterval method ?
var cpt:Number = 0 ;
var action:Function = function ( msg )
{
trace( msg ) ;
if ( cpt ++ == 20 )
{
clearInterval(id) ;
trace(stop the timer) ;
}
}
var id = setInterval( action, 1, plus 10
Something to try
change
import MyPackage.*;
to
import myPackage.HelloWorld
import myPackage.MyClass
See if the errors change.
Ron
Merrill, Jason wrote:
I dunno, that's how I have it set up and it works fine for me - Perhaps
your Flash 9 Preview Alpha is messed up. I assume your publish
var intervalID:Number = setInterval(timer, 1000, this);
var timeLimit:Number = 20;
var timeCounter:number = 0;
function timer( mc:MovieClip )
{
if( mc.timeCounter == mc.timeLimit )
{
mc.timeLimit = 0;
clearInterval(mc.IntervalID);
trace(time LIMIT);
}
else
{
Hi,
you asked this question before, and I replied to it, why not continue that
thread instead of reposting it?
You are on the right track though, there are different approaches:
1. waiting a number of frames:
var curFrame:Number = 0;
var frameRate:Number = 12;
var waitFrames:Number =
I made a Timer class that I use for another set of Classes I wrote. Here
is the class itself, it's pretty precise and reliable so far. Hope it
Helps !
usage :
import ca.daroost.utils.Timer;
soundTimer = new Timer();
soundTimer.addEventListener(onTimerDone, this);
try using undocumented setTimeOut or setInterval instead
say you have a function foo
with setInterval:
var secondsToWait:Number= 20*1000 //20 seconds
var interval_ID:Number=setInterval(this,foo,2)
function foo()
{
clearInterval(interval_ID);
trace(llegamos con setInterval);
}
with
use flashVars to pass the path of the skin to the flash object and load it
inside the swf dynamically by using .skin property if it was flvplayback
component.
object src .
param name=flashVars value=pathToSkin=../../whereTheSkinIs/myskin.swf
and in another HTML maybe
object src .
param
well i posted this 4 days ago
On 3/23/07, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote:
Hello.
Flashcoders has been really laggy the past few days. It usually takes
an hour or two before I see my posts.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
You can talk to me. I've got a multiplayer Flash program running at
http://www.biality.com/tubes/tubes.swf
It's a work in progress. There's more info about how to write programs
for it it here:
http://www.newgrounds.com/bbs/topic.php?id=652309
- Kipp
-Original Message-
From: [EMAIL
hi gustavo,
your first problem is that you have a gotoAndPlay loop. that means that
every time you go back to frame 1 you are re-creating your now variable, so
it is never going to have a chance to get bigger. secondly, the timer does
need to be updated checked inside your onEnterFrame (i used a
Hi List, I just wanted to ask about the best AS3 Book to begin my path to
AS3I allready code in As2 but know nothing about AS3 yet... What would
recommend???
--
Omar Fouad - Digital Emotions...
Love is always patient and kind. It is never jealous. Love is never boastful
nor conceited It is
Time is never exact because frame rate is independent from time. Just check
if it's greater or equal to the time you desired.
var now = getTimer();
var waitSeconds = 3;
var later:Number = now + ( waitSeconds * 1000 );
this.onEnterFrame= function ()
{
var now = getTimer();
if(
Gustavo,
stop();
var later:Number = (getTimer()/1000) + 20;
this.onEnterFrame = function (){
var now:Number = getTimer()/1000;
if(now = later){
trace(llegamos);
delete this.onEnterFrame;
}
}
trace(later);
HTH
-Keith
in mxml:
...
lcModel = new DirectoryBrowser(this)
...
in class:
...
public class DirectoryBrowser{
private var btn:Button;
private var txt:Text;
public function DirectoryBrowser(owner):void{
btn = owner.btn;
txt = owner.txt;
setStuff()
Alert.show(class loaded,class debug)
}
...
that said, ugly
How hard / not-hard is it to install PHP and MySQL on a remote server?
Anything to be weary of? Is it something I should just skip attempting and
hire an IT guy to do it?
Security shouldn't be taking lightly, if you leave something open where your
client's machine vulnerable and in fact gets
Gustavo,
Duenas noches :)
Search for setInterval in the help manual ;).
...helmut
On 3/23/07, Gustavo Duenas [EMAIL PROTECTED] wrote:
Hi, I'm trying to set a timer to trigger a event after 20 seconds or
less, but so far i have this code, but with no results
someone help me? .
I don't know
Hi,
Does somebody know why LocalConnection.connect() throws an error 'One of the
parameters is invalid' when using a static variable for the connection name?
static var lcName:String = _myConnection;
.
lc.connect(lcName);
A bug or even a security restriction??
--
Hi friends,
I have the following strange problem:
I have a index.fla and a Application.as. the index.fla contains a movieclip
exported for actionscript name test. it contains a VideoObject with
instance name testVideo
In the external Application class I attach the movieClip to the stage. I can
The Sydney Flash Platform Developers Group www.flashdev.org.au is
holding a special meeting for the launch of Adobe Creative Suite 3 and
a chance to win one of the first copies of the new CS3 suite when it
starts shipping!
When: Wed 28th March at 5:30pm for 6pm start.
Where: Adobe's offices, 67
Hey all,
I've got a Flash file that wants to read a local XML file (from the
same directory), in a browser.
I've set the file to be trusted, and it works fine with the SWF object.
But, this file has to be embedded in a Director file for some other
functionality, and from the DCR, I can't
Hi,
In Zinc you can use any of the following:
FileSystem.saveFile() - Saves text data to the file specified.
FileSystem.saveFileHEX() - Saves HEX data to the file specified.
FileSystem.saveFileUnicode() - Saves text data to the file specified.
Look at the examples on the Exchange -
Hello,
I'am actionscript programmer and also a studiant an i'would like to know how
to code a system to resize each corner of a movie clip or of an image (like
the white arrow in illustrator or photoshop).
Maybe a AS3 classe exist ?
A really dont know but i'am very interested by it.
Thanks and
In your example, seconds doesn't really mean anything. 60 seconds plus 10
seconds should never equal 70 seconds - you want it to equal 10 seconds.
Maybe try...
var seconds = 10;
var now = new Date();
var future = new Date();
future.setSeconds ( now.getSeconds() + seconds ); // will auto adjust
You can only create text based files (.txt, .xml, etc..).
mdm.FileSystem.saveFile(myText.txt, some text to put in file);
If you want to create a specific file type (e.g. fla) you could include an
empty fla with the project and make a copy of it when
needed ;-)
regards,
Muzak
- Original
you should use setInterval, see it in documentation
--Pedro Taranto
Gustavo Duenas escreveu:
Hi, I'm trying to launch an event using a timer so far the code for
trace something is this:
var now = new Date();
var seconds:Number = now.getSeconds();
trace(seconds);
var newSeconds: Number =
createClassObject is defined in UIObject core object. I don't think it can
be called as a method of any movieclip. It also requires that you define
static var symbolName : String = linkageID;
static var symbolOwner : Object = com.myclass;
and at the end of the day It calls createObject
Hi there,
Somebody told me the other day there are tools that can convert the most
common video formats to flvs. Unfortunately I can't remeber the names of
these products.
My company wants to create a youTube like web application where the user
can upload a video which then gets converted to an
servers, firewall, domain, dns,...
Don't burn your hands if it is all new to you.
Just let the IT guy do it (you can even make profit on that) , or try it
first at home.
But I don't really know your client an budget
Seth Caldwell wrote:
Its easy enough - is it Apache or IIS?
Installation
You could consider wrapping it into a Apollo projector :)
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Btw when setting a start time other than 0 to the timer, it's the
difference between both that will be calculated.
Example :
you app starts at 0ms, but for some reason you need some data loaded
that your timer needs before it starts. You need to take into account
the time elapsed.
var
You mean like a Free Distort tool ? I've seen some tests done with,
can't remember the link ... might be a 3D experiment of some sort. I'll
try to see if I bookmarked it.
Cédric PASCAL wrote:
Hello,
I'am actionscript programmer and also a studiant an i'would like to
know how
to code a
Hi,
By default cache I think you refer to the local storage setting in
the Flash Player configuration... AFAIK, that's the amount of info you
can store with SharedObjects, and has nothing to do with the cache used
for storing loaded assets... the later depends exclusively on the
browser's
Hi Daniel! Thanks for the quick response, I really appreciate your help.
Holth, Daniel C. wrote:
Hope that helps!
Oh! That solution is much more elegant than the one I came up with!
Thanks Daniel! I really appreciate it. :)
Have a great day/night! Many thanks for the code sample, I owe
Hello,
Micky Hulse wrote:
The fill seems to use the stage as top/left as the starting registration
point for my fill... I would like to have the fill start via the
top/left corner of my lines above (0, 239).
I ended up using a parent movie clip to do this... problem solved! :D
Lol, such an
var nInt:Number = setInterval(this, myFunction, 2);
function myFunction():Void
{
clearInterval(nInt);
etc .
etc .
}___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
39 matches
Mail list logo