[Flashcoders] DataGrid: Expanding vertical Thumb width (Glen Pike)

2011-09-06 Thread lists-09

Glen:

thank you!

That works perfectly.

~Bill

--

Message: 1
Date: Mon, 05 Sep 2011 17:18:34 +0100
From: Glen Pike g...@engineeredarts.co.uk

Hi,

I remember having to hack this in Flash for a list component, you 
should be able to set the style, but you need to use GrantSkinners 
workaround http://gskinner.com/blog/archives/2007/05/variable_scroll.html


Edit your skin, then include Grant's fl.controls.List or whatever - 
that includes Scrollbar code.


Set your width using the setStyle props.

_list.setStyle(scrollBarWidth,40);
_list.setStyle(scrollArrowHeight, 40);

HTH


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] DataGrid: Expanding vertical Thumb width

2011-09-04 Thread lists-09

What is the approach to expand a DataGrid vertical scrollbar's
width (from the standard 15 pixels, to 44 or so, for touchscreens)
in pure AS3 / Flash CS 5?

It looks easy in Flex now
http://www.switchonthecode.com/tutorials/flex-fun-advanced-datagrid-topics


But in Flash/AS3, 
directly editing 
library  Component Assets  ScrollBarSkins  Scrolltrack_skin
as recommended at 
http://help.adobe.com/en_US/ActionScript/3.0_UsingComponentsAS3/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7f4a.html
 
to change its color and width
does change the color and the width in the library, 
but only the color -- not the width at runtime.


Widening scrollThumb_upSkin, et al in the library does show them altered when 
run, 
but cut off at the stock 16 pixel width of DataGrid scrolltrack.

Any thoughts?

thanks


// basically straight from livedocs...

import fl.controls.DataGrid;
import fl.controls.dataGridClasses.DataGridColumn;
import fl.data.DataProvider;
import fl.events.DataGridEvent;

function setup ():void
{
var aDg:DataGrid = new DataGrid();
addChild(aDg);
aDg.verticalScrollPolicy=on;

var nameDGC:DataGridColumn = new DataGridColumn(name);
nameDGC.sortOptions = Array.CASEINSENSITIVE;
var scoreDGC:DataGridColumn = new DataGridColumn(score);
scoreDGC.sortOptions = Array.NUMERIC;
aDg.addColumn(nameDGC);
aDg.addColumn(scoreDGC);
var aDP_array:Array = new Array({name:clark, score:3135}, 
{name:Bill, score:803}, {name:fc, score:03}, {name:Bruce, 
score:403}, {name:Peter, score:25})
aDg.dataProvider = new DataProvider(aDP_array);

aDg.rowCount = aDg.length - 2;
aDg.width = 200;

// also does nothing
aDg.verticalScrollBar.width = 60;
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Unknown error optimizing byte code.

2011-04-27 Thread lists-09

I am starting to see this error more and more when testing apps:

  Line 15005: Unknown error optimizing byte code.
This is in a fully updated Flash CS5 Professional, and occurs when working with 
either AIR or Flash apps. No other compile errors; and the app does not load.
Moving past my love of tools that report ‘unknown errors’ within their own 
processing – it does not seem that this has been resolved anywhere in my 
searches.
The only temp solution is to get out of Flash and reload the app, which allows 
a number of more compiles, before the error pops up again.
Anyone else seeing this error occur?
Any thoughts on solutions?
File, Publish Settings, Flash tab, [x] Compress movie has no bearing.
Thanks
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Unknown error optimizing byte code.

2011-04-27 Thread lists-09
Thanks Cedric – good suggestions.

I did see that there were Flex (and Java) command line options to free memory; 
but I’m locked into FLASH for this one.  I fear a hard upper limit coming to 
hit me.  I’m surprised that others don’t get this more; as my app isn’t all 
that big.

Thanks again.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Kevin’s components for Android 3.0?

2011-04-26 Thread lists-09
Anyone working with/modifying Kevin’s components for Android 3.0?
http://blog.kevinhoyt.com/2010/05/some-flash-android-components/ 


Are there any other Actionscript-based variations for Android 3.0?

I have seen most of the standard sets of components in Actionscript source; but 
nothing that extends or provides something similar to Kevin’s.



I’m looking to (quickly) beef up Kevin’s components, to do things like add Data 
Providers and add physics for gestures for lists, etc.


If you have something that you can help me with (for $) in this area, please 
send me a note.

Thanks
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] [Job] Activescript 3 development

2011-02-01 Thread lists-09
[Job] Activescript 3 development:

Looking for an additional off-site freelancer to the west (Downingtown, Exton, 
Malvern, West Chester) of Philadelphia.

Straight AS3, non-timeline, part-time AIR/FLASH development.

If interested, please email me off-list with resume | cv | portfolio and 
off-site rate requirements.

Thank you,
~Bill
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] [Job] Actionscript 3 development

2011-02-01 Thread lists-09

Perhaps more than obviously, this was meant to be Actionscript.


[Job] Actionscript 3 development:

Looking for an additional off-site freelancer to the west (Downingtown, 
Exton, Malvern, West Chester) of Philadelphia.


Straight AS3, non-timeline, part-time AIR/FLASH development.

If interested, please email me off-list with resume | cv | portfolio and 
off-site rate requirements.


Thank you,
~Bill 



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] (From a PDF?) Getting bitmap data

2010-12-04 Thread lists-09
You’re right Peter, thank you.

I will try these out!

Bill


From: Peter Ginneberge p.ginnebe...@telenet.be

Not sure what you mean with swc only. All sources can be found here:

http://code.google.com/p/purepdf/source/browse/
http://code.google.com/p/fxpdf/source/browse/
http://code.google.com/p/pavo/source/browse/

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] (From a PDF?) Getting bitmap data

2010-12-03 Thread lists-09

Thank you everyone, for the thoughts on how to pull images from PDFs.

I did find some other tools (just to mention them) but they are .swc-only; no 
source, and the customer needs to at least have the source available.

They are:

fxpdf
http://code.google.com/p/fxpdf/downloads/list
.swc-only
.write-only?

pavo
http://code.google.com/p/pavo/
. questionabe docs
. swc-only

purePDF
http://code.google.com/p/purepdf/downloads/detail?name=purePDF_0.74.20100527.zipcan=2q=
. reads pdf from .swf...
  .swc-only
   http://code.google.com/u/@VBhTQ1BRDxRGXQJ5/


I’ll see what I can come up with AS3 –wise.

thanks
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] (From a PDF?) Getting bitmap data successfully

2010-12-02 Thread lists-09
I need to pull in a PDF and be able to show thumbnails of the larger graphics 
to the user.
They check off a couple and those are then saved as PNG or JPG files.

I am ok on saving graphics as PNG/JPG (given a bitmap) and doing the UI piece, 
but can’t seem to find anything on how to manipulate the PDF to pull the 
bitmaps.

Is there anything available short of Acrobat-SDK, and that is AS3-based?


There are a few utilities to do this*, but nothing code-based to glean from. 

*Existing tools:
  a-pdf.com
  verypdf.com
  sobolsoft.com
  somepdf.com
  dawningsoft.com

I have contacted them; but they only offer command-line, no-source, 
alternatives.

Thanks

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] [JOB] AS3 freelance

2010-11-03 Thread lists-09
[JOB] AS3 freelance

For folks

  a) in or near Exton, PA; and, 

  b) with strong AS3 experience

who are interested in freelance projects -- with no need to travel, 
please send me a note.

Principals only please. 

AS3 required, not necessarily with Flex/FB.

Thank you


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] ASCrypt Nowhere To Be Found?

2008-01-17 Thread elia . lists

The original ASCrypt website seems to be down. Does anyone have the files?

Thanks
Elia
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] osX - ActionScript Editor

2008-01-17 Thread elia . lists

Eclipse with FDT

good luck,
Elia
- Original Message - 
From: Karim Beyrouti [EMAIL PROTECTED]

To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
Sent: Thursday, January 17, 2008 2:20 PM
Subject: [Flashcoders] osX - ActionScript Editor



Hi All, I know this is an old topic. I am looking for a good As2 ( and
maybe As3 ) editor for OS-X. for the moment I have found these:

http://macromates.com/ - which has not got great reviews.
http://www.jedit.org/ - 

I have tried SEPY but was unable to get it working. 

Am I missing anything?... do you have any good recommendations? 



regards


Karim

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] ASCrypt Nowhere To Be Found?

2008-01-17 Thread elia . lists
Great! Does anyone happen to have an ASP version that will convert R4 by any 
chance?

