Eric already provided you with a link to the manual page of the seek()
method that answers this question.
Your problem is you want to seek to a point in time that is not a
keyframe. You can not do this for a very good reason. A keyframe is an
uncompressed frame and all the frames in-between
for the record:
JOR Therefore, it starts with the closest keyframe and plays from there.
ARIn an FLV file seek will jump to the keyframe, which is the nearest to
the given time.
Actually, it's not the closest or nearest key frame, it's the next key
frame. (I'm not saying the above is wrong
What is the error you're getting?
Maybe add a trace statement in there to see where it's breaking. You
could be trying to set a property that exists only in obj but not in
a_sprite.
for ( var i in obj ) {
trace (i + = + obj[i]);
a_sprite[i] =
You don't need the extra private var. You can do something like this:
public class A extends MovieClip
{
//onthestage_mc is a movieclip manually put in the .fla
private var onthestage_mc:MovieClip;
public function A ():void
{
}
}
James O'Reilly — Consultant
Adobe Certified Flash
How about using the abstract factory design pattern?
public class MyFactory {
public static function createObject(objType:String):* {
switch (objType) {
case Foo:
return new Foo();
case Bar:
return new Bar();
default:
return new Foo();
}
}
var
Eka, was right about the notation being the problem but I thought I
would mention something small I noticed.
You declare delay as a private property of the class but then declare it
again as a local variable inside your doSomething() method. If you
don't need to access the value of delay
Oh cool, I never saw the VEGAS framework before. Looks interesting,
I'll check it out.
Thanks,
James
eka wrote:
Hello :)
i have the same implementation in VEGAS inspired of the
flash.util.Timeclass :
http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/util/Timer.as
You can use asfunction.
function foo (bar) {
trace (bar);
}
this.createTextField(my_txt, this.getNextHighestDepth(), 0, 0, 200, 100);
my_txt.autoSize = true;
my_txt.html = true;
my_txt.htmlText = a href=\asfunction:foo, Hello Word!\Click Me/a;
-- JOR
James O'Reilly — Consultant
Adobe
If you try my example in a previous reply you'll see it working with
passed parameters.
-- JOR
sebastian wrote:
BTW: I've noticed the second parameter doesn't pass, only the first.
I'm using flash 8, AS2.
I think this is a known issue... but I could be wrong. I'm using a split
function
Let's see some code. It sounds like you might be stuck in a loop where
you are waiting for the value of something to change before proceeding.
If it takes too long for that value to change and you continue to loop
you will timeout your script and get the alert. You might be better off
using
) and (movie_mc._height/2) parts so
you aren't constantly doing it.
-- JOR
[p e r c e p t i c o n] wrote:
good people,
how do i move a moviClip to center itself at (_xmouse, _ymouse)...i have
the
onPress part down...i just need to center it on those coordinates
thanks
sweet tip, thanks.
-- JOR
T. Michael Keesey wrote:
On 3/2/07, Karina Steffens [EMAIL PROTECTED] wrote:
If your mc's reg point is top left:
mc._x = _root.xmouse - mc._width/2
mc._y = _root.ymouse - mc._height/2
Incidentally, there's a neat trick you can do to speed up the
calculation
/archives/2006/09/resource_manage.html
http://www.gskinner.com/blog/archives/2006/09/garbage_collect.html
http://www.gskinner.com/blog/archives/2006/06/understanding_t.html
http://www.gskinner.com/blog/archives/2006/07/as3_weakly_refe.html
-- JOR
James O'Reilly — Consultant
Adobe Certified Flash
AS3 is completely different than AS2. You don't add code to the
timeline. Instead you create a document class and add code to that.
Typically, I like to use a class named Main but you can name it
something more to your liking.
Here is a very simple example of what you might be trying to do.
, John Grden [EMAIL PROTECTED] wrote:
just a clarification: You *can* add code to the timeline as with
previous
versions of flash.
On 2/18/07, JOR [EMAIL PROTECTED] wrote:
AS3 is completely different than AS2. You don't add code to the
timeline. Instead you create a document class and add
James O'Reilly — Consultant
Adobe Certified Flash Expert
http://www.jamesor.com
Design • Code • Train
JOR wrote:
If you place your contents of the movieclip so that everything is
registered with the top left corner to 0,0 of the clip the following
should work:
var maxMouseY:Number = mask
Additionally, you may opt to use else if so that the second expression
isn't evaluated if the first one evaluates true.
...
}
else if(delta0){
...
James O'Reilly — Consultant
Adobe Certified Flash Expert
http://www.jamesor.com
Design • Code • Train
Patrick Matte | BLITZ
If you place your contents of the movieclip so that everything is
registered with the top left corner to 0,0 of the clip the following
should work:
var maxMouseY:Number = mask._height;
var maxListY:Number = maxMouseY - list._height;
onEnterFrame = function ():Void {
if ((_ymouse maxMouseY)
Please post a solution if you ever figure it out. I was trying the same
thing with Radio Buttons and finally gave up after a few hours.
I did figure out that you need to reference the framework.swc and
framework_rb.swc in the build library for Flex Builder 2 to find the
classes but I'm
Below is my test class of trying to pragmatically add a set of radio
buttons to an ActionScript 3.0 project. Do you see anything I may have
done incorrectly? When I run it, I don't get any compile errors but I
also don't see any radio buttons.
-- James
package
{
import
One solution I've used in the past was to use collapse() and
cancelCollapse() methods. The parent rollover would use setInterval()
to call collapse() on a delay of a few milliseconds giving the child
onRollOver events the ability to be handled first. The child buttons
would call
If you are using a MovieClipLoader you could use the unloadClip()
method. I've used it successfully in the past though I haven't tried
every OS/browser/plugin combination to see.
Excerpt from the Flash 8 docs:
ActionScript classes MovieClipLoader loadClip
Use MovieClipLoader.unloadClip() to
Static variables are not inherited by subclasses in ECMAScript therefore
can not be referenced through derived class objects. This differs from
Java and C#.
James O'Reilly — Consultant
Adobe Certified Flash Expert
http://www.jamesor.com
Design • Code • Train
[EMAIL PROTECTED] wrote:
Hi
A decorator object composites the object it wishes to decorate and is
used in it's place. Since the decorator inherits from the the same base
class as the object it decorates they can both be used interchangeably
through polymorphism.
consider something like this:
var myBagel:Bagel = new
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of JOR
Sent: Tuesday, January 30, 2007 3:55 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Flair Pattern bad mixins good (?)
A decorator object composites the object it wishes to decorate and is
used
The Head First Design Patterns book rocks and I definitely recommend it
to anyone wanting to learn about design patterns. I actually got a kick
out of the clip art and humor but I'm kind of quirky that way I guess.
The Java examples were trivial to port to ActionScript and a good exercise.
Erik Bianchi wrote:
The theory of mixins originated from multiple inheritance programming
languages such as C++.
So for example: Say you wanted to make an object dragable, clickable and
resizable. You would then create separate classes called: Dragable,
Clickable and Resizable (common naming
var video1= nbc6;
Did you mean to type:
var video1 = nbc6;
James O'Reilly — Consultant
Adobe Certified Flash Expert
http://www.jamesor.com
Design • Code • Train
Gustavo Duenas wrote:
look guys thanks but it seems not to work , the problem is when it
loads the movie launch the movie
Try using setInterval to delay the setSelection() call by a millisecond
to perform the carat positioning after flash automatically selects the
complete text when you press the tab key.
The following code positions the cursor at the end of the text string
when you tab to a textfield.
//
Take a look at the MovieClipLoader class in the help docs.
James O'Reilly — Consultant
Adobe Certified Flash Expert
http://www.jamesor.com
Design • Code • Train
Mike Dunlop wrote:
Hi everyone,
I have a question that is probably easy for you guys. How can i get a
preloader into the
I need to add JAWS support to a current application. Are there any
developers out there already familiar with integration?
I'm having a problem with JAWS trapping key events so event handlers in
my app like click any key to continue aren't being called.
I'm also trying to figure out how to
JAWS 8 and Flash 7.
James
Michael Stuhr wrote:
JOR schrieb:
I need to add JAWS support to a current application. Are there any
developers out there already familiar with integration?
I'm having a problem with JAWS trapping key events so event handlers
in my app like click any key
If I understood your question correctly, it sounds like you've attached
a sound to a keyframe. The sound plays and when it reaches a certain
frame you're expecting the sound to have finished because (12fps * sound
length) is your expected ending frame.
If you are using a Sync method of
Coning
Sent: Wednesday, December 20, 2006 10:05 AM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Flash 8 Certification Study Tips?
Excellent! Thank you for the link.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of JOR
Sent: Wednesday
Referrer's can be faked.
James
Mick G wrote:
You can also try checking the HTTP referrer in PHP to make sure people
can only post data to your PHP script from your page on your site.
___
Flashcoders@chattyfig.figleaf.com
To change your
Hey Olli,
One way to do it without using movieclips is to create an off screen
buffer image the size of the stage and draw your rectangle to it at the
proper location.
If you clear the buffer black and draw a white rectangle to it, you can
then test the coord to see if it's not black.
Hey Doug,
I wrote a little about my experience with the exam on my blog.
http://www.jamesor.com/2006/10/04/aryadobecertifiedexpertspushme/
Good luck with your test!
James
James O'Reilly — Consultant
Adobe Certified Flash Expert
http://www.jamesor.com
Design • Code • Train
Doug Coning
Claus Wahlers wrote:
Never trust statistics that you didn't fake yourself. ;)
Cheers,
Claus.
Kind of like the saying...
It's not the figures that lie, it's the liars that figure.
or my favourite...
87.93% of all statistics are made up on the spot. ;)
heh heh,
James
James O'Reilly —
LOL, for a second there I thought I was looking at a J2ME java class.
Are you trying to port a J2ME game? I was thinking about porting a game
I wrote and it started out looking a lot like this. Then I got busy and
forgot about it. You've inspired me to pick it up again. :)
BTW, looks
William Sanders has a nice tutorial up on Adobe's Dev Center about
creating a video player using OOP and the State Pattern.
http://www.adobe.com/devnet/flashmediaserver/articles/video_state_machine_as3.html
Also, a great book to pick up if you want to start learning OOP is Head
First Design
I wrote an AS2 Timer class that mimics the AS3 timer class:
http://www.jamesor.com/2006/10/18/as2-timer-class/
You can also use it as a starting point and tweak it for you needs.
James
James O'Reilly — Consultant
Adobe Certified Flash Expert
http://www.jamesor.com
Design • Code • Train
Grimm posted a link to Google's SketchUp yesterday and I checked that
out. It's pretty sweet. I normally do all my stuff in 3D Studio but I
might use this for some rapid model building to import into Max for
rendering.
http://sketchup.google.com/download.html
The tutorials are worth the
will suffice
just fine?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of JOR
Sent: Tuesday, October 10, 2006 5:52 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Moving to AS2, array always undefined
A bad practice most likely, but not technically wrong. I
In AS2 typecasting helps uncover bugs at compile time, so its a good
idea to use them. Typecasting also enables class insight through popup
menus when you type a period after your variable name.
In AS3 typecasting is a much cooler as it directly affects the amount of
memory allocated for the
Actually, the need is dependent on the implementation.
It was my understanding that AS first looks to the local scope for the
existence of a variable then works up to find it. By using this you
were explicitly telling flash that the var isn't local to the function
but rather belongs to the
] On Behalf Of JOR
Sent: Tuesday, October 10, 2006 1:19 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Moving to AS2, array always undefined
Actually, the need is dependent on the implementation.
It was my understanding that AS first looks to the local scope for the
existence of a variable
Muzak wrote:
http://www.adobe.com/devnet/flash/articles/as_bestpractices.html
Cool find. Thanks for the link
James
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
Not to say I don't do the same thing on occasion but this might fall
under the Copy-and-Paste Programming antipattern.
http://en.wikipedia.org/wiki/Copy_and_paste_programming
http://c2.com/cgi/wiki?CopyAndPasteProgramming
Copy-and-Paste Programming isn't necessarily wrong when used in the
If your getScale function is called many times a second you should keep
it the way it is. The way you currently have it is the most efficient
way of doing it and will yield higher FPS.
However, if speed isn't and issue and you are not calling this function
very often and want to simplify it
I'm using FireFox 1.5.0.7 and get the context menu on my site which uses
wmode=transparent.
James O'Reilly
http://www.jamesor.com
Dimitrios Bendilas wrote:
Ok sorry, that's what happens on FireFox, at least the ver. 1.5.0.7
that I'm running here.
So I guess it is a bug indeed.
It's not
My original question to Jason was clarification on *why* (--i -(-1))
would run faster than (i--) as it seemed to me that two calculations per
loop would run slower than 1. Since he used an expression I've never
seen before I figured he might might know the reasoning behind the
optimization.
Mike, that sounds very reasonable to me.
What I've been able to ascertain is reading and writing to the register
(in the case of (--i -(-1)) is significantly faster than reading and
writing to a variable (in the case of (i--)) that the first case's
additional instruction to subtract doesn't
Actually, Tyler's tests proved that var a in is faster with today's
player. I tried his test out myself and my results were even wider than
his. I published for AS2 and ran in Flash Player 9. I was averaging
roughly 265ms for var a in and 275ms for (--a -(-1)).
Then I compiled for AS3 and
I think Laurent was trying to cast the value of a variable with a
dynamic name to a number and not the dynamic name s+i to a number
which can be done like this:
// assuming flashSQL.MoveNext[var8+i] can be cast to a number
// you can do it like this
this[s+i] = Number(
Merrill, Jason wrote:
while (--i -(-1)) {
Jason, very interesting way of counting through the array. I haven't
see this approach before. Are there any benefits to using (--i -(-i))
in the expression over something like the following?:
while (i--) {
It seems like your loop would need
Steven Sacks | BLITZ wrote:
It's the fastest because:
Pre-decrementation (--i) is faster than post-decrementation (i--)
I don't see why that would be. Both var i=1;i--; and var i=1;--i;
compile down to the exact same 8 lines of p-code:
_constantPool i
_push i 1
_var
_push i i
// taking into account false evaluation of the expression
offTopic = (!codeRelatedPost);
LOL, just trying to figure out a way (albeit a stretch) to get this
thread on-topic. ;)
James O'Reilly
www.jamesor.com
Mike Britton wrote:
I'm surprised people are ok w/ job posts here.
if
() but perform type-specific behaviour
trace( objs[0].toString() );
trace( objs[1].toString() );
trace( objs[2].toString() );
James O'Reilly - JOR
www.jamesor.com
Jeroen Beckers wrote:
You can't 'choose' the definition of polymorphism :p.
In simple terms, *polymorphism* lets you treat derived
Let's see a code sample of what you are doing with loops to better
understand your question.
James O'Reilly - JOR
www.jamesor.com
Rutul Patel wrote:
hi guys,
I am using Array to store value and its drive me crazy to get back all that
value,
because i have like 10-15 array to store
of push both inside the switch and again after it. I'd probably
also move the quotes assignment to the constructor so it isn't
reassigned with every reciteCheesyLine() call.
Either way, compile or no compile, it was very funny. Thanks for the
laugh dopelogik!
JOR
www.jamesor.com
I had a situation were my hourly rate was roughly three times the hourly
rate a particular company was use to paying for Flash work. They wanted
me to come down in price and by a lot whereas I felt I was already a
bargain.
It was a short four week project and feeling confident in my
I've been using AS2DOC which works pretty well so far. It creates both
traditional HTML/DOC files as well as Flash Help files as MXP extensions
you can install into Flash.
Someone on the list mentioned development on it has stopped a while back
tho.
JOR
You want to use .nodeValue when accessing CDATA or the data will be escaped.
JOR
___
=== James O'Reilly
===
=== SynergyMedia, Inc.
=== www.synergymedia.net
Mike Boutin wrote:
I am bring in some html text to show in flash in an xml file like
stop the event from bubbling out to the browser.
JOR
___
=== James O'Reilly
===
=== SynergyMedia, Inc.
=== www.synergymedia.net
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http
If you didn't want to hard code the paths you could do this:
public function handlePressedUP(){
theBall.onEnterFrame = function () {
_y -= 5; // Move ball by 5 px.
}
}
JOR
___
=== James O'Reilly
===
=== SynergyMedia, Inc
8 and the
Flash 8 plugin, MX 2004 began publishing stable swfs again. Sucks
because I'm afraid to install Flash 8 until my project is over.
JOR
___
=== James O'Reilly
===
=== SynergyMedia, Inc.
=== www.synergymedia.net
for swfs running in the F7 plugin.
JOR
John Mark Hawley wrote:
I wish my problem was as simple to fix -- this is happening on machines that
know nothing of Flash 8, and it has already tied up our team for a day trying
to fix it to no avail.
The problem keeps jumping around, and some of us think
/equivalency/
http://www.atlassolutions.com/enterprise/richmedia/flashmtk/
JOR
___
=== James O'Reilly
===
=== SynergyMedia, Inc.
=== www.synergymedia.net
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http
$$$ on
bandwidth costs.
Pete
That sounds sweet then. Thanks for the run-through.
JOR
___
=== James O'Reilly
===
=== SynergyMedia, Inc.
=== www.synergymedia.net
___
Flashcoders mailing list
Flashcoders
Let the MC hold the state of the money and the dynamic text field
reference it when needed since it doesn't persist.
In the MC declare the var:
var money:String;
Then set the dynamic text field's var to money
To make the change:
MC.money = $100;
MC.gotoAndStop(remote);
JOR
[EMAIL
or Flex.
JOR
___
=== James O'Reilly
===
=== SynergyMedia, Inc.
=== www.synergymedia.net
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
that
composites the image and puts it into a folder for flash to import and
returns to Flash the composited png's url.
JOR
___
=== James O'Reilly
===
=== SynergyMedia, Inc.
=== www.synergymedia.net
it as a reference to
where to go back to my classes and add more information to fill out the
pages more.
Pricey but great product. Highly recommended. Unfortunatley their free
trial version does not do Flash help files.
JOR
___
=== James O'Reilly
who have JavaScript disabled. Something
like noscriptThis form requires the use of JavaScript. Please make
sure you are using a browser that supports JavaScript and has it turned
on./noscript
JOR
___
=== James O'Reilly
===
=== SynergyMedia, Inc
documentation but haven't tried JavaDoc yet.
I didn't think it would read AS packages.
JOR
___
=== James O'Reilly
===
=== SynergyMedia, Inc.
=== www.synergymedia.net
___
Flashcoders mailing list
Flashcoders
the session vars.
JOR
___
=== James O'Reilly
===
=== SynergyMedia, Inc.
=== www.synergymedia.net
Amanda Kuek wrote:
Hello everyone,
This is a question about Flash in an ASP form which communicates with an
MSSQL db. I'm not really sure how to phrase
this in banner ads where the number of buttons the movie
contains are minimal so this solution was pretty manageable.
I'd be interestedin knowing if anyone came up with any other solutions
to this.
JOR
___
=== James O'Reilly
===
=== SynergyMedia, Inc
= questions.length )
JOR
___
=== James O'Reilly
===
=== SynergyMedia, Inc.
=== www.synergymedia.net
Weyert de Boer wrote:
Hi Liam,
First of all I always have had trouble with those methods, never got it
right. Always failed, I don't they dont like
if they
don't figure out right away that the function is never called.
Any thoughts?
JOR
___
=== James O'Reilly
===
=== SynergyMedia, Inc.
=== www.synergymedia.net
Mike Duguid wrote:
yep still works
On 10/28/05, Gregory [EMAIL PROTECTED] wrote:
Question
= evalAppendedPath( my_mc, some.nested.clip );
trace( result ); // _level0.my_mc.some.nested.clip
trace( typeof( result )); // movieclip
var mc:MovieClip = MovieClip( result );
trace( mc ); // _level0.my_mc.some.nested.clip
Let me know if you find your problem,
JOR
was thinking about writing a JSFL
command to delete those aso files but this saves me the trouble. Boy is
it a pain to keep that folder open and delete the files manually before
each publish. Can't believe Macromedia hadn't thought of this??
JOR
___
=== James
81 matches
Mail list logo