My cell renderer (combo box in an editable grid) works ok (tabbing etc)
...but it takes a long time to load.. i'm new to Flash.. and would appreciate
any suggestions on how to speed up load times..The visible gride displays 5
X 5...the mc takes about 3 seconds to appear.. ???
thanks,
you could take that a bit further :
(foo) ? foo() : (bar) ? bar() : (foobar) ? foobar() : trace("sorry! no
soup for you!");
Steven Sacks | BLITZ wrote:
function foo() {
trace("foo");
}
function bar() {
trace("bar");
}
(true) ? foo() : bar();
-- "foo"
(false) ? foo() : bar();
-
> ( condition ) && ( code );
Hot! I wonder how many of these shortcuts we can come up with that
nobody would use unless they were trying to show off to other
codemonkeys. :)
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or s
You can try:
( condition ) && ( code );
code only executes if condition is true
bui I recommend against it, can be confusing sometimes...
On 1/26/07, Helmut Granda <[EMAIL PROTECTED]> wrote:
does anybody knows if there is any short hand for if statement without the
else statement?
at the mo
Law of Sines will solve your problem.
http://en.wikipedia.org/wiki/Law_of_sines
Jason Rayles <[EMAIL PROTECTED]> wrote: Given the interior angles and the
length of one side (not the hypoteneuse)
of a right triangle, how do I calculate (in Flash) the length of the other 2
sides?
Thanks,
Jason
You can also check this post :
http://chattyfig.figleaf.com/pipermail/flashcoders/2006-December/177264.html
where i share a class of mine called TriangleSolver ...
in your case, you can use the sine rule method
Sine Rule : side1/angle1 = side2/angle2 = side3/angle3
or hypotheneuse/90 = side2/a
h - hypoteneuse
l1,l2 - the other sides
a1 - angle next to l2
sin(a1) = l1/h
cos(a1) = l2/h
assuming you know l1, then h=l1/sin(a1)
and then l2 = h* cos(a1)
- Original Message
From: Jason Rayles <[EMAIL PROTECTED]>
To: flashcoders@chattyfig.figleaf.com
Sent: Saturday, January 27, 20
Given the interior angles and the length of one side (not the hypoteneuse)
of a right triangle, how do I calculate (in Flash) the length of the other 2
sides?
Thanks,
Jason
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options o
[EMAIL PROTECTED] wrote:
When I have the Flash Player 9 plugin, NetStream stops working, videos don't
play. It doesn't play even when I test movies within Flash. I've seen a few
other people with the same problem. Am I doing something wrong or does FP9 not
support NetStream?
When I do a Google
function foo() {
trace("foo");
}
function bar() {
trace("bar");
}
(true) ? foo() : bar();
-- "foo"
(false) ? foo() : bar();
-- "bar"
Works fine for me. Not the best practice (I would never use it), but
just showing what's possible with inline conditionals.
> -Original Messa
On 1/26/07, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote:
> does anybody knows if there is any short hand for if
> statement without the else statement?
1. You can remove the braces.
I always use:
if (true) something();
I like it...
___
Flashco
Hello :)
In FDT for example : cond ? methodA() : methodB() failed :)
The operator cond ? true : false is used to return a value but isn't really
the good solution to launch method i think :)
EKA+ :)
2007/1/26, Steven Sacks | BLITZ <[EMAIL PROTECTED]>:
> does anybody knows if there is any sh
> does anybody knows if there is any short hand for if
> statement without the else statement?
1. You can remove the braces.
I always use:
if (true) something();
But rarely use:
if (true) something();
else somethingElse();
because it can get lost visually in code.
2. Inline conditional
I
Hello :)
With VEGAS my openSource framework you can use my vegas.logging package :
Page project : http://vegas.riaforge.org/
Example : in the souces in the AS2/trunk/bin/test/vegas/logging package
1 - use a log library to create channels to debug you application with muli
external targets (trac
You can also set up your code along these lines:
var inTestMovie:Boolean = false;
trace( inTestMovie = true );
if (inTestMovie)
{
// do wacky test movie stuff
}
else
{
// do normal stuff
}
Then you can just turn off trace statements when you want to see the 'normal'
behavior, and leave
Hello :)
warning with the Boolean( o ) if your object is a number... the Boolean(0)
is false but :
var n = 0 ;
trace(Boolean(n)) ; // false
When you test a number the isNaN(n) is better i think :)
EKA+ :)
2007/1/26, Helmut Granda <[EMAIL PROTECTED]>:
thanks everyone for your comments, yes
thanks everyone for your comments, yes in reallity I use the regular if
{}else{} statement, but I was wondering if there was something similar to
when you dont need the else statement, sort of testing on the fly
but i think Mark made a good comment on use a return Boolean ( object );
I dont
For that specific example, you can usually turn lines like
return object ? true : null;
into
return Boolean( object );
as long as object != 0 and your code doesn't mind getting a false instead of a
null. Most objects, as long as they exist, evaluate to Boolean true.
Really, though, the ternar
hello :)
I don't understand you question ? why you don't use the if keyword ?
if ( isNaN(x) ) x = 0 ;
you can use the || operator too
function write ( txt )
{
var message = txt || "empty message" ;
trace(message) ;
}
write("hello") ; // output : hello
write() ; // output : empty message
if ( condition){
}
?
- Original Message -
From: "Helmut Granda" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list"
Sent: Friday, January 26, 2007 9:01 PM
Subject: [Flashcoders] Shorhand for if statement without else statement
does anybody knows if there is any short hand for if stat
Usually ?: notation is used specifically for quickly choosing between
2 values (picking between 2 things inline). That's a case where you
really have to have an else, otherwise you wouldn't have a value to
represent the failure case of the IF part.
If you're doing logic that isn't inline in a st
does anybody knows if there is any short hand for if statement without the
else statement?
at the moment I am using
object ? true : null;
thanks...
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http:/
Thanks for your help guys, It worksregards
Gustavo
___
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
Prem
Hi all, many many thanks for your responses, I really appreciate the
help and input. :)
eric dolecki wrote:
The player draws constantly what is on stage. Vector takes more horses than
bitmap (in fact unless a bitmap moves or changes, its static (won't be
redrawn - hence the cacheAsBitmap option
[EMAIL PROTECTED] wrote:
Hi I'm very much interested in exploring several popular flash frameworks,
especially PixLib, but am wondering if there is a way to adopt and integrate
legacy class code with these new frameworks.
absolutely.
i've been doing exactly that with pixlib and documenting m
It probably depends on how complicated the thing you're replacing is.
I'm doing something similar with the VEGAS library. I have a simple
logging class that I wrote as a central place to do logs, but needed
to extend it a lot. The logging framework in VEGAS is just about
exactly what I needed,
I'm pretty sure this line:
if (this.myLoader._x eq this.myLoader._x-1){
will never resolve to true, given that no number is equal to the same
number minus one. Thus, the code in that if statement will never
trigger.
Should one of those this.myLoader values be a different variable?
-Andy
On
Hello :)
1 - eq keyword is depreciated !! don't use "eq" but the == operator :)
if ( x == 2)
{
// do it
}
2 - to move a movieclip, a simple example :
// the speed of the move
var speed = 10 ;
// the max x position
var xMax = 500 ;
mc.onEnterFrame = function()
{
this._x += speed ;
hi, this is code:
this.onEnterFrame = function(){
if (this.myLoader._x eq this.myLoader._x-1){
delete onEnterFrame;
}
else{ this.myLoader._x-=2;
}
}
I'm trying to move this loader created by code and it looks ok, it
moves, but
Hi
I'm very much interested in exploring several popular flash frameworks,
especially PixLib, but am wondering if there is a way to adopt and integrate
legacy class code with these new frameworks.
In adopting a new flash framework, does it necessarilly mean starting 'from
scratch' in developing
I have a very strange error occurring when attempting to compile an FLA that
utilizes the Transitions class (Transitions.as).
I receive an error that states:
'**Error** C:\Documents and Settings\DefaultUser\Local Settings\Application
Data\Macromedia\Flash 8\en\Configuration\
Classes\mx\transiti
Hi,
When I have the Flash Player 9 plugin, NetStream stops working, videos don't
play. It doesn't play even when I test movies within Flash. I've seen a few
other people with the same problem. Am I doing something wrong or does FP9 not
support NetStream?
Hi,
we use a ButtonTooltipWrapper thingy.
Basicly you do:
new Tooltip (myButton, "myTooltip", [hitArea])
it creates an empty movieclip, with the button as hitArea. All events that
are not triggered on this clip are used to show/hide tooltip and then
dispatched to lower lying button. Still tweakin
I've occasionally used the trick of checking whether this._url begins
with "file:" Doesn't exactly tell you if you're running in the IDE, but
does tell you whether it's running locally on your machine or in a
browser, from a web server.
CHUCK HOFFMAN
PROGRAMMER
T8DESIGN.COM | P 31
eric dolecki wrote:
The player draws constantly what is on stage. Vector takes more horses than
bitmap (in fact unless a bitmap moves or changes, its static (won't be
redrawn - hence the cacheAsBitmap option).
I would have thought the rasterizer has at least some kind of dirty rectangle
setu
The player draws constantly what is on stage. Vector takes more horses than
bitmap (in fact unless a bitmap moves or changes, its static (won't be
redrawn - hence the cacheAsBitmap option).
- ericd.
On 1/26/07, Shang <[EMAIL PROTECTED]> wrote:
lol, I'm not sure either. Wish someone really kno
lol, I'm not sure either. Wish someone really knows what's going on
there come and enlighten us.
On 1/26/07, Henry Cooke <[EMAIL PROTECTED]> wrote:
Er, I'm pretty sure it won't redraw if nothing changes... I could be wrong
though.
Doesn't the debug version of the Flash Player plugin have an opt
For the disabled state for our buttons we actually use a different movie clip.
Basically, each button consists of a Button object and a Movie Clip
with the image used for the disabled state. When the button is
disabled we hide the Button and show the MC, and when it's enabled we
do the opposite.
I'm sorry, but when I typing the code I forget this "2".
The code is the same, and the listener is working, but I can't print the the
_x _y:
var listenerObject:Object = new Object();
listenerObject.itemRollOver = function(eventObject:Object) {
trace(menuTree2.selectedNode._y);
};
menuTree2.add
Well, i donĀ“t know for sure, but i never, ever use window[element] to
access an element object. I always use document.getElementById and had no
problems neither in explorer nor in firefox/opera/safari.
Also, you should better not use document.write to write content on a page.
document.write
Er, I'm pretty sure it won't redraw if nothing changes... I could be wrong
though.
Doesn't the debug version of the Flash Player plugin have an option to
outline the stuff it's redrawing in red?
h.
On 26/01/07, Micky Hulse <[EMAIL PROTECTED]> wrote:
Shang wrote:
> But I feel the Flash redraw
Hi,
i see menuTree*2*.selectedNode and menuTree.addEventListener?
Beside that, might be a scoping/reference issue, your listener doesnt have a
reference to the menuTree.
greetz
JC
On 1/26/07, Lois IN <[EMAIL PROTECTED]> wrote:
Hello,
(first of all, sorry for my english)
I have the Tree compo
Thanks Steven
In AS3 you can actually put code before a super() as you can in other
methods in AS2.
as i admitted, clearly need a some refactoringright now its just a
prototype so i'm not too concerned
On 1/24/07, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote:
I don't know about AS3
Hello,
(first of all, sorry for my english)
I have the Tree component in my scene and this is generated by a xml. It's
working fine.
But I want to know the _x and the _y of any tree node or folder, by passing
mouse over them, with the function itemRollOver.
For example, the Tree shows that:
FO
Hello flashcoders,
How did/would you implement showing a tooltip over a disabled button?
The onRollOver/onRollOut events seem not to fire when a button is
disabled. I see two solutions right now:
1. Add an onMouseMove listener (within MyButton extends Button) and
check whether _xmouse/_ymouse co
just for fun some of the fonts get named differently when in the
dropdown where for instance a bold version of a font would be named
'B Fontname' this happens to about 10% of my fonts, good thing is
that they always are named that way so it isn't random. Flash is
probably picking up on the
I'm using CustomActions, i.e. :
if ( CustomActions ){
// we're in the Flash IDE
} else {
// we're either in a browser or in the standalone player
}
HTH,
stefan.
On 1/26/07, Josh Santangelo <[EMAIL PROTECTED]> wrote:
Is there a way for a SWF to know if it's running in the "test movie"
environ
So i got EI working with swfobject just fine; turns out i had omitted
addParam("allowScriptAccess", "always");
SWF-to-container calls now work wonderfully as such:
ExternalInterface.call("methodName");
However, i'm having a hell of a party getting container-to-swf calls up
and running; i keep
48 matches
Mail list logo