Or any of the other encryptions with keys offered in the ASCrypt package.
I was trying this ASP script for R4, but it doesn't produce the same 
results!

http://www.4guysfromrolla.com/webtech/010100-1.shtml

Cheers
Elia

- Original Message - 
From: Fabrício Seger Kolling - Dulldusk [EMAIL PROTECTED]

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Thursday, January 17, 2008 1:24 PM
Subject: Re: [Flashcoders] ASCrypt Nowhere To Be Found?



As meychi.com is currently offline, you may found ASCrypt for AS2 here:

http://www.jek2k.com/wp/index.php/2007/05/22/cryptography-and-flash/

Download Link:

http://www.jek2k.com/wp/wp/wp-content/uploads/2007/05/ascrypt_sample.zip

And for AS3 here:

http://ascrypt3.riaforge.org/

Download Link:

http://ascrypt3.riaforge.org/index.cfm?event=action.download

Cheers
Fabrício Seger Kolling
mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
The original ASCrypt website seems to be down. Does anyone have the 
files?


Thanks
Elia
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Is Key Object Changed With New Plugin Update?

2008-01-08 Thread elia . lists

It works fine in Firefox, but this is related to IE 7,and it's fairly new.
This is on Windows XP, I have not been able to test any other configs.
It has to be something updated in IE7 or the plugin.

// track CTRL+5
if (Key.isDown(Key.CONTROL)  Key.getCode() == 53) {trace(yes);}

Elia

- Original Message - 
From: Dave Mennenoh [EMAIL PROTECTED]

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Monday, January 07, 2008 11:27 PM
Subject: Re: [Flashcoders] Is Key Object Changed With New Plugin Update?



Works fine here. How / where is it not working for you?

Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Is Key Object Changed With New Plugin Update?

2008-01-07 Thread elia . lists

This code has worked fine for some years now, but all of a sudden broken.

// track CTRL+5
if (Key.isDown(Key.CONTROL)  Key.getCode() == 53) {trace(yes);}

I guess it has to do with a change in the player plugin?

BTW this is AS2

Elia
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Real-time Lip Sync with AS3

2007-12-18 Thread elia . lists

Has anyone created and shared code for creating lip sync with AS3?
I've earlier used flashamp, but I guess that's obsolete?

Thanks
Elia
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] using a function twice

2007-05-17 Thread lists


On 17/05/2007 22:07, Allandt Bik-Elliott (Receptacle) wrote:

because the thisBackground function isn't picking up the correct  
values (but keeping the older ones), it is overwriting the first  
panel with the second one


does this help ?


thisTween.onMotionFinished = function()
{
thisBackground(designerBox_2_mc, 350, 0xd5cfc0, 2000);
	// creates the second panel with the settings from the first panel 
(not  these)
	var thisTween:Object = new Tween(designerBox_2_mc, _width, 
Strong.easeOut, 0, 225, 2, true);

};


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Cut and paste: Flash CS3 and Illustrator CS3

2007-05-09 Thread Lists
This should be fine. This is a workflow that was intentionally designed into
the system. The paste process can optionally invoke the last settings
applied during import, where possible.

The only downside is that you have more intimate control over
layers/keyframes, text to editable/vector/bitmap, creating movie clips
during the import process, etc. If you don't need any of those features,
you're good with copy and paste.

Rich


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Whats new in Flash CS3

2007-05-09 Thread novacapsfan-lists
http://www.adobe.com/cfusion/event/index.cfm?event=listtype=online_eventloc=en_us


- Original Message 
From: Berkay Unal [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, May 9, 2007 12:13:02 PM
Subject: Re: [Flashcoders] Whats new in Flash CS3

Hi ,

Do you know any breeze recordings or connect recordings?


On 5/9/07, Count Schemula [EMAIL PROTECTED] wrote:

 www.adobe.com ?

 There is quite a bit of rich media stuff hyping the new Flash CS3.

 On 5/9/07, Berkay Unal [EMAIL PROTECTED] wrote:
  Hi Coders,
 
  Been searching the web for a video or a breeze meeting that will explain
 the
  new features on the Flash CS3 but could not found any?
 
  Does anyone one has some links?
 
  Best
  ___
  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
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 


 --
 count_schemula
 ___
 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
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com




-- 
Berkay UNAL
[EMAIL PROTECTED]
___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Dynamic buttons not showing

2007-05-08 Thread Lists
John,

(FYI, there's something wrong with your reply to that caused this to bounce
last night with a 501 Bad address syntax error. It looks like your own
address and FlashCoders have been combined into one. I'm not sure if that
error is from you, the list, or one of the gateways along the way, but you
might want to look into it, as I have only had this problem with replying to
your post. Here's the body of the email I sent last night.)

I've made a lot of assumptions about what you're trying to do, but it looks
like you have a lot of odd syntax in your script. Avoid using _root whenever
possible, use brackets only for array indices, etc. You can also assign the
create and attach returns to a variable immediately, instead of after the
fact.

As for how you can reference the code for the relevant functions, you can
reference them either by their newly created instance name, by their
inclusion in your arrays, or you can add a function during creation.

This script addresses most of these issues and works:

//
//create missing mc lable_mc. rotated 90-degrees? (vertical label)
//
this.createEmptyMovieClip(lable_mc,this.getNextHighestDepth());
//
//Init variables
//
var myTxt:Array = new Array(branding, news, about us, print,
marks, contact);
var subMenuArray:Array = new Array();
var myBtnArray:Array = new Array();
var myX:Number = 430;
var ySpacing:Number = 190;
var myId:TextField;
var myformat:TextFormat;
var btn:Button;
//
//create a movieClip to hold the vertical label
//
lable_mc.createTextField(myName, this.getNextHighestDepth(), 484, 200,
140, 408);
var myNformat:TextFormat = new TextFormat();
myNformat.font = Verdana;
myNformat.size = 70;
myNformat.bold = true;
myNformat.color = 0xEE;
myNformat.align = center;
lable_mc.myName.text = contact;
lable_mc.myName.setTextFormat(myNformat);
//
//create the textFields for the subMenuItems
//
for (var i:Number = 0; i  myTxt.length; i++) {
myId = this.createTextField(mytext + i, this.getNextHighestDepth(),
myX, 0, 100, 20);
myId._y = ySpacing;
ySpacing += 20;
myId.text = myTxt[i];
//Format the text of the subMenuItems
myId.border = false;
myformat = new TextFormat();
myformat.font = Verdana;
myformat.size = 13;
myformat.bold = true;
myformat.color = 0x55;
myformat.align = right;
myId.selectable = false;
myId.setTextFormat(myformat);
//
//array with submenuItems for button control
//
subMenuArray.push(myId.text);
//
//attach a button (on top of) to each textFields
//
btn = this.attachMovie(butt_btn, butt + i,
this.getNextHighestDepth());
btn._x = myX;
btn._y = myId._y;
btn.onRelease = function () {
trace(this._name);
}
//
//create an array to use later to control the buttons
//
myBtnArray.push(btn);
}

Rich Shupe


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] flv playback from DVD

2007-05-07 Thread Lists
Nik, I think this is on topic. I have not personally had this happen to me,
and I have created many, many such apps because of the client-specified need
to show the FBI warning at the immediate start of the app. Without looking
at your app code, to see if there¹s anything obvious (and I doubt there is),
the only thing I can think of is environmental.

1. I use mProjector rather than Zinc. Not sure if that has any impact.
2. Based on your explanation, my theory is heavily leaning toward DVD
spin-up or access time. Spin-up may not be an issue since the drive has to
spin to launch the app and, presumably, is at full speed.

Maybe you could map your DVD burn to put the video closer to the file?
Probably not responsible, but it's an idea. What about adding a bit of a
delay on the user experience side to allow the FLV to preload? Does
increasing the buffer time help?

Rich


On 5/7/07 6:12 AM, nik crosina [EMAIL PROTECTED] wrote:

 Going a bit off topic, but have you ever had a kind of hick up every
 time an flv starts playback.
 
 I am having my Zinc created exe start with playing a intro video clip
 and it always starts with a little stutter or hick up. I guess this is
 some loading issue, but don't know what to do to solve it...



___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Cellrenderer problems

2007-05-04 Thread Lists
Hey Bruce, how are you (beyond this irritation, of course)?

I don't have an existing cell renderer, but I might be able to help if I can
see the code. One thing off the top of my head is that changing the font may
be changing the behavior of the text field/label component so that it is now
trapping your mouse event. You might be able to do something as simple as
change the text field to prevent selectable/editable or something along
those lines.

I say this, vaguely, because I had the exact same symptom in an AS3 project
recently and just set mouseEnabled to false on the text field to solve it.
It's certainly not the same, but it gives us somewhere to look.

Rich Shupe




___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] flv playback from DVD

2007-05-04 Thread Lists
Do you mean you want to switch from DVD to net-based delivery? You can't
stream from a DVD. If you had a kiosk situation, I guess you could setup a
local server and point to the DVD as your asset repository, but you can't do
that if you're distributing the DVD.

There are a few other things you can do to check for the end of the DVD. You
can check for current time and compare it against the duration parsed from
the metadata (assuming your encoder has added it and it is reliable). You
can let the FLVPlayback component handle the event for you (which has other
issues which have been discussed here, namely seeking).

If you think the playback will be very reliable because the files are local,
you can check for NetStream.Buffer.Empty (The only trouble there is, the
buffer can empty and refill if the playback data transfer is choppy. I had
that happen from my boot drive a day or two ago, because it was chugging on
something else, so it could probably happen with DVD playback.)

There are further options, but I'm drawing a blank at the moment.

Rich Shupe




___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] stumped video behaviour in AS2/Classes

2007-05-03 Thread Lists
Sebastian,

You didn't include the timeline code, but I made some assumptions. I think
the most relevant issue is that your NetConnection and NetStream variables
are local and expire after the function is called. This works:

//in class PostView.as, in com/blabla/
class com.blabla.PostView extends MovieClip {

private var _netConn:NetConnection;
private var _netStream:NetStream;

  public function playVideo () {
_netConn = new NetConnection();
_netConn.connect(null);
_netStream = new NetStream(_netConn);
_netStream.onStatus = function (infoObject:Object) {
 trace (infoObject.code);
}

_root.vid.attachVideo(_netStream);
_netStream.play(video/video.flv);
  }

}

//in timeline
import com.blabla.PostView;

var myVar:PostView = new PostView();
myVar.playVideo();

//


I'm not a fan of classes without constructors, though. If you only included
a snippet, disregard. If not, you can unify the class and function name
above and omit the last line in the timeline. Or, even throw in a generic
constructor for clarity/possible info.

Rich Shupe


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Syntax for dynamically calling a function

2007-05-03 Thread Lists
The short answer is, you can invoke the function directly by writing:

this.onPress = function () {
_parent[this._name]();
}

or, if this looks clearer, you can use the call() method

this.onPress = function () {
_parent[this._name].call();
}

However, there are a few issues with this approach.

First, I don't like the fact that there are two things with the same name in
the same scope: a function and a movie clip. This might just be me being
picky, but I'll show you an example of where this breaks in a moment.

Second, it's not best practice to put scripts inside movie clips. It's
easier to assign these functions from the main timeline.

Third, I'm not sure what this gains you. It's easier to copy and paste but,
if you're already going into the movie clip manually, you might as well just
type the function name. Maybe if you reused the clip from movie to movie
this step would already be done and you'd only have to write the function...
Or maybe I'm missing another time saving purpose.

Combining all three of the above issues, you can automatically assign
functions to all your movie clips from the the main timeline by writing
this:

(assumes mcs on stage named pictures, help, and home, and gets around
same-name-in-same-scope by adding a do_ prefix to the function name)

//
for (var s:String in this) {
if (typeof(this[s]) == movieclip) {
this[x].onPress = function () {
this._parent[do_ + this._name].call();
}
}
}
function do_pictures() {
trace(pictures);
}
function do_help() {
trace(help);
}
function do_home() {
trace(home);
}
//

This will cause EVERY mc in the main timeline to behave this way, so this
approach may not be what you want, but it's a proof of concept. You could do
this through an array of all mcs you want the function assigned to, or even
do it manually like this:

pictures.onPress = function () {
this._parent[do_ + this._name].call();
}

But, again, without some sort of automation in applying the script, you lose
the benefit. You might as well just write:

pictures.onPress = function () {
do_pictures();
}

If you want to see an example of the same-name-in-same-scope problem, run
the first example above after removing do_ from everything. The script
will work but when it goes through and assigns the onPress event handler,
it will assign it to the function pictures rather than the mc pictures. The
function is seen before the mc in the execution order of the loop.

Finally, if the lowercase string movieclip for typeof is confusing, you
can substitute:

if (this[x] instanceof MovieClip) {


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Syntax for dynamically calling a function

2007-05-03 Thread Lists
That¹s good to know. Thanks, Steven.

 IIRC, instanceof is faster than typeof.



___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Pick random hex color

2007-05-03 Thread Lists
What do you mean by 'returns only valid hex values'? Do you need a string of
the number for display, or do you just need the value? For example, if you
don't need the w/alpha format, you can use:

Math.random()*0xFF

Or you can use bitwise shifts and do like:

Math.random()*25516 | Math.random()*2558 | Math.random()*255

Heh. If you wanted the string you could even do this:

function whyDoItRight(withAlpha:Boolean):String {
if (withAlpha) {
var howMany:Number = 8;
} else {
var howMany:Number = 6;
}
var hexPossible:Array = [0, 1, 2, 3, 4, 5, 6, 7, 8,
9, A, B, C, D, E, F];
var hexString:String = 0x;
for (var i:Number = 0; i  howMany; i++) {
trace(Math.floor(Math.random() * 16));
hexString += hexPossible[Math.floor(Math.random() * 16)];
}
return hexString;
}
trace(whyDoItRight(true));

but I wouldn't show it at any job interviews. :)

Rich 


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Detecting referrer in Flash

2007-05-03 Thread Lists
The referrer is not the page displaying your SWF. The referrer is the page
you linked FROM to get to the page displayign your SWF. If I come from a
link in my blog to your site, my blog is the referrer.

You can't get the referrer from Flash, so you must use ExternalInterface and
use JavaScript to pass it back to Flash.

However, it sounds like you want the page displaying your SWF, which is
easy. It's the _url property. I think this._url in the main timeline is
sufficient but you can check the help system.

Rich


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Study material for flash certification

2007-05-01 Thread Lists
As far as I know, the only book avoilable at present is for the MX 2004
certification--an outdated exam at this point.


On 5/1/07 3:27 AM, Prince Zain [EMAIL PROTECTED] wrote:

 I wanted to know, which is the best study book for flash certification.
 Also is there any online resources available for the same. I visited the
 adobe.com but didn't get the sufficient information.
 Kindly share with me.


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] drawing with mouse / pen

2007-05-01 Thread Lists
Nik, if it can save you any energy, be sure you show a proof of concept to
your client/colleague before you get too hip-deep into this. We've tried to
do similar things in the past with little success. The issue is not
technical, it's more of a usability issue.

If you provide a VISIBLE area in which to draw, the end result will be that
you're defeating the purpose of drawing freehand. You might as well just
click on the area you've dedicated. (Remember, these are usability opinions,
and your mileage may very. The crucial thing is that, in what you've
described, your opinion typically doesn't matter. It's the collective
opinion of your users and how well they understand, and can complete, the
task that matters.)

If you want to draw anywhere, you can create an empty movie clip as a canvas
that allows you to draw over everything and, as you said, do a stroke with
no fill so you don't have to worry about closing the path, and it looks more
natural like a marker on a whiteboard. You can just use lineTo and an
interval if you want something simple, or smooth out the line using curveTo
and an interval. You can then determine the geographical center of the
circle and see if that coordinate matches up with a hitTest on the answer
clip. You can't use hit test between circle and answer unless the answers
are no where near each other. But, you can say: center of circle is at
100,100, and answerMC.hitTest(100,100,false) (No shape flag will be easier,
I think.)

The problem will be one of user satisfaction. How hard is it to draw a
circle with the mouse? How accurately can they get it over the answer? How
many times do they have to do it? For example, doing this for a
five-question quiz is great. But for a 20 question quiz it is unbearably
tedious. You want to just click the answer and move on.

Anyway, I suggest that you spend a little time with testers to see how they
react before committing.

Rich



___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Re: flash Dock

2007-04-30 Thread Lists
For real. Wow, four hours.

On 4/30/07 10:56 AM, eric e. dolecki [EMAIL PROTECTED] wrote:

 Quit bumping your posts by copy  pasting your old one. Wait a bit and see
 if someone answers, okay?


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] blendMode in as3

2007-04-27 Thread Lists
I'm not sure I understand what you're trying to do, so I'll take a shot at
this. I think there might be a confusion between blend mode and alpha.

Applying a blend mode to a MC is a single-step process, which says give this
MC a blend mode of darken. This is akin to a PS layer mode, so Darken will
color only those pixels below it that are lighter. There aren't varying
degrees of the darken blend mode, so you can't set it to 10 and increment
it. Incrementing a blend mode assignment, if that's still supported in AS3,
will cycle through different blend modes. I wouldn't use the integer
assignment--again, assuming it's still supported, but would use the constant
assignment instead.

There are other things I'm not sure about, like the multiple x assignment
and the unfinished array line, but here's what I think might work:

import flash.display.*;
import flash.filters.*;
import flash.display.BlendMode;

var mcArray:Array = new Array();

for(var i:uint=0; i20; i++) {
   var myMC:MovieClip = new movie1();
   //myMC.x=222; //either omit this
   myMC.y=186;
   myMC.x = i*40; //or use += ?
   myMC.rotation=i*20;
   addChild(myMC);
   trace(mcArray);
   mcArray.push(myMC); // change to push?
   myMC.blendMode = BlendMode.DARKEN;
   trace(myMC);
}

The darken blend mode, however, will just affect underlying pixels, so your
MC will have to have more varying colors to see any effect. You might want
to look into .alpha, which controls opacity, to see if that's what you want.

Sorry if I misunderstood.

Rich

On 4/27/07 12:11 PM, Gustavo Duenas [EMAIL PROTECTED]
wrote:
 import flash.display.*;
 import flash.filters.*;
 import flash.display.BlendMode;
 
 var blen1:BlendMode = new BlendMode();
 blen1= blen1.DARKEN=10;
 
 //funcion de array repetidos.
 
 
 var mcArray:Array = new Array();
 
 for(var i:uint=0; i20; i++) {
 var myMC:MovieClip = new movie1();
 myMC.x=222;
 myMC.y=186;
 myMC.x = i*40;
 myMC.rotation=i*20;
 addChild(myMC);
 trace(mcArray);
 mcArray[myMC];
 
 myMC.blen1=blen1+i;
 
 
 trace(myMC);
 }


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] swf to jpeg

2007-04-21 Thread Lists
You can save BitmapData using ByteArray in AS3. Tinic Uro has written JPEG
and PNG encoders, as have some others. Check out www.kaourantin.net for more
info.


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] AS3 detect end of FLV

2007-04-21 Thread Lists
Hi Eric.

There are three ways that I know of to detect the end of an FLV. WARNING. I
haven't tested this code, or looked it over for best practices, etc.

1) The simplest way is to use the FLVPlayback component and use the complete
event. (The following assumes an FLVPlayback component is on stage and
instantiated as myVid, and haven't changed anything else. Without
autoplay, for example, you'd have to add a line to play the vid, etc. You
can also create an instance if it's in your library if that's better.):

**
import fl.video.*;

myVid.source = video name here.flv;

myVid.addEventListener(VideoEvent.COMPLETE, vidEnd);
function vidEnd(evt:VideoEvent):void {
trace(FLV has ended);
}
**

2) The second method is pretty much the same, but doesn't rely on the
FLVPlayback component. Instead, it uses the VideoPlayer class.

**
import fl.video.*;

var vidPlayer:VideoPlayer = new VideoPlayer();
addChild(vidPlayer);

vidPlayer.play(video name here.flv);

vidPlayer.addEventListener(VideoEvent.COMPLETE, vidEnd);
function vidEnd(evt:VideoEvent):void {
trace(FLV has ended);
}
**

This reduces file size because you aren't using the component, but it
doesn't have a controller, or all the capabilities of the component (such as
seeking to cue points). You also have to add code if you're streaming the
video, because the component takes care of that for you. I haven't done that
yet, so you'll have to look that up in the docs, sorry. I haven't had a need
to save on file size so significantly that I skip the component. However,
using this method does allow you to do things 100% with code, so you don't
need the component in the library to begin with.


3) If you need to know the end is nigh, you'll need to look for the video's
metadata. As far as this being reliable goes, this method requires that
the metadata be in the FLV. Although different encoders add different ranges
of features, most do add 'duration' metadata. You can also probably inject
it using one of the third party metadata injectors, after the video has been
encoded.

To look for the metadata, you'd write an object that is assigned to the
NetStream. Here's a simple example.

**
var vidConnection:NetConnection = new NetConnection();
vidConnection.connect(null);
var vidStream:NetStream = new NetStream(vidConnection);

var vidDuration:Number;
var vidClient:Object = new Object();
vidClient.onMetaData = function (md:Object):void {
vidDuration = md.duration;
}
vidStream.client = vidClient;

var myVideo:Video = new Video();
myVideo.x = myVideo.y = 100;
myVideo.attachNetStream(vidStream);

addChild(myVideo);

vidStream.play(video name here.flv);

**

From there you can do something like this (though more efficient?):

**
this.addEventListener(Event.ENTER_FRAME, checkVid);
function checkVid(evt:Event):void {
var timeDiff = (vidDuration - vidStream.time)
if (timeDiff  3  timeDiff  0) {
trace(The video will end in less than 3 seconds);
}
}
**

--Rich Shupe

On 4/20/07 4:07 PM, eric e. dolecki [EMAIL PROTECTED] wrote:
 is there a reliable way with AS3 to detect the end of a FLV?



___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Problem: Safari and dynamic loading?

2006-11-28 Thread Daniel Forslund|Lists

Sorry for the late reply!
Many thanks for the suggestions - I think a load manager class is the  
way to go and I'll send Jamie a mail and take up the kind offer.

Cheers,
Dan

On 22 nov 2006, at 16.36, Jamie S wrote:



I the only way I was able to put the problem to bed for sure was to  
build a
load manager class that would make sure everything loaded up one at  
a time.
So all of the stuff that needed to be loaded would be put into a  
queue and
the class would go through and load stuff, making sure not to load  
the next

thing in the queue until the previous thing had finished.


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Can anyone download Flex Builder 2?

2006-10-27 Thread Bbt Lists

Steven Sacks | BLITZ wrote:

http://www.adobe.com/cfusion/tdrc/index.cfm?product=flex

I click download and it hangs for about 15 seconds before it reloads the
page.  No download occurs in either IE or Firefox.  I downloaded this
just fine from home last night.  Anyone else not able to download Flex
Builder 2?


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
  
I had problems downloading it too, and posted in the adobe forums and 
essentially got told there was nothing wrong with it and it must be me.


--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Can anyone download Flex Builder 2?

2006-10-27 Thread Bbt Lists

Steven Sacks | BLITZ wrote:

Can you link me to your forum post?


BLITZ | Steven Sacks - 310-551-0200 x209
  
Looking for it, however as Jason mentioned the adobe site is having 
issues - I still can't even get the page to load to get the link.



--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Flex Builder 2 for Mac - 6 things you need to know

2006-10-27 Thread Bbt Lists

Dave Wood wrote:

Hi

Have downloaded Flex Builder for mac, installed it and launched the app.

It opens revealing a Flex Start Page panel which has a heading How 
Flex Works, a sub-heading 6 things you need to know followed by 6 
text links that lead nowhere.


Anyone else have this problem? Anyone know how to access this 
information? Is there maybe something additional that also needs to be 
downloaded?


David


Works for me! They link to internal help docs with a URL like:

http://127.0.0.1:58332/help/index.jsp?topic=%2Fcom.adobe.flexbuilder.help%2Fhtml%2Fhow_flex_works_2.html

So it looks like adobe has some sort of server installed to serve these up.

Did you just install? Maybe reboot then try. I always find that there is 
a delay before they start the first time I ended up with 6 tabs in 
firefox because I kept clicking it.





--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Flex Builder 2 for Mac - 6 things you need to know

2006-10-27 Thread Bbt Lists

John Dowdell wrote:
It opens revealing a Flex Start Page panel which has a heading 
How Flex Works, a sub-heading 6 things you need to know followed 
by 6 text links that lead nowhere.



Works for me! They link to internal help docs with a URL like:

http://127.0.0.1:58332/help/index.jsp?topic=%2Fcom.adobe.flexbuilder.help%2Fhtml%2Fhow_flex_works_2.html 



I don't know the packaging yet, but that's a local address, rather 
than an adobe.com address:

http://www.google.com/search?q=define%3Alocalhost

For How might a local address fail? then some ways include moving 
the files around on disk, browser security changes ot prohibit local 
files, difficulty finding a browser... anything like this seem like it 
might be happening here...?


jd
hey John - When clicking those links they do connect to a local address 
- that is what I was pointing out to the original poster or are you 
referring to the fact hat since I posted it was an internal address - 
that the original poster may have done the above mentioned things? Sorry 
- long day on a Friday - my head quit working a few hours ago and my 
body has yet to catch up.



--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] onMouseup bug?

2006-10-20 Thread Daniel Forslund|Lists

Hi all!

I've stumbled upon something quite weird, and have searched for an  
explanation without any success.

Consider the following Movieclip hiearchy:
Contentclip (with a few images and text fields dynamically attached) - 
 buttonclip


I have created a class which when instanced will:
- attach a new instance of contentclip to level0
- attach onRollOver,onRollOut,onMouseUp functions to the child  
buttonclip


When the movie runs, a rollover/rollout of one of the buttonclips  
will alert ONLY the object (class instance) that created it.
However, when clicking on one of the buttonclips and capturing the  
event with onMouseUp, ALL the objects linked to contentclips will be  
called. Ie, if I have a function that create 4 objects that in turn  
each create one contentclip, one click on one button will result in 4  
separate calls to each one of the 4 instance objects.


Now for the weird part which makes me strongly suspect it's a bug  
rather than poor programming on my part:
If I swap the onMouseUp event for an onPress event, the problem goes  
away. I get one call to the parent object which attached the  
onPress function - as I would have expected all along.


I apologize for the poor description, I hope it makes sense and that  
someone can explain what's going on to me. :-)

Many thanks in advance!
Dan
___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] onMouseup bug?

2006-10-20 Thread Daniel Forslund|Lists

Thanks for the replies!

My apologies for not checking how the mouseup event is handled.  
Coming from many, many years of Director/Lingo work, I simply assumed  
mouseup to work in a similar manner :)


Cheers,
Dan

On 20 okt 2006, at 17.02, Dave Mennenoh wrote:

You don't need to use hitTest - you can just assign a function to  
the onRelease event within the constructor:


class com.blurredistinction.Mtest extends MovieClip {
function Mtest(){
 this.onRelease = function(){
  trace(this);
 }
}
}




Dave -
Head Developer
www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/
___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Movieclip event hook back to class instance?

2006-10-10 Thread Daniel Forslund|Lists


On 6 okt 2006, at 19.15, slangeberg wrote:

My problem is finding a way for the preloader class instance to  
tell when

the

movieclip reaches a certain frame or frame label


Actually, I prefer to set things up in an event-based model. I  
don't have
the code in front of me, but if you look at the EventDispatcher  
class, you
can have whatever movie is doing the loading to add listeners to  
that which

was loaded:

myClip.addEventListener( complete, Delegate.create( this,  
onComplete ) );


and inside of myClip, you'll need to:

this.dispatchEvent( {type:complete, target:this} );

Unfortunately this behavior is not built into MovieClip... Just some
ideas...

Scott


Thanks for the suggestions everyone!
I ended up setting up my own event handler without using listener  
functionality. It tags movieclips with an ID, which is passed to a  
central content manager, which in turn passes it to the correct class  
instance. Very simple and efficient with few lines of code. Perhaps  
not very elegant, but it works. :-)


Cheers,
Dan
___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Movieclip event hook back to class instance?

2006-10-06 Thread Daniel Forslund|Lists

Hi all!

I have a (hopefully not too ignorant) question relating to movieclips  
created on the fly.
Basically, I have a preloader class that is generic and reusable.  
It's called from whatever object that does dynamic loading of content  
and then in turn invokes a movieclip from a passed symbol name(can be  
anything, as long as a basic movieclip structure is followed). It all  
works great.


However, when the loading is done I want the dynamically created mc  
to play an outro animation that is preanimated in the movieclip (as  
opposed to animated via AS, that would be easy ;) ). My problem is  
finding a way for the preloader class instance to tell when the  
movieclip reaches a certain frame or frame label (and is done with  
the outro). I can't find a suitable event to hook into? I guess I was  
looking for something like mc.onframelabel to hook a function to, I  
guess that was naive. :)


Can I in some way create a hook myself, or do I have to create a  
watcher object that checks each frame where the playhead is in my  
dynamic loader movieclip? Would certainly work, but it's not very  
elegant. My goal is to keep the preloader movieclip code-free.


Anyway, I hope I managed to describe the problem. Apologies for any  
ignorance and any terms/keywords used out of context. I'm pretty new  
to more advanced actionscript, but have many moons of general coding  
experience. :)


Many thanks in advance,
Dan
___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] ::dk:: Best way to check if data is done loading for scroll bars

2006-09-20 Thread Bbt Lists

Gustavo Teider - Adobe Flash Developer wrote:





use setScrollTarget

scrollbar.setScrollTarget(your_textfield);

is this ?

But how do you tell if the data is actually done loading? I mean for 
example, i have a field that loads a jpg in, and since the jpg takes a 
little longer, the scroll bars account for the text, but not hte image. 
And if I call redraw right after I call the data to be loaded, it seems 
to still be too soon.




--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] ::dk:: Best way to check if data is done loading for scroll bars

2006-09-20 Thread Bbt Lists

Gustavo Teider - Adobe Flash Developer wrote:



Gustavo Teider - Adobe Flash Developer wrote:


your image its loading in html textfield with img src  ??

Do you have an example about this ?
Put your files in your server , so , will be easy

[]´s

This is correct. It is an html field with the img tag (in this case). I 
am offsite at another location, so I do not have my files with me to 
post. But that aspect is workign fine.. .I was just hoping to learn of a 
way to test if the data is loaded in this instance.


--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] ::dk:: Best way to check if data is done loading for scroll bars

2006-09-20 Thread Bbt Lists

Duncan Reid wrote:

One thing you can try is to give your image an id so it's seen as a
MovieClip within the textfield, then you can run a checker to see when
it's loaded then redraw the scrollbar...

img id='mcID' src='stuff.jpg' hspace='10' vspace='5' align='left'

so to access it you would path: textfieldname.mcID.

hope this helps some,
Dunc
Ah! I will try that when i am back with the files... I was not aware 
that you could do that!



--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] flip pages in as2 or the like

2006-08-25 Thread Bbt Lists

Matthias Dittgen wrote:

Thank you, Jordan!

I am coding an AS2 pageflip class right now, which works as needed for
our current project and I am follwing the O'Reilly article from Sham
Bhangal, which is really excellent. I am making big steps forward a
reusable solution in pure code.

Will it be open source? Just curious.



--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Flash/Actionscript Coding conventions

2006-08-23 Thread Bbt Lists

Steven Sacks | BLITZ wrote:

I have an issue with coders who put block comments in the middle of
their code, such as:

/***
** SOME COMMENTS
**/
function foo() {
trace(hello world);
}


Or even worse:

/***
** SOME COMMENTS
**/
function foo() {
/* some comments inside the code */
trace(hello world);
}

People who comment like that are my bane and here is why.  Commenting
like that in your code makes it completely impossible to easily and
completely comment out blocks of code using /* */ because they have
their */ inside their comments.  Believe it or not, this is a very
important tool in debugging.

So, please do everyone a favor and only use block comments before and
after your code and use line comments // for all comments inside your
code.  :)

Thanks,
Steven

  
If you need something easy to see (say for example if you are commenting 
where your remoting handlers are), something like:



///
// Remoting Handlers
///

// other code

///
// Button Handlers
///

Just throwing it out there.

--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] communication between flash and access db

2006-08-23 Thread Bbt Lists

Céline Nguyen wrote:

Hi,

I am beeing asked a question too technical for me, and maybe some of 
you might be interessted and could help me to see the things more 
clearly.
I'm building a desktop application with Flash Studio, f8, oop, shared 
obj.
One of the clients of my client wants the application to have some 
communication with an external access database, this DB would be on a 
central server.
I suggested an asp page, but the costs to install and maintain such 
asp server seem to be a problem, and consequently the client does not 
want to install an asp server.
So I am beeing asked if Flash can communicate with this access 
database with an odbc connection.


Does it make some sense to you ?
What are the other ways (without asp) to send and load data to an 
access DB ?

Did someone have this issue before ?

Thank you very much in advance,
Celine
Flash does not have any out of the box database capabilities to 
connect direct. Everything I have ever seen involves flash remoting, and 
a servers side language like php or .net.


A quick google search pretty much confirms this. If licensing costs are 
the issue, maybe an internal server with linux/php could help (although 
not all IT guys can deal with 'nix - so there could be added cost in setup).


--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] [Fwd: relay responder method never called]

2006-08-21 Thread Bbt Lists
Can things like whitespace produce this kind of result? How about spaces 
instead of tabs (code formating)?


Just having a hard time tracking this issue down.

Just to recap, and possibly add more info:

I had a remoting project that just stopped working. I put traces in on 
the method that calls the php service, and one in the relay responder 
method. The first trace is fired, but not the second one. I then had my 
PHP class use touch to create a file on the server to see if it is fired 
- it is. but for some reason the relay responder method is never 
fired. I read something about having white space in the PHP class 
outside the php class chokes amfphp (well rather flash) - but - I don't 
have any - so I am wondering if there is any other thing in a php class 
that would cause flash to not know how to handle the results? Are there 
php settings maybe that could effect it? The server host also updated 
our server that day. But my other remoting classes are working. Even 
this class is working in other areas in the movie - it is so perplexing. 
I just need to figure out why the responder never happens (as this is a 
live site). Thanks in advance for any info!


Thanks!





--
dnk
___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] need help in button

2006-08-14 Thread Bbt Lists

On 8/14/06, Rutul Patel [EMAIL PROTECTED] wrote:


hi people,
anybody know how to draw button using AS.
if anybody can tell me,
thanks

--
Regards,
Rutul Patel


You could define your button in a movieclip - place it in your library, 
and attach it to your movie with AS.


Or skin the button component, and attach that.


--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Re: [Flashcoders] DK - redrawing interface elements after destruction]

2006-08-11 Thread Bbt Lists

Anthony Lee wrote:



At any rate - when i create my thumbnails, all works fine the first 
time, but after they have been wiped out, and I recall my method to 
re-draw the thumbnails, for some reason my buttons are not working. 
Now I did a bunch of tracing tests to see if:

Hi dnk,

This may not be a proper answer to your question, but when faced with 
this kind of headache I stick all the problem buttons, thumbnails etc 
in a single movieclip, delete that clip to clear them, and redraw the 
whole thing from scratch. Bad for the processor, good for my sanity.


Tony


Ok - as an update I realized why this was not working - my buttons were being 
wiped out and recreated,
but the original delegates (onPress) were the issue. When my class was 
initialized the delegates were
calling their respective functions as it should. The issue I had was that when 
the 2nd page of thumbnails
were loaded - the buttons were still listening to hte original delegate functions. I have written those 
functions to use variables to load the images - but it seems that when the functions used by delegate - had

not updated the variables.. it seemed to only want to do that on the initial 
load. I hope i am explaining this properly.
For the way I seem to think about code - it would be nice if there was a way to 
write dynamic functions. But that is another posting.




--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] |:::| can you write dynamic meathods in a class?

2006-08-11 Thread Bbt Lists

Hi there

Can you write dynamic methods in a class?


for example

for (var i:Number = 0; i  11; i++)
{
   function onBtnPress + i()
   {
  trace(Button number:  + i + was pressed);
   }
}

So then that would essentially create 10 methods (onBtnPress0 to 
onBtnPress9) to be used by various onPress events.


Is this possible? Then at the same time you could write the delegate and 
create the buttons and so one as well.


Then continuing on my thought - could you then over-write the onBtnPress 
functions with new values (say for example the trace would be:


trace(Button number:  + i + was pressed with the currValue of  + 
externalVariable);


instead of the original:

trace(Button number:  + i + was pressed);


I am a hobby AS coder, and I am probably way off here. All I am trying 
to do is build a thumbnail nav for a gallery.


Thanks in advance!

--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] |:::| can you write dynamic meathods in a class?

2006-08-11 Thread Bbt Lists

Ramon Miguel M. Tayag wrote:

I don't think you can create dynamic functions.. even if you could, I
don't see the need to.

use your arguments to make your functions all-purpose.

Ex.

function onBtnPress(n:Number):Void
{
 trace(n +  was pressed.);
}

button0.onRelease = Delegate.create(this, onBtnPress, 0);
button1.onRelease = Delegate.create(this, onBtnPress, 1);




Ah! I never knew you could throw args like that to your functions 
through delegate


Sweet!


That totally makes more sense!

Now my next question

Say for example I needed to throw a different arg to that function?

IE this time I needed one var, and later I needed another?

var nMyNum:Number = 0;

button0.onRelease = Delegate.create(this, onBtnPress, nMyNum);

nMyNum = 10;

//need to update the delegate here
//button0.onRelease = Delegate.create(this, onBtnPress, nMyNum);

Can you remove or overwrite delegate instances?



--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] |:::| can you write dynamic meathods in a class?

2006-08-11 Thread Bbt Lists

Ramon Miguel M. Tayag wrote:

Sorry, I'm using a custom delegate class.. I completely forgot.  Let
me dig up that post that has what you need...

I was just reading a reference to a proxy class that does similar to 
delegate, but allows args to the functions. So I was not entirely insane 
(as in not knowing about passing args with delegate).


Curious to see if you are referencing the same class.

And also I still have my question about re-assigning a new arg.

--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] FileReference.upload onComplete event fails on OSX

2006-08-04 Thread lists
hi

I have a flash 8 movie that upload jpegs to a server side script.  When hosted
on an NT server, with a php script that recieves the upload, the FileReference
onComplete event gets called correctly when the an image has completely
uploaded using FileReference.upload. This when movie is viewed in Flash Player
8, in IE and Firefox on Windows XP and on OSX.

When the same swf is uploaded to an Apache Tomcat/5.5.12 server, with a jsp
script to recieve the upload, then the problems start.  The upload works ok on
both PC and OSX, except that the onComplete event of the FileReference object
is never called on OSX.  It is essential to trap the onComplete event for the
site to continue with its functionality. (If the file takes long enough to
upload (more than a few fractions of a second) the the onProgress event is
called while its uploading on PC and OSX.)

Has anyone come across this problem or similar?

TIA
___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] ?? inconsistant results - remoting ??

2006-07-26 Thread Bbt Lists
Hi there - I have a flash movie with different frames that make remoting 
calls. Now when I view them from the server (and loaded into another 
movie) - not all the data will populate in various text fields. When i 
just test it out of the IDE and local on my computer - it works fine! 
Now the perplexing thing is that SOME fields are populated, and others 
are not. And since it works when tested local, I know my assignments 
(text fields to data) are correct. Then the other odd thing is that on 
another frame I will have remoting calls and they will function as 
normal! I thought at first maybe I was missing something out of scope, 
or that my class was messed up - but the fact that it works local, or if 
I copy and paste the MC from the problem movie into a new one, it all 
works as it should.




Ideas?

--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] net connection debugger not working in F8

2006-07-26 Thread Bbt Lists
Has anyone had this issue, or a way around it? I had searched google, 
and found references to using the mx2004 files to replace the F8 ones, 
but i do not have access to those...


Thanks!

--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] net connection debugger not working in F8

2006-07-26 Thread Bbt Lists

Mike Boutin wrote:
Ive had this problem using the f8 remoting files.  It seems to fix 
itself for me by restarting flash...


Bbt Lists wrote:
Has anyone had this issue, or a way around it? I had searched google, 
and found references to using the mx2004 files to replace the F8 
ones, but i do not have access to those...


Thanks!


I have restarted flash many times over the last few weeks. This is an 
ongoing issue for me that I have been trying to research first before 
posting, but I am just getting frustrated with it now... so i am 
reaching out to others now as well.  It just never works.  =-)



--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] getting started with AS3

2006-07-21 Thread Bbt Lists

And yes I did search the archive   =-).

At any rate I was wondering if there is a way to get started with 
AS3 without having to delve into flex. Nothing against flex, but I just 
wanted to focus on the language, and not the tool (at this point). And 
well also since i am on a mac - there seems to be no flex (as of yet - 
unless that has changed in the last month).
IS there a way to do so with flash, or would that only be possible if I 
was part of some sort of beta tester program for flash 9(which I am sure 
I do not qualify for)?


I would just like to start getting my head around it.

Thanks in advance!

--
dnk
___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] getting started with AS3

2006-07-21 Thread Bbt Lists

Tom Lee wrote:

If you are a licensed user of Flash 8, you can download the Flash 9 AS3
Preview at http://labs.adobe.com/technologies/flash9as3preview/.


  

Thanks MUCH!

--
dnk

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] timeline effects, overide final alpha?

2006-07-14 Thread lists
Hi all,

I have a problem and I cannot imagine nobody else has had it before, yet I can
find no mention of it anywhere. I have searched the archives, adobe forums and
google.

When you apply certain timeline effects (for me, a transform) you get a dialogue
with various options in it. One of these is final alpha. The problem is, you
cannot say don't change the alpha, you just set it at 0% - 100%. But I wish
to apply an effect to an object which contains various degrees of alpha
transparency. So if I leave final alpha at 100%, all of my transparency
gradually becomes opaque.

This seems to me completely insane. There must be a way to override this!
Perhaps using actionscript to alter it at run time? Am I just missing something
really obvious?

I am using Flash 8 Pro btw, in case it matters. Also, if there is a better place
for me to ask the question please advise.

Cheers

Kev


P.S. just so it's clear, here is a quick note to replicate the problem:

1) create a new flash movie
2) draw a black square on the screen
3) draw a white square over it, set the white alpha to 10%
4) your square should be slightly lighter than black
5) select both squares and click select-timeline effects-transform-transform
6) change 'scale' to 150% and click OK.

You would expect to see the square grow but it will also turn white! GRR : )

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] [FREELANCE] Variety of freelance projects available

2006-06-08 Thread Lists
I don't want to use list bandwidth to talk extensively about this, but I
have a fair number of freelance gigs available.

I have an IMMEDIATE need for a dozen or more capable HTML/CSS/JavaScript
scripters, an IMMEDIATE need for one or two ActionScripters capable of
adding to a legacy project in AS1, and slightly longer term needs for a
really good Flash Remoting person, and a really good Flash/PHP person. (The
latter project requires writing to text files rather than a database, so
flexible PHP skills are important.)

If anyone is interested, please write to me off-list at [EMAIL PROTECTED]

Thanks,
Rich



___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] trimming quotes from posts

2006-05-31 Thread Lists
Okay, thanks Dave. By the way, the irony of my asking a list policy question
and forgetting to change my subject line, did not escape me. Sorry about
that.

Rich




___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Re: Flashcoders Digest, Vol 16, Issue 94

2006-05-30 Thread Lists
Is there a reason (preference or list policy) that I missed that calls for
every email to be quoted in every response?

I've never seen this before, so I wanted to ask. I've noticed that some
posts have many, many repeated posts in quote form, including headers and
footers, over and over again. Is that preferred?




___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Re: Equidistant points on an ellipse!

2006-05-11 Thread Lists
I cobbled together a poor hack for plotting equidistant points on an
ellipse. I'm going to post the code here, with comments, so future archive
searches will yield something. This might be ugly in email, but it is
complete. It requires a library mc with linkage circle.

/*
background:

ellipse: http://www.devx.com/webdev/Article/28728
circle: http://www.devx.com/webdev/Article/28502

Rich Shupe, FMA http://www.fmaonline.com
*/
//
//initial values
var i:Number = 0;
var j:Boolean = true;
var angle:Number = 0;
//
//degrees to radians
function deg2rad(degree:Number):Number {
  return degree * (Math.PI / 180);
}
//
//distance between two points
function pDp(x1:Number, y1:Number, x2:Number, y2:Number):Number {
  return Math.sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
}
//
//draw ellipse using param values
function drawEllipseWithPoints(eWidth:Number, eHeight:Number,
eCenterX:Number, eCenterY:Number, dotGap:Number) {
  //horz and vert radii of ellipse, based on width and height
  var xRadius:Number = eWidth / 2;
  var yRadius:Number = eHeight / 2;
  while (true) {
//convert theta degrees to radians
var radian:Number = deg2rad(angle);
//use flag to create one point until next point required
if (j) {
  //create first point, known as circle 0 for later use
  var dot:MovieClip = this.attachMovie(circle, circle + i, i + 1);
  //mostly legit calculation of point on ellipse
  dot._x = eCenterX + xRadius * Math.cos(radian);
  dot._y = eCenterY + yRadius * Math.sin(radian);
  //increment counter for unique instance names and level
  i++;
  //disable point creation until next use
  j = false;
}
//calculate each point with 1-degree change in theta,
//  but only plot point when desired
var tempX:Number = eCenterX + xRadius * Math.cos(radian);
var tempY:Number = eCenterY + yRadius * Math.sin(radian);
var myD:Number = pDp(dot._x, dot._y, tempX, tempY);
//only create next point if distance is greater than desired gap
if (myD  dotGap) {
  j = true;
}
//points don't continue to overlap when plotted equidistantly.
//  stop drawing when ellipse is complete.
var quitD:Number = pDp(circle0._x, circle0._y, tempX, tempY);
if (myD  dotGap  quitD  dotGap) {
  //last point doesn't look right, so put it midway between first and
  //  second to last point.
  dot._x = this[circle + (i - 2)]._x + (this[circle0]._x -
this[circle + (i - 2)]._x) / 2;
  dot._y = this[circle + (i - 2)]._y + (this[circle0]._y -
this[circle + (i - 2)]._y) / 2;
  //use B.S. magic number of .07 * ration of width/height for wide
  //  and height/width for tall ellipses
  dot._x += dotGap * (.07 * (eWidth / eHeight));
  dot._y += dotGap * (.07 * (eHeight / eWidth));
  //  when finished, break out of the loop.
  break;
}
//increase theta by 1
angle++;
  }
}
//

drawEllipseWithPoints(400, 200, (Stage.width / 2), (Stage.height / 2), 10);
//
stop();


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] xml file location

2006-05-10 Thread Lists
Tom,

When I don't want to rely on the location of the HTML for my XML path, I use
something like the function below to figure out the directory of the SWF.
That way, I can keep the SWF and XML together and not rely on an absolute
path. Beware: test this aggressively because this is off the top of my head.

function localURL(whichURL:String):String {
var url_parts:Array = this._url.split(/);
var myURL:String = 
for (var i:Number = 0;iurl_parts.length-1;i++) {
myURL += (url_parts[i] + /)
}
myURL += whichURL
return myURL
}
//to test try this:
trace(localURL(myfile.xml));

Rich




___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Are you a help vampire?

2006-04-28 Thread lists
Self confessed help vampire here. To be honest, I have browsed for
questions to
answer but have seen none I feel capable of answering yet. I shall, however,
endeavour to answer one soon :-).

While off topic for a minute, I would also add that personally I would prefer
this all to be in web forum rather than mailing lists as it seems much easier
to keep track of threads and spot unanswered queries. I do expect flames for
that last comment :P. Nevermind.

Kev

Quoting ryanm [EMAIL PROTECTED]:

 I've been a member of a group , more strict than any other groups.
 It's a place for C/C++ programmers where Help Vampires more than
 often get these replies :

Heh, that's old school. Back in the day, when all this kind of
 discussion took place on newsgroups, that was standard fare. Except
 that there wasn't any google, and vampires were told to restate their
 questions in the form of a haiku.

Ah, the good old days when flame cascades were relegated to afk-mn
 (alt.fan.karl-malden.nose for the uninitiated)... good stuff. There
 is no cabal.

 ryanm ___
 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
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com





- End forwarded message -

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] excluding children from setTransform

2006-04-25 Thread lists
Thanks for the reply, that looks like exactly what I need but I'm 
having trouble
with it. I'm passing in _root.application because its a forms based 
app, but it

seems to be going in to an infinite loop. I'm trying to work out why but it's
difficult to debug because it needs to be run from a browser (depends heavily
on the HTML around it).

Do you have any ideas as to why it might be looping infinitely?

Kev

Quoting elibol [EMAIL PROTECTED]:


There is a function I have handy that you could use to solve this. Instead
of using setTransform on your entire movie, you could do it to all
movieclips except ones that contain the images. You could do this by giving
image clips a special flag that your function will ignore.

   function getClips(target:MovieClip):Array {
   var r = [], i, child, childChildren;
   for(i in target){
   child = target[i];
   if(child instanceof MovieClip){
   if(!child.__hasImage){
   r.push(child);
   childChildren = getClips(child);
   if(childChildren.length0)
   r = r.concat(childChildren);
   }
   }
   }
   return r;
   }

Where __hasImage would be set to true for movieclips that contain images,
this function will return all movieclips that do not contain images.

Hope this helps,

M.

On 4/24/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Hi all,

I am trying to do a setTransform on my whole movieclip to invert the
colours to
give a high-resolution scheme for people with seeing difficulties. The
problem
is, there are a few graphics (photos) in the app which I do not want to be
inverted. i tried changing their indiviudal transformations back to normal
but
they are still inverted. How can I not apply the transform to those
objects??

This is all done on the fly, in code, by the way.

Thanks

Kev

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] excluding children from setTransform

2006-04-24 Thread lists
Hi all,

 I am trying to do a setTransform on my whole movieclip to invert the colours to
give a high-resolution scheme for people with seeing difficulties. The problem
is, there are a few graphics (photos) in the app which I do not want to be
inverted. i tried changing their indiviudal transformations back to normal but
they are still inverted. How can I not apply the transform to those objects??

 This is all done on the fly, in code, by the way.

Thanks

Kev

___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Can't believe this bug hasn't been mentioned before - DateTime parsing in Web Services is BORKED

2006-03-23 Thread lists

I can't believe this hasn't been fixed yet because it appears that it should've 
been a problem from v5 or v6 and beyond.

The decoding code for DateTimes in web service PendingCalls has a bug and does 
not correctly parse valid datetimes.

The simplest way to recreate this bug is to access a web service that returns a 
dateTime in the format 2000-01-12T12:13:14Z. Crazy that this bug exists, 
because the W3C's **example** is in that format (see 
http://www.w3.org/TR/xmlschema-2/#isoformats). Notice there's no millisecond.

The bug itself exists in mx.services.PendingCall.decodeDate() where it 
*assumes* there's milliseconds. The only way to work around it is to have your 
web service put out a *string* that's in datetime format and have Flash parse 
the string (or use the datatype of 'date' instead of 'dateTime' if the time 
isn't important for your usage).

That workaround is a hassle because then you have to write parsing code - bleh.

Has anybody seen this before and do they have a better workaround than parsing 
a string representation of the date time (granted that's exactly what 
PendingCall does - just not very well)?

dave myron
principal, technical director

contentfree
⊡ 206.855.5580 phone | 206.774.2767 fax
⊠ [EMAIL PROTECTED]
⊟ 337 1st ave ne. suite 100, issaquah, wa 98027 


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Simple date comparison bug?

2006-03-23 Thread lists
Don't know why I haven't come across this before, but can anyone confirm this 
for me (and maybe give an explanation)?

code
var d1:Date = new Date( 1970, 0 );
var d2:Date = new Date( 1970, 0 );
trace( d1 == d2 ); // false
trace( d1 = d2 ); // true
trace( d1 = d2 ); // TRUE?!
/code

Umm… If something is both = *and* = the only possibly is that it is equal. 
So… WTF?


dave myron
principal, technical director

contentfree
⊡ 206.855.5580 phone | 206.774.2767 fax
⊠ [EMAIL PROTECTED]
⊟ 337 1st ave ne. suite 100, issaquah, wa 98027 


___
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
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Modified listbox component with dynamically loaded images. Not working :(

2006-01-09 Thread lists
 Hi all, hope someone can help me with this...

 I wanted to create a listbox which can show dynamically imported images
(thumbnails) as well as text. I may also go on to add buttons although thats
looking unlikely given the problems I have had so far...

 I partially followed the guide here:
http://www.macromedia.com/devnet/flash/articles/extending_components.html and
created a custom listbox item named FListBoxItem which extends
FSelectableItemClass. In the gui editor I put a spacer movie clip in to expand
the item to the height I require (probably not the best way to do this, but it
was quick and worked). I extended the code as in the guide above but without
the icon stuff with the happy/sad face. The display content function looks like
this:

FCustomItemClass.prototype.displayContent = function(itmObj, selected)
{
  super.displayContent(itmObj, selected);

  if (this.fLabel_mc.labelField.text != )
  {
this.createEmptyMovieClip(thumbnail_mc, 1000);
this.thumbnail_mc._x = 2;
this.thumbnail_mc._y = 2;
this.thumbnail_mc.loadMovie(test_thumb.jpg);
  }
}

 The if statement stops it displaying images in empty items.

 The problem is that this works fine in it's own .fla file, with a listbox and a
bit of code to add items. But when I transfer this to the existing project which
I need it for it doesn't work. Instead of the images being displayed there is
just blank space (don't know whether they are not visible or not loaded). I
have been debugging this for nearly two weeks now trying to get it to work, and
this is what I have found so far:

- The listbox in my project is using the FCustomItem and the code is identical,
no problems copying it over and no problems with the symbol registration.

-The code in the new displayContent is being executed, can check it with a
trace().

- The thumbnail_mc movieclip is being created (well at least I can trace its
properties, like .getDepth())

- The file test_thumb.jpg exists (although if someone could tell me how to make
sure of this programmatically it would help to confirm this).


 I have no idea what the problem is. The application it's going into has few
distictive features that would affect the listbox code. It is a forms based
application and the listbox is placed on a form (e.g. Form1) which is currently
displayed and everything else I have on there works fine (video conferencing
type stuff).

 I'm getting desperate here so any help/advice/thoughts are really appreciated.
I've only been using flash for a couple of months so I could well have missed
something obvious to you guys.


Cheers

Kev

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] export from SWF to a vector format (flash 8)

2006-01-05 Thread lists
Hi there - I was wondering if there was a way to export the contents of the 
stage to
some kind of vector format? I am not talking in the IDE, but from a movie 
running in the
flash 8 player.

IE - I am running a movie in a browser or flash player and want to have a 
button that
will save the contents as some kind of vector format (IE eps or something).

I am using flash 8.


Thanks in advance!

d



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Locate the UIComponent symbol

2005-11-30 Thread lists
Hi there - I am following the tutorial located at :
http://www.macromedia.com/devnet/flash/articles/footer_component_02.html

Now this is targeted towards flash mx 2004 and in the tutorial, there is a 
reference to:
-
In the StandardComponents library, navigate to the folder Flash UI Components 
2/Base Classes/FUIObject 
Subclasses. Locate the UIComponent symbol and also drag it into that frame 2 of 
the Assets layer.
-

Now in my flash 8 this does not exist - does anyone know where it might exist 
within flash 8?

Thanks in advance!

::
 Dustin 
::

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Locate the UIComponent symbol

2005-11-30 Thread lists
Yeah I found that - howeverthe pather they reference within that library does 
not seem to exist. I am going to 
double check - I can't be that blind can I?

Would it matter if i am on a Mac?



::
 Dustin
::


-- Original Message ---
From: JesterXL [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Wed, 30 Nov 2005 17:08:15 -0500
Subject: Re: [Flashcoders] Locate the UIComponent symbol

 C:\Program Files\Macromedia\Flash 
 8\en\Configuration\ComponentFLA\StandardComponents.fla
 
 - Original Message - 
 From: lists [EMAIL PROTECTED]
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Sent: Wednesday, November 30, 2005 5:04 PM
 Subject: [Flashcoders] Locate the UIComponent symbol
 
 Hi there - I am following the tutorial located at :
 http://www.macromedia.com/devnet/flash/articles/footer_component_02.html
 
 Now this is targeted towards flash mx 2004 and in the tutorial, there is a 
 reference to:
 -
 In the StandardComponents library, navigate to the folder Flash UI 
 Components 2/Base Classes/FUIObject
 Subclasses. Locate the UIComponent symbol and also drag it into that frame 2 
 of the Assets layer.
 -
 
 Now in my flash 8 this does not exist - does anyone know where it might 
 exist within flash 8?
 
 Thanks in advance!
 
 ::
  Dustin
 ::
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
--- End of Original Message ---

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Memory used by BitmapDatas

2005-11-14 Thread Apostille [LISTS]
Hello,

I try to know the memory used by bitmapdatas.

I found information here : http://mxdj.sys-con.com/read/142694_2.htm
But for me, there is an error in the computation.
They wrote 100x100 ARGB image = 400 ko

An ARVB image 100 x 100 = 10,000 pixels

1 channel = 256 decimal is  in binary , 8 bits
4 channels and 8 bits by channel , 4 * 8 = 32 bits
4 bytes = 32 bits and 1024 bytes = 1 kilobyte

ARVB image :

10,000 * 4 = 40,000 bytes( in mx journal , wrote 400,000. I think
it's an error )

40,000 / 1024 = 39,06

So 100x100 ARGB image = 40 ko in memory

Not 400 ko.

I'm newbie to this, someone can confirm this is 40 instead 400 ?

And an RVB bitmapdatas, without alpha.
10,000 * 3 = 30,000 bytes = 30 ko. Yes ?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] remove an attached movie?

2005-10-25 Thread lists
Hi there - I have some code in which I attach a movie from my library.

this.attachMovie(level1Mc, l1_mc, 10);

Now depending on button presses, there are other movies attached and replacing 
previous
ones... so what I am wondering, is there a way to clear a level? So for example 
when i
click a button, it clears any attached movies in level 10, etc?

Thanks!

::
 Dustin
::

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] imports available to entire flash file

2005-10-25 Thread lists

Is there a way to import certain classes for use throughout the entire flash 
file? Or do I need to import for each 
timeline?
::
 Dustin
::

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders