Re: [Flashcoders] AS3 ROLL_OVER or MOUSE_OVER ? Which one, and why ?

2007-09-08 Thread John VanHorn
http://www.kirupa.com/forum/showthread.php?p=1948052#post1948052


On 9/7/07, Patrick Matte|BLITZ [EMAIL PROTECTED] wrote:

 In the AS3 class MouseEvent, what is the use for ROLL_OVER and ROLL_OUT?

 They seem to be the same as MOUSE_OVER and MOUSE_OUT...

 ___
 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




-- 
John Van Horn
[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


Re: [Flashcoders] coding a world clock

2007-09-06 Thread John VanHorn
yes, the flash Date object provides all the necessary properties to
calculate the time for different time zones, but it still wont be accurate
if the user's clock is off.

for more accuracy, youll need to have the time from the server. this should
be simple to do with any server side language. in php, you can use the
date('U') function or the time() function, which will both give you the Unix
timestamp - the number of seconds that have passed since 12am January 1,
1970. you can pass that into your swf using flashvars. you can then create a
Date object based off of that value. just note that (in php, at least) the
value is seconds, and the flash Date object uses milliseconds. oh, and load
time of your swf may cause that to be off a little. if thats a problem, you
could store it in a javascript Date object, and then grab the value when
youre ready for it.


On 9/6/07, Marcelo Volmaro [EMAIL PROTECTED] wrote:

 I took that data from various sources. I'm using that for my own clock
 too, and also have a function that, taking a position (first, second,
 third, etc), a month and day can calculate the real date when a DST
 occurs (for example, you feed first Friday of may or last Monday of
 December and it returns the correct date for a specific year).

 I have a list of DST/Timezones per location, but did not converted to AS
 (I have some XML files). The problem is that the list is a big one,
 because the list is compromised of:
 a) Countries
 b) Regions
 c) States
 d) Cities.

 Usually, you can trim down the list a lot, since almost all cities in a
 country have the same TZ/DST, but that's not the case for the US. In fact,
 you have some cities on the same state that have different TZ.

 You can get the complete list from:

 http://www.isi.edu/~pan/SWBP/time-zone-note/time-zone-note.html

 The problem with that list is that the dates specified for the start/end
 of DST is that are tied to a specific year and usually you need to wait
 until someone updates that list... so I coded the following list that has
 all the info necessary to do the calcs:

 private static const dstPolicies:Object = {
 USADLS:new DstPolicy(1,0,4, -1,0,10),
 EUDLS:new DstPolicy(-1,0,3, -1,0,10),
 AU2003DLS:new DstPolicy(-1,0,10, -1,0,3),
 AUTDLS:new DstPolicy(1,1,10, -1,0,3),
 RUDLS:new DstPolicy(-1,0,3, -1,0,10),
 EGDLS:new DstPolicy(-1,5,4, -1,4,9),
 IRDLS:new DstPolicy(-1,6,3, -1,1,9),
 IQDLS:new DstPolicy(255, 1,4, 255, 1,10),
 ILDLS:new DstPolicy(-1,4,3, 1,4,10),
 JODLS:new DstPolicy(-1,3,3, -1,4,10),
 NADLS:new DstPolicy(1,0,9, 1,0,4),
 PKDLS:new DstPolicy(1,6,4, 1,6,10),
 SYDLS:new DstPolicy(255,30,3, 255,21,9),
 CLDLS:new DstPolicy(2,0,10, 2,0,3),
 CLEDLS:new DstPolicy(2,5,10, 2,6,3),
 NZDLS:new DstPolicy(1,0,10, 3,0,3),
 PYDLS:new DstPolicy(1,0,9, 1,0,4),
 FKDLS:new DstPolicy(1,0,9, -1,0,4)
 };

 Where the first number is the position (1: first, -1:last, 255: straight
 date), the second and the third are the day/month.
 If the position is 255, the date is a straight day/month date, so for
 example for IRAQ the start date is April 1.

 The formulas for the calcs are:

 /**
  * @param y:int Year
  * @param m:int Month (0 - 11)
  * @param n:int Day of the week (0 for a Sunday, 1 for a
 Monday, 2 for a
 Tuesday, etc)
  * @param w:int Occurence (1:first, 2:second, 3:third,
 4:fourth, -1:last)
  * @return real day of the month where the DST starts/ends
  *
  * first friday = w:1, n:5
  * third monday = w:3, n:1
  * last monday = w:-1, n:1
  */

 private static function calcStartEnd(y:int, m:int, n:int,
 w:int):int{
 if (w  0){
 var nd:Number = (new Date(y, m,
 0)).getDate();
 var diff:Number = (getDayOfWeek(y, m+1,
 nd) - n) % 7;
 if (diff  0) diff += 7;
 return nd-diff;
 }

 var nq:int = 7 * w - 6 + (n - getDayOfWeek(y, m+1,
 1)) % 7;
 if (nq  1) nq += 7;

 return nq;
 }

 /**
  * @param y:int Year
  * @param m:int Month (1 - 12)
  * @param d:int Day (1 - 31)
  * @return 0 for a Sunday, 1 for a Monday, 2 for a
 Tuesday, etc.
  */

   

Re: [Flashcoders] PreLoading Multiple SWFs

2007-08-16 Thread John VanHorn
http://www.betriebsraum.de/blog/downloads

check out the QueueLoader class at the bottom of the page.

On 8/16/07, Shawn Steward [EMAIL PROTECTED] wrote:

 I'm working on a flash presentation that is quite lengthy that ends up
 around 16 megs.  It is about 20 minutes long.  It is broken up into
 about 100 separate swf files, and I am trying to preload them ahead of
 time while the main piece is running.  I have it preloading all the
 files how I want but they all play right away.  How can I prelaod them
 in the background without them playing until I want them to?

 Thanks,
 Shawn
 ___
 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




-- 
John Van Horn
[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


Re: [Flashcoders] Tips and advice for online bugtracking

2007-07-10 Thread John VanHorn

works in IDE, but not on server usually = security/crossdomain issue, or
path issue. look for 404's using servicecapture.

essential debug tools:
flashtracer - links above
servicecapture - http://kevinlangdon.com/serviceCapture/

On 7/10/07, Marcelo Wolfgang [EMAIL PROTECTED] wrote:


Hi all,

I have the type of problem I hate the most when developing flash. My swf
works fine locally, but it doesn't work at all on the web. And I'm about
as clueless one can be about debuggin this kind of problem.
So... can anyone spare some advices?

TIA
Marcelo Wolfgang
___
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





--
John Van Horn
[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


Re: [Flashcoders] attachMovie from library - fails to work with preloader

2007-06-16 Thread John VanHorn

you must force those movieclips to load before you use have access to them.
what i usually do is to set the export frame for classes to 2, and then go
through the library and uncheck 'export in first frame' for all exported
Mc's. then, on frame 2, make a single key frame and place an instance of all
exported mc's on the stage, but out of view. in frame 1, i'll have a stop
action and preloader code, and when all is loaded, gotoAndPlay frame 3.

On 6/16/07, Alexander Farber [EMAIL PROTECTED] wrote:


Dear flash coders,

I've created a class representing playing
cards and it works quite well for me:

  http://preferans.de/flash/Card.as
  http://preferans.de/flash/Card.fla

To reduce the file size (from 300K to 120K),
I don't keep images of complete 32 cards in
the library, but instead I hold the 4 suit images
(spades, hearts, clubs, diamonds) and
4 x 3 pictures (jack, queen and king) there
and then create a card image on the fly:

public function set index(n:Number):Void {
__index = n;

pic_mc = this.createEmptyMovieClip('pic_mc', 10);

var depth:Number = 10;
var rank:Number = CARDS[n].rank;
var suit:Number = CARDS[n].suit;
var color:String = suit  DIAMONDS ? 'Black' : 'Red';

var eye:String = (UNKNOWN == rank ||
(JACK = rank  rank = KING)) ?
CARDS[n].label : eye = SUITS[suit];
for (var key:String in EYE_POS[rank]) {
var pos_obj:Object = EYE_POS[rank][key];
pic_mc.attachMovie(eye,
eye + depth + '_mc', depth++, pos_obj);
}
// ...and so on: attach 2 card indices in the corners
  }

Those suits and jack-queen-king images are all
MovieClips in the library, with the following settings:

Identifier: Hearts
Class:
Export for ActionScript [X]
Export for runtime sharing [_]
Export in first frame [X]

My problem is that when I'm trying to postpone loading
those MovieClips by unchecking the Export in 1st frame
and by setting File-Publish Settings...-Flash-
ActionScript 2.0-Settings...-Export Frame for Classes
to 2 or 10, then my movie stops working: the cards are
empty, no suits and no jack-queen-kings are shown.

Also my preloader TextField only show ups shortly :-(

Does it make any sense to convert the MovieClips
to Graphics in the library? The Export in 1st frame
check box is (sometimes???) greyed out then...

Thank you
Alex

PS: Here is the code from my Actions layer (to be
  found in http://preferans.de/flash/Card.fla )

stop();

var depth:Number = 10;

var load_txt:TextField = this.createTextField('load_txt',
depth++, Stage.width / 2, Stage.height / 2, 300, 100);

onEnterFrame = function() {
var loaded:Number = getBytesLoaded();
var total:Number = getBytesTotal();

load_txt.text = loaded + ' / ' + total;

if (loaded = total  loaded  100) {
delete onEnterFrame;
gotoAndPlay('MAIN');
}
};

 And in the frame MAIN ///

stop();

load_txt._visible = false;

for (var i:Number = 0; i  Card.CARDS.length; i++) {
var card_mc:MovieClip = this.attachMovie('Card', 'card' + i +
'_mc', depth++);
with (card_mc) {
index = i;
_x = card_mc._width / 2 +
Math.floor(Math.random() * (Stage.width -
card_mc._width));
_y = card_mc._height / 2 +
Math.floor(Math.random() * (Stage.height -
card_mc._height));
_rotation = Math.floor(Math.random() * 9 - 4);

addEventListener('clicked', this);
}
}

function clicked(evt_obj:Object):Void {
var card_mc:MovieClip = evt_obj.target;

// put the clicked card at the top
card_mc.swapDepths(depth++);
}
___
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





--
John Van Horn
[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] different _global objects?

2007-06-15 Thread John VanHorn

I have encountered a situtation (in as2) where a loaded swf cannot access a
class in the loading swf. the situation is like this:

swfA contains class:
class MyClass extends MovieClip{

public static function getText():String{
return some text;
}

}

swfA _root:
System.security.allowDomain(*);
trace(MyClass.getText());  //some text
trace(MyClass)  // [type Function]


swfA then loads swfB from another domain

swfB contains code:
trace(MyClass.getText());  //undefined
trace(MyClass);  //undefined
trace(_global.MyClass)  //undefined


any ideas whats going on?

--
John Van Horn
[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


Re: [Flashcoders] Accessing all properties in an object ...

2007-03-28 Thread John VanHorn

theres one included in the mx package:

import mx.data.binding.ObjectDumper;

trace(ObjectDumper.toString(myObject));

On 3/28/07, Stephen Ford [EMAIL PROTECTED] wrote:


Anyone have a small script they use when they want to trace out both the
name and values of all properties in an object. I'm sure I've done this
before, but can't recall at the moment (I'm half asleep this morning).
Something building on:var oObject:Object = {};for (var props in oObject) {
trace(oObject[props]);
}Thanks.___
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





--
John Van Horn
[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


Re: [Flashcoders] Dragging a clip gives erratic ._x numbers

2007-02-28 Thread John VanHorn

this seems to be tied to using a mouse listener. onMouseMove is not
synchronous with the frame rate, so it can fire more than once in between
framesthat being said, it still doesnt make sense that the _x seemingly
increases if you drag left.

if you use good ole onEnterFrame, everything works fine.

On 2/28/07, Paul Hoza [EMAIL PROTECTED] wrote:



Thanks for the reply... I tried what you're suggesting and still see the
problem.  I decided to make a quick example to see if anyone can see a
problem in what I'm doing (and a demonstration of said funkiness.)  This
is out of context, so I think it's working okay as a demo.  The code is
included in case it sheds any light... the sample is pulled right out of
my app, so it's the same controller I'm using (out of context, so there
were tweaks to get it working standalone.)



http://www.gamedevschool.com/samples/flashcoders/dragproblems/dragproblems.html

Code:


http://www.gamedevschool.com/samples/flashcoders/dragproblems/dragproblems.zip


Thanks for any more insights!

Paul



Mick G wrote:
 Perhaps it's doing some rounding because your mouse is sitting on half
 pixels and it's not noticeable to the eye (if that's even possible).
 Have
 you tried putting a Math.ceil around the _x values to see if it helps
 always
 round the value up?



 On 2/28/07, David Cohn [EMAIL PROTECTED] wrote:

 Paul,

 I know it's no help, but I recently ran into this also and never
 found a workaround...

 I'd love to know if you find one!

 --Dave




  Heya folks,
 
  This is baffling me (and making me very annoyed), and I haven't
  found an
  answer elsewhere, so here goes...
 
  I have a main movie with a custom drag scrubber control.  At the
  core
  of my app (Flash 8 Pro) is this scrubber that needs to simply
  return its
  position so I can use it to display the proper frame of a movie clip
  (with many frames).
 
  Problem is that dragging the scrubber in one direction very slowly
  will
  frequently get erratic and NOT just increase or decrease relevant
  to the
  drag direction.  Now, I originally thought it could be poor rounding
  math code on my part, but I finally put a text counter on the screen
  that simply displays the value of mcTheMovieClip._x which is the
  dragged clip.  Here's what I mean by erratic:
 
  Dragging from left to right, ._x reports:
  ..101, 102, 101, 102, 103, 104, ..
 
  What the friggin' poo??  What exactly causes a dragged movie clip to
  jump back/forth a pixel or two?  It's making an accurate,
consistently
  one-directional drag behavior to be roughly impossible!
 
  I'm miffed, but hopefully somebody has a clue on this and would be so
  kind as to throw down some helpful bits.
 
  Thanks!
  Paul Hoza

 ___
 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





--
John Van Horn
[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


Re: [Flashcoders] Dragging a clip gives erratic ._x numbers

2007-02-28 Thread John VanHorn

here, i set the frame rate to 1, and tried to move the mouse 1 px persecond.
i added traces for everything on both enterframe and mousemove events. you
can start to see the asychronicity between setting the text and redrawing
the stage:

onEnterFrame
mc._x: 3.45
_xmouse: 149
text: 4

   onMouseMove
   mc._x: 3.45
   _xmouse: 150
   text: 4

onEnterFrame
mc._x: 4.45
_xmouse: 150
text: 4

onEnterFrame
mc._x: 4.45
_xmouse: 150
text: 4

   onMouseMove
   mc._x: 4.45
   _xmouse: 149
   text: 5

onEnterFrame
mc._x: 3.45
_xmouse: 149
text: 5

On 2/28/07, Alain Rousseau [EMAIL PROTECTED] wrote:


onEnterFrame didn't give any better results either, it was definitely a
case of how fast can Flash grab the exact _x postion when the button is
released and the listener removed (or onEnterFrame deleted). Can't quite
understand the logic of the sequence or timing, but it's definitely a
case of asynchronous function call.

John VanHorn wrote:
 this seems to be tied to using a mouse listener. onMouseMove is not
 synchronous with the frame rate, so it can fire more than once in
between
 framesthat being said, it still doesnt make sense that the _x
 seemingly
 increases if you drag left.

 if you use good ole onEnterFrame, everything works fine.

 On 2/28/07, Paul Hoza [EMAIL PROTECTED] wrote:


 Thanks for the reply... I tried what you're suggesting and still see
the
 problem.  I decided to make a quick example to see if anyone can see a
 problem in what I'm doing (and a demonstration of said
funkiness.)  This
 is out of context, so I think it's working okay as a demo.  The code is
 included in case it sheds any light... the sample is pulled right out
of
 my app, so it's the same controller I'm using (out of context, so there
 were tweaks to get it working standalone.)




http://www.gamedevschool.com/samples/flashcoders/dragproblems/dragproblems.html


 Code:



http://www.gamedevschool.com/samples/flashcoders/dragproblems/dragproblems.zip



 Thanks for any more insights!

 Paul



 Mick G wrote:
  Perhaps it's doing some rounding because your mouse is sitting on
half
  pixels and it's not noticeable to the eye (if that's even possible).
  Have
  you tried putting a Math.ceil around the _x values to see if it helps
  always
  round the value up?
 
 
 
  On 2/28/07, David Cohn [EMAIL PROTECTED] wrote:
 
  Paul,
 
  I know it's no help, but I recently ran into this also and never
  found a workaround...
 
  I'd love to know if you find one!
 
  --Dave
 
 
 
 
   Heya folks,
  
   This is baffling me (and making me very annoyed), and I haven't
   found an
   answer elsewhere, so here goes...
  
   I have a main movie with a custom drag scrubber control.  At the
   core
   of my app (Flash 8 Pro) is this scrubber that needs to simply
   return its
   position so I can use it to display the proper frame of a movie
 clip
   (with many frames).
  
   Problem is that dragging the scrubber in one direction very slowly
   will
   frequently get erratic and NOT just increase or decrease relevant
   to the
   drag direction.  Now, I originally thought it could be poor
 rounding
   math code on my part, but I finally put a text counter on the
 screen
   that simply displays the value of mcTheMovieClip._x which is the
   dragged clip.  Here's what I mean by erratic:
  
   Dragging from left to right, ._x reports:
   ..101, 102, 101, 102, 103, 104, ..
  
   What the friggin' poo??  What exactly causes a dragged movie
 clip to
   jump back/forth a pixel or two?  It's making an accurate,
 consistently
   one-directional drag behavior to be roughly impossible!
  
   I'm miffed, but hopefully somebody has a clue on this and would
 be so
   kind as to throw down some helpful bits.
  
   Thanks!
   Paul Hoza
 
  ___
  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@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo

Re: [Flashcoders] onLoadComplete, but no onLoadInit

2007-02-14 Thread John VanHorn

this problem has been discussed before. is this what youre referring to?

http://chattyfig.figleaf.com/pipermail/flashcoders/2006-August/171681.html

seems that MovieClipLoader events do not fire correctly when content is
loaded from cache. if this is your problem, would appended a cache-killing
query string to the url work? something like:

mcl.loadclip(someswf.swf?d= + new Date().valueOf(),
 targetMc
 );


On 2/14/07, T. Michael Keesey [EMAIL PROTECTED] wrote:


I thought I saw this discussed recently, but I couldn't find it in the
archives. Apologies if I'm repeating something.

Has anyone ever had a situation using MovieClipLoader where, when
loading a SWF, the onLoadComplete handler gets called but the
onLoadInit handler does? I've verified that the actions on the first
frame (a component initializing) are being called, but onLoadInit
never happens.

TIA,
--
T. Michael Keesey
Director of Technology
Exopolis, Inc.
2894 Rowena Avenue Ste. B
Los Angeles, California 90039
___
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





--
John Van Horn
[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


Re: [Flashcoders] adding nbsp; in html enabled text field

2007-02-07 Thread John VanHorn

try #160; which is the unicode value i believe(?)

On 2/7/07, Matthew Ganz [EMAIL PROTECTED] wrote:


hi.

i didn't find a concrete solution in the archives so am asking here. i
have an html-enabled text field with a var reference. the var is a string
that i want to add nbsp;'s to. has anyone figured out a solution to this?

any helpful tips are greatly appreciated.

thank you. -- matt.
___
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





--
John Van Horn
[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


Re: [Flashcoders] adding nbsp; in html enabled text field

2007-02-07 Thread John VanHorn

try without the var reference. set the htmlText property of the text field
instead.

On 2/7/07, Matthew Ganz [EMAIL PROTECTED] wrote:


unfortunately, that isn't working either.  i've tried not embedding the
fonts (as i read from the archives), adding a space plus a period, i.e. 
.
in the include these characters field (also from the archives) and still
not getting the result i want.


- Original Message -
From: Keith Reinfeld [EMAIL PROTECTED]
To: 'Flashcoders mailing list' flashcoders@chattyfig.figleaf.com
Sent: Wednesday, February 07, 2007 2:46 PM
Subject: RE: [Flashcoders] adding nbsp; in html enabled text field


 Doesn't it work to just:

 htmlString += nbsp;;

 ???

 -Keith
 http://keithreinfeld.home.comcast.net



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Matthew
 Ganz
 Sent: Wednesday, February 07, 2007 1:41 PM
 To: Flashcoders mailing list
 Subject: [Flashcoders] adding nbsp; in html enabled text field

 hi.

 i didn't find a concrete solution in the archives so am asking here. i
 have
 an html-enabled text field with a var reference. the var is a string
that
 i
 want to add nbsp;'s to. has anyone figured out a solution to this?

 any helpful tips are greatly appreciated.

 thank you. -- matt.
 ___
 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





--
John Van Horn
[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


Re: [Flashcoders] Detecting mouse events over non-white parts of a movieClip

2007-02-07 Thread John VanHorn

cant you just use hitArea and make a transparent vector shape hit state
for each visual element?

On 2/7/07, Dave Wood [EMAIL PROTECTED] wrote:


Hi

I need to detect mouse events on a movieclip's non-white content
rather than it's bounding rectangle even where the contents are
bitmap based.

I'm putting together an activity for kids where they create a piece
of art by dragging and dropping visual elements onto their canvas,
then they can subsequently select these elements to move them, resize
them, rotate, delete them etc.

The user must be able to accurately select these elements even when
they are overlapping – so long as a movieClip is partially visible,
it needs to be selectable. The problem of course is that the
movieClips are responding to mouse events as soon as the mouse enters
their bounding rectangle.

The items they drag are sourced from photographic material and need
to remain as bitmap–based movieClips. They are a collection of
everyday items: fruit, plants, vehicles, people etc and currently
they are imported as PNGs with an alpha channel.

One option would be to make a vector graphic version of every single
graphic, have that layered behind in each clip and have that detect
the mouse events – but what a pain! There has to be a simpler way?

I guess I need seomething like a background transparent blending mode
– but there isn't one:(

I'm sure others have tackled this problem. Anyone?

David


  ___
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





--
John Van Horn
[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


Re: [Flashcoders] Detecting mouse events over non-white parts of a movieClip

2007-02-07 Thread John VanHorn

oki just realized you said that would be a pain in your original
message. sorry...i am tired.

how many elements do you have? a hitArea for each one does seem like a
simpler way to goor maybe i'm just tired.

On 2/7/07, John VanHorn [EMAIL PROTECTED] wrote:


cant you just use hitArea and make a transparent vector shape hit state
for each visual element?

On 2/7/07, Dave Wood  [EMAIL PROTECTED] wrote:

 Hi

 I need to detect mouse events on a movieclip's non-white content
 rather than it's bounding rectangle even where the contents are
 bitmap based.

 I'm putting together an activity for kids where they create a piece
 of art by dragging and dropping visual elements onto their canvas,
 then they can subsequently select these elements to move them, resize
 them, rotate, delete them etc.

 The user must be able to accurately select these elements even when
 they are overlapping – so long as a movieClip is partially visible,
 it needs to be selectable. The problem of course is that the
 movieClips are responding to mouse events as soon as the mouse enters
 their bounding rectangle.

 The items they drag are sourced from photographic material and need
 to remain as bitmap–based movieClips. They are a collection of
 everyday items: fruit, plants, vehicles, people etc and currently
 they are imported as PNGs with an alpha channel.

 One option would be to make a vector graphic version of every single
 graphic, have that layered behind in each clip and have that detect
 the mouse events – but what a pain! There has to be a simpler way?

 I guess I need seomething like a background transparent blending mode
 – but there isn't one:(

 I'm sure others have tackled this problem. Anyone?

 David


   ___
 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




--
John Van Horn
[EMAIL PROTECTED]





--
John Van Horn
[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


Re: [Flashcoders] how to tell if you're running in the ide

2007-01-25 Thread John VanHorn

check the help docs. for as2, look for System.capabilities.playerType. for
as3 check flash.system.Capabilities.playerType.


On 1/25/07, Josh Santangelo [EMAIL PROTECTED] wrote:


Is there a way for a SWF to know if it's running in the test movie
environment vs the browser or standalone players? I often have a need
to compile in different settings in test-movie than I do for
deployment, and have to manually remember to take them out before
shipping a build. Or is there a more elegant way to handle that sort
of thing?

-josh
___
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





--
John Van Horn
[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


Re: [Flashcoders] ExternalInterface.call - javascript error

2007-01-23 Thread John VanHorn

also, make sure that the id/name of the object/embed tag is unique in the
dom. id conflicts between two elements will give you this error, too. how
are you embedding your swf? object/embed tags? swfobject?

On 1/23/07, Nick Zotta [EMAIL PROTECTED] wrote:


Hello flashcoders,

Does anyone know the cause of the javascript error: Object doesn't
support this property or method when using ExternalInterface.call()
to comunicate between Flash and Javascript?  My javascript function is
triggered, but before executing its actions, a javascript error popup
appears with the message :Object doesn't support this property or
method. Even if the javascript function is blank (nothing to
execute), the javascript error still appears.
No javascript error in Firefox or Opera, but only in IE (6 and 7).
I get this error both locally and on the webserver.
All the tests were made with FlashPlayer 9.

Thanks a lot,

Nick
___
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





--
John Van Horn
[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


Re: [Flashcoders] FLASH REMOTING HELP!!!

2007-01-18 Thread John VanHorn

yes i can...

http://kevinlangdon.com/serviceCapture/

On 1/18/07, [p e r c e p t i c o n] [EMAIL PROTECTED] wrote:


I've been struggling with this all week and really need some help...

i'm trying to call a method in a servlet (java) and can't seen to call
that
method nor get a response back into flashi know it can be done, but
don't know the nuances of remoting enough to pull it off...can anyone
point
me in the right direction?

thanks in advance
___
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





--
John Van Horn
[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


Re: [Flashcoders] Attaching bitmap data to arbitary coords

2006-12-14 Thread John VanHorn

http://chattyfig.figleaf.com/pipermail/flashcoders/2006-July/169819.html

On 12/12/06, Mike Mountain [EMAIL PROTECTED] wrote:


Charles

I'm well aware of both those methods, but they still won't let you
position the bitmap data anywhere other than with the registration point
at TL or positively offset from the TL.

Cheers

M

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf
 Of Charles Parcell
 Sent: 11 December 2006 17:30
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Attaching bitmap data to arbitary coords

 You can of course use copyPixels() as well.

 http://livedocs.macromedia.com/flash/8/main/1948.html

 Charles P.


 On 12/11/06, Charles Parcell [EMAIL PROTECTED] wrote:
 
  Yeah, I think you are looking for the draw() method of BitmapData.
 
  http://livedocs.macromedia.com/flash/8/main/1950.html
 
  See the comments as well.
 
  Charles P.
 
 
 
  On 12/10/06, Martin Jonasson [EMAIL PROTECTED] wrote:
  
   This is what i use in i a project of mine:
  
   var myMatrix:Matrix = new Matrix();
   myMatrix.rotate(clip._rotation * 0.0174532925199433); var
   translateMatrix:Matrix = new Matrix();
   translateMatrix.translate(clip._x, clip._y);
   myMatrix.concat(translateMatrix);
 myBitmapData2.draw(clip, myMatrix)
  
   (this is stolen straight from my code, with nothing added
 to make it
   more understandable, but it should be rather self explanatory)
  
  
   Mike Mountain skrev:
Consider the following, Flash 8:
   
var w=200
var h=200
holder=this.createEmptyMovieClip (bmp1,
this.getNextHighestDepth()); var bmpData1:BitmapData = new
BitmapData(w, h, true, 0x);
 bmp1.attachBitmap(bmpData1, 2,
auto, true);
   
This will attach the bitmapdata so it's top left is situated at
the
   reg
point of the mc, how do I attach it, or later move it
 so the reg
point of the MC is situated at any point I wish,
 without using nested MC's?
   
The problem being I want to make an exact bitmap copy of the
contents
   of
an MC, which could have it reg point set anywhere - and
 I want the
new copy to inherit the same registration point, but
 like I said
before - without having to resort to nested MC's -
 surely this is
possible and I'm missing something blindingly obvious?
   
Cheers
   
M
   
___
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@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





--
John Van Horn
[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


Re: [Flashcoders] RE: swf and referring domain

2006-11-16 Thread John VanHorn

the allowScriptAccess attribute of the embed tag can be set to never or
always. if its never, you can write all the javascript you want, but it
wont get called. i see embeds with both always and never on myspace
pages. im guessing that any third party swfs will be set to never.if
thats the case, a javascript-from-flash solution wont work. i also see that
the embeds of third party swfs have flashvars in them. talk to myspace - if
that is the destination - and see if they will pass in the domain as a
flashvar.

On 11/16/06, Dave Segal [EMAIL PROTECTED] wrote:



Thanks for the response Joey. I actually tried a similar method before
that
almost worked. From Flash I did this -

getURL(javascript:document.mySWF.SetVariable('referringDomain',
document.loc
ation.host));

The problem I ran into was that in IE as soon as this line executes the
page
stops rendering. This is especially problematic when the swf begins before
the page is done loading. The page never completes. Also, several sites I
am
targeting, like mySpace, restrict javascript. I'm not sure what would
happen
if I tried writing javascript at runtime to a mySpace page.


___
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





--
John Van Horn
[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


Re: [Flashcoders] Weird movie corruption

2006-11-14 Thread John VanHorn

ive found that when i use ExternalInterface to call a JS alert, that my
movie will often hang.  I get the JS alert like i should, no JS errorsit
just locks up the swf. without having the time to dig deeper, i found a
quick fix, and called the alert with a setTimeout, like this:

ExternalInterface.call(setTimeout, alert('+someAlertString+'), 50);

if i remember correctly, though, it was kinda picky about how i passed that
2nd param. i may have concatenated that 2nd param in a string on the line
before and passed that string, or i may have passed the alert string as a
4th param.i dont remember. i do remember that calling alert through
setTimeout solved the problem though.

On 11/14/06, Chris Akins [EMAIL PROTECTED] wrote:


Greetings, all. I've been working on an interactive quiz for a while now,
and it's working correctly, except that some parts of it break after
making
a call to any JavaScript function. I've been trying fruitlessly to debug
this for a small eternity now, and I've finally run out of ideas.
Could someone try to reproduce this effect? I've been able to reproduce
the
bug (?) with the following setup:

The components are a button symbol and three movie clips. One movie clip
has
three frames with a static graphic on each frame; each frame has a stop()
statement on it, and nothing else. Attached to it at the root level is
onClipEvent(enterFrame){
this._x=_root._xmouse;
this._y=_root._ymouse;
}
This clip should be named 'pointer', and reside alone on the top layer.
The second movie clip has the following code attached to it:
onClipEvent(load){
onRollOver=function(){
Mouse.hide();
_root.pointer.gotoAndPlay(2);
}
onRollOut=function(){
Mouse.show();
_root.pointer.gotoAndPlay(1);
}
}
The third and final movie clip has the same code attached to it, save that
its onRollOver send the pointer clip to frame 3, rather than frame 2.
The button has the following code attached to it:
on(release){
flash.external.ExternalInterface.call(alert, alert called);
}

After clicking the button and thereby making the JS call, the pointer clip
stops following the system mouse movements. I've seen this behavior using
both fscommand and ExternalInterface, exporting for Flash Player 6 and 8.
The consistency makes me believe either that it's a bug in the way that
Flash handles calls to JavaScript, or that it's a really really basic
error
in my AS.

Many Thanks,
Chris Akins
___
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





--
John Van Horn
[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


Re: [Flashcoders] am i stupid?

2006-11-09 Thread John VanHorn

ive made sure there was content - movieclips and shapes - on the root when i
have tried this...nothing worksand _root.useHandCursor seems to be
ignored also.

On 11/9/06, Matthias Dittgen [EMAIL PROTECTED] wrote:


You probably just need some content in your _root!
onPress, onRelease etc. do only work if the mouse is over some content
of the MovieClip, even of _root.
For better understanding: If you have a filled circle as movieClip,
onPress events work only within the circle, not in the corners of
its bounding rectangle box. So onPress is working on _root only, if it
has some content you can click on.

you should see a handcursor above clickable movieclip instances or
even _root, when you set _root.useHandCursor = true (default).

hth,
Matthias

2006/11/9, John VanHorn [EMAIL PROTECTED]:
 i know it doesnt make any sense to use onPress on the root because of
 children, and nested mc's, its just something i ran into today. i was
 debugging something, and i arbitrarily chose _root.onPress to fire off a
 trace. when that didnt work, i figured out that _root.onPress was being
 ignored.

 what makes no sense, is that _root IS a movie clip.or so i thought
it is
 supposed to beit at least acts like one and has all the methods and
 properties of a MovieClip.

 trace(_root instanceof MovieClip) //traces true

 and heres something else i tried:
 in a new flash document, on the root timeline, i put:

 this.onPress = function(){
trace(this);
 }

 published, and nothing happened. i then created another new document,
made
 an empty movie clip and loaded the other movie with the code above, and
it
 workedthe onPress was being assigned to that movie.

 it just seems weird to me that onPress is a property of the movieclip
class,
 but just doesnt seem to work with the _root movieclip.

 On 11/8/06, Reuben Stanton [EMAIL PROTECTED] wrote:
 
  I think the explanation stated that _root is not in fact a MovieClip
  in the same sense. onMouseDown works because it fires globally in
  response to the mouse, not because _root is a MovieClip.
 
  Can I ask, why do you need to use onPress and onRelease on _root
  anyway? Is there some other solution? If you use a release handler on
  _root it will make the release handlers on all nested MovieClips
  inaccessible which seems like a bad way to go to me...
 
 
  On 09/11/2006, at 3:19 PM, John VanHorn wrote:
 
   no, no.
   i totally understand the difference between onMouseDown and onPress
   for
   movieclips. i am saying only one works when placed on the root. the
   player
   seems to ignore _root.onPress or _root.onRelease.which makes no
   sense to
   me because it is a movieclip and the events will work when assigned
   to any
   other movie clip. even using a mouse listener does not work. i even
   tried
   setting the hitArea of the root, but to no evail. when the stage is
   clicked,
   onPress and onRelease will not fire. you dont even get a hand
cursor.
 
  ___
  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
 



 --
 John Van Horn
 [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





--
John Van Horn
[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


Re: [Flashcoders] Grabbing data directly from the HTML page

2006-11-09 Thread John VanHorn

ryan's solution would be the easiest thing to dojust load the page in as
xml. if you're using flash8, you can use the idMap to grab the node that the
swfObject overwrites.

On 11/9/06, Ryan Potter [EMAIL PROTECTED] wrote:


Not sure how complicated your html page is, but I have been playing with
the same idea but going at it a different way.  I just loaded the entire
page in as xml.  As long as the page is valid xhtml it works great.  I
realize it doesn't exactly answer your sgml question, but it should get
you
the same effect and it doesn't rewrite your code.  Then you can either go
directly to the node or use xpath to navigate to it.

Just a thought.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike
Keesey
Sent: Thursday, November 09, 2006 12:24 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Grabbing data directly from the HTML page

I was playing around with the idea of passing data from an HTML page
directly into a Flash movie via Javascript/SWFObject. One thing I wanted
to try was sending the text that SWFObject replaces into the Flash
movie.

In Firefox this was pretty simple. E.g., if SWFObject was replacing the
contents of div id=flash-content.../div, then all that was needed
was something in the Javascript code like:

var swfObj = new SWFObject(parameters);
swfObj.addVariable(HTML_flashContent, escape('div
id=flash-content' +
document.getElementById(flash-content).innerHTML.toString() +
/div));

Then, in Flash, the root variable HTML_flashContent can be parsed into
an XML object. This has obvious benefits for search engine optimization,
as well as making it so a Flash and non-Flash version of a page can be
the exact same file.

Unfortunately, though, Internet Explorer and Safari return SGML, not
XHTML, for the innerHTML property (e.g., the above div tag gets
converted to DIV id=flash-content.../DIV in IE). I made a
quick-and-dirty SGML to XHTML conversion tool to get around this, and it
seems to work so far.

My question is, has anybody else made an SGML to XHTML conversion tool
in ActionScript, or should I continue to refine mine and offer it for
public use when done?
―
T. Michael Keesey
Director of Technology
Exopolis, Inc.
2894 Rowena Ave. Ste. B
Los Angeles, California 90039


___
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





--
John Van Horn
[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

Re: [Flashcoders] Grabbing data directly from the HTML page

2006-11-09 Thread John VanHorn

i think you misunderstood the suggestion. you can load the page in as xml in
flash, just like loading in any other xml. i would change your swfObject
javascript to pass in the location of the page:

//javascript
swfObj.addVariable(loc, location.href);

and then load that as xml in flash:

//actionscript
var xml:XML = new XML();
xml.load(loc)


On 11/9/06, Mike Keesey [EMAIL PROTECTED] wrote:


That sounds *much* nicer--how do you grab the whole XHTML page in
Javascript?
―
Mike Keesey

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Ryan Potter
 Sent: Thursday, November 09, 2006 11:39 AM
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Grabbing data directly from the HTML page

 Not sure how complicated your html page is, but I have been playing
with
 the same idea but going at it a different way.  I just loaded the
entire
 page in as xml.  As long as the page is valid xhtml it works great.  I
 realize it doesn't exactly answer your sgml question, but it should
get
 you
 the same effect and it doesn't rewrite your code.  Then you can either
go
 directly to the node or use xpath to navigate to it.

 Just a thought.


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Mike
 Keesey
 Sent: Thursday, November 09, 2006 12:24 PM
 To: flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] Grabbing data directly from the HTML page

 I was playing around with the idea of passing data from an HTML page
 directly into a Flash movie via Javascript/SWFObject. One thing I
wanted
 to try was sending the text that SWFObject replaces into the Flash
 movie.

 In Firefox this was pretty simple. E.g., if SWFObject was replacing
the
 contents of div id=flash-content.../div, then all that was
needed
 was something in the Javascript code like:

 var swfObj = new SWFObject(parameters);
 swfObj.addVariable(HTML_flashContent, escape('div
 id=flash-content' +
 document.getElementById(flash-content).innerHTML.toString() +
 /div));

 Then, in Flash, the root variable HTML_flashContent can be parsed into
 an XML object. This has obvious benefits for search engine
optimization,
 as well as making it so a Flash and non-Flash version of a page can be
 the exact same file.

 Unfortunately, though, Internet Explorer and Safari return SGML, not
 XHTML, for the innerHTML property (e.g., the above div tag gets
 converted to DIV id=flash-content.../DIV in IE). I made a
 quick-and-dirty SGML to XHTML conversion tool to get around this, and
it
 seems to work so far.

 My question is, has anybody else made an SGML to XHTML conversion tool
 in ActionScript, or should I continue to refine mine and offer it for
 public use when done?
 ―
 T. Michael Keesey
 Director of Technology
 Exopolis, Inc.
 2894 Rowena Ave. Ste. B
 Los Angeles, California 90039


 ___
 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





--
John Van Horn
[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] am i stupid?

2006-11-08 Thread John VanHorn

on the root timeline:

this.onPress = function(){
  trace(this);
}

does not work? the _root/_level0 movie does not take onPress or onRelease?
other events like onMouseMove or onEnterFrame work finewhy not onPress?
how have i not run into this before?

--
John Van Horn
[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


Re: [Flashcoders] am i stupid?

2006-11-08 Thread John VanHorn

onMouseDown works fine.which got me to thinking that when your on the
root, onMouseDown and onPress are essentially the same event, since your
mouse is always over the root. that makes sense.

but, at least to me, it doesnt make sense that one works and the other one
doesnt.

On 11/8/06, Carl Welch [EMAIL PROTECTED] wrote:


what about onMouseDown?


--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819

On 11/8/06, John VanHorn [EMAIL PROTECTED] wrote:
 on the root timeline:

 this.onPress = function(){
   trace(this);
 }

 does not work? the _root/_level0 movie does not take onPress or
onRelease?
 other events like onMouseMove or onEnterFrame work finewhy not
onPress?
 how have i not run into this before?

 --
 John Van Horn
 [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





--
John Van Horn
[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


Re: [Flashcoders] am i stupid?

2006-11-08 Thread John VanHorn

no, no.
i totally understand the difference between onMouseDown and onPress for
movieclips. i am saying only one works when placed on the root. the player
seems to ignore _root.onPress or _root.onRelease.which makes no sense to
me because it is a movieclip and the events will work when assigned to any
other movie clip. even using a mouse listener does not work. i even tried
setting the hitArea of the root, but to no evail. when the stage is clicked,
onPress and onRelease will not fire. you dont even get a hand cursor.

On 11/8/06, Patrick Ashamalla [EMAIL PROTECTED] wrote:


onMouseDown is a 'mouse' event that is independent of the movie. The movie
simply can define a handler to run when the onMouseDown even occurs.  Put
a
square symbol on the stage named 'box' and place this code on the script
layer...

box.onMouseDown = function () {
   trace('function called');
}

The function is triggered whether you click on the box or not...

Now change it to the following:

box.onPress = function () {
   trace('function called');
}

Now this is only called if you press down when over the object (assuming
you
have some kind of graphic already in the movie clip). If it is an empty
movie clip, the onPress function will not be called.

So... a lengthy explanation, but it's getting somewhere... your root level
is just like an empty movieclip you may be at the root level, but
there
is nothing that you are 'on' to press so the function will not call.. The
stage doesn't count.. it's a separate entity. And clicking on other
elements
won't work either because they are not considered to be INSIDE of the
root... they simply reside at the root level. Same reason the root changes
if the swf is imported into another Flash file... and navigating to the
imported file if imported in, say, mcHolder clip would be
mcHolder.box.someFunction(), and not mcHolder.IMPORTEDSWF.box.someFunction
()...

Yes.. long winded I know, but I hope it sheds a little light on the
differences. :)

On 11/8/06, John VanHorn [EMAIL PROTECTED] wrote:

 onMouseDown works fine.which got me to thinking that when your on
the
 root, onMouseDown and onPress are essentially the same event, since your
 mouse is always over the root. that makes sense.

 but, at least to me, it doesnt make sense that one works and the other
one
 doesnt.

 On 11/8/06, Carl Welch [EMAIL PROTECTED] wrote:
 
  what about onMouseDown?
 
 
  --
  Carl Welch
  http://www.carlwelch.com
  [EMAIL PROTECTED]
  805.403.4819
 
  On 11/8/06, John VanHorn [EMAIL PROTECTED] wrote:
   on the root timeline:
  
   this.onPress = function(){
 trace(this);
   }
  
   does not work? the _root/_level0 movie does not take onPress or
  onRelease?
   other events like onMouseMove or onEnterFrame work finewhy not
  onPress?
   how have i not run into this before?
  
   --
   John Van Horn
   [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
 



 --
 John Van Horn
 [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





--
John Van Horn
[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


Re: [Flashcoders] am i stupid?

2006-11-08 Thread John VanHorn

i know it doesnt make any sense to use onPress on the root because of
children, and nested mc's, its just something i ran into today. i was
debugging something, and i arbitrarily chose _root.onPress to fire off a
trace. when that didnt work, i figured out that _root.onPress was being
ignored.

what makes no sense, is that _root IS a movie clip.or so i thought it is
supposed to beit at least acts like one and has all the methods and
properties of a MovieClip.

trace(_root instanceof MovieClip) //traces true

and heres something else i tried:
in a new flash document, on the root timeline, i put:

this.onPress = function(){
  trace(this);
}

published, and nothing happened. i then created another new document, made
an empty movie clip and loaded the other movie with the code above, and it
workedthe onPress was being assigned to that movie.

it just seems weird to me that onPress is a property of the movieclip class,
but just doesnt seem to work with the _root movieclip.

On 11/8/06, Reuben Stanton [EMAIL PROTECTED] wrote:


I think the explanation stated that _root is not in fact a MovieClip
in the same sense. onMouseDown works because it fires globally in
response to the mouse, not because _root is a MovieClip.

Can I ask, why do you need to use onPress and onRelease on _root
anyway? Is there some other solution? If you use a release handler on
_root it will make the release handlers on all nested MovieClips
inaccessible which seems like a bad way to go to me...


On 09/11/2006, at 3:19 PM, John VanHorn wrote:

 no, no.
 i totally understand the difference between onMouseDown and onPress
 for
 movieclips. i am saying only one works when placed on the root. the
 player
 seems to ignore _root.onPress or _root.onRelease.which makes no
 sense to
 me because it is a movieclip and the events will work when assigned
 to any
 other movie clip. even using a mouse listener does not work. i even
 tried
 setting the hitArea of the root, but to no evail. when the stage is
 clicked,
 onPress and onRelease will not fire. you dont even get a hand cursor.

___
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





--
John Van Horn
[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


Re: [Flashcoders] Remoting Connection fault?

2006-11-06 Thread John VanHorn

http://caleb.org/blog/?p=24

On 11/6/06, Diversity [EMAIL PROTECTED] wrote:


Why can I not receive a connection fault? According to the docs I should
be able to receive a fault

import mx.remoting.*;
import mx.rpc.*;
import mx.remoting.debug.NetDebug;

NetDebug.initialize();

// incorrect path on purpose to cause a fault
serv = new Service(http://localhost/amfphp/gateway.phpd;,
null,IstRemote,null,new RelayResponder(this, success_Result,
result_Fault));

var pc:PendingCall = serv.getData(Id);
pc.responder = new RelayResponder(this, Data_Result, Data_Fault);


function success_Result(){
trace(connected);
}

function result_Fault(fault){
trace(fault.fault.faultcode);
trace(fault.fault.faultstring);
trace(fault.fault.description);
trace(fault.fault.detail);
trace(fault.fault.type);
trace(---);
}

I dont get a success or fault on connect and do not get a fault on the
pc either. When the gateway path is correct everything works but as we
all know things may not work all the time.


___
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





--
John Van Horn
[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


Re: [Flashcoders] ExternalInterface class and multiple getURL IE bug

2006-11-06 Thread John VanHorn

is your issue that a getURL call to javascript will overwrite a call made
right before it?

if so, then yes, you will not have to worry about this with
ExternalInterface. it is synchronous.

On 11/6/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Hi
trying t justify use of Flash 8 to make use of ExternalInterface class.

Does this class eliminate the errors associated with multiple getURL calls
in IE?

Thanks in advance
Jim Bachalo

[e] jbach at bitstream.ca
[c] 416.668.0034
[w] www.bitstream.ca

...all improvisation is life in search of a style.
 - Bruce Mau,'LifeStyle'
___
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





--
John Van Horn
[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


Re: [Flashcoders] problem with flash 7 flv player

2006-10-30 Thread John VanHorn

the request for the flv is 404

On 10/30/06, Tony Trapp [EMAIL PROTECTED] wrote:


Hey guys need help with something.

I am trying to play a .flv file with the built in component that comes
with
flash MX 2004 pro.

When testing it works great.

When I try to play it from my web site nothing happens.

Here is the page: http://www.dbtweb.com/test_video2.asp

The player is in a folder called flash and so is the .flv

I tried for 6 hours to get it to work and nothing.

Any suggestions?

Tony...

- Original Message -
From: John Grden [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Monday, October 30, 2006 6:00 AM
Subject: Re: [Flashcoders] (no subject)


 try :

 ControlDelete ASO Files

 then publish and test.  It's a shot in the dark, but might be the
problem
 you're seeing if you've compiled with the version of files on the server
 with that PC.

 On 10/30/06, Adam Raft [EMAIL PROTECTED] wrote:
 
  I have been watching this list for a while before this my first post.
 
  I have taken a copy of a project to my computer from the server to
allow
  me to developer further and to let others continue build the project.
So
  all classes has the same relative path to each other. The strange
thing
  is that when I run the project it is the classes from the project on
the
  server that's load not the local ones. And both the class paths for
the
  project and the general class path do not point to the classes on the
  server. Does any one have an explanation / a cure for the problem.
 
 
  regards,
 
  Adam
  ___
  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
 



 --
 [  JPG  ]
 ___
 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





--
John Van Horn
[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


Re: [Flashcoders] FileReference and mac file types

2006-10-29 Thread John VanHorn

the mac file type for an mp3 will be (note the spaces in the strings - mac
file types are 4 characters) MP3  or Mp3 .i think. mac file types
and pc file types are not the same.

check this article: http://www.tink.ws/blog/macintosh-file-types/

i did some stuff with FileReference a while back and concluded that it was
easier, and maybe safer to take the name, or type property of a
FileReference object and do a toLowerCase().indexOf(mp3) on that to ensure
the right file types.

On 10/29/06, Carl Welch [EMAIL PROTECTED] wrote:


I have an project that needs to allow users to only upload mp3 files.
It works fine on a PC. But on a mac the mp3 files are greyed out and
the user is unable to select a file. Here is my code below: What am I
missing?


var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
browse.onRelease = function() {
upload.enabled = true;
fileRef.browse([{description:Audio files, extension:*.mp3,
macType:mp3}]);
};


Thanks for your help...
--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819
___
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





--
John Van Horn
[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


Re: [Flashcoders] FileReference and mac file types

2006-10-29 Thread John VanHorn

heres another good article:
http://www.joshbuhler.com/2006/05/30/mac-file-types-one-more-thing/

On 10/29/06, Carl Welch [EMAIL PROTECTED] wrote:


I have an project that needs to allow users to only upload mp3 files.
It works fine on a PC. But on a mac the mp3 files are greyed out and
the user is unable to select a file. Here is my code below: What am I
missing?


var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
browse.onRelease = function() {
upload.enabled = true;
fileRef.browse([{description:Audio files, extension:*.mp3,
macType:mp3}]);
};


Thanks for your help...
--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819
___
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





--
John Van Horn
[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


Re: [Flashcoders] Q: Javascript Injection Examples

2006-10-19 Thread John VanHorn

i saw some interesting, but simple examples at flash forward. i wrote a
function for using javascript's regex for email validation:

var s:String = ;

s += function checkEmail_flash(email){;
s += var s =
/^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/;;
s += var r = new RegExp(s);;
s += return r.test(email);;
s += };

ExternalInterface.call(eval, s);
var emailCheck:Boolean = Boolean(ExternalInterface.call(checkEmail_flash,
[EMAIL PROTECTED]));

notice all the escaping in the regex string. you could conceivably write any
javascript you wanted. just make sure you escape all the characters
correctly.

On 10/19/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Hi
Trying a new technique that allows javascript to be 'injected'from within
a swf.
Has anyone seen any interesting examples of this technique?
Jim Bachalo
[e] jbach at bitstream.ca
[c] 416.668.0034
[w] www.bitstream.ca
into the html page from within
a swf.


...all improvisation is life in search of a style.
 - Bruce Mau,'LifeStyle'
___
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





--
John Van Horn
[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


Re: [Flashcoders] External Interface causes error in IE

2006-10-16 Thread John VanHorn

you have a url we can look at?

are you sure you object/embed tags have id's and/or name's? did you use an
operand or space in the file name of the swf, or id/name? all those will
cause ExternalInterface to malfunction.

i had a problem with ExternalInterface and IE for a while that gave me the
same errorbut only sometimes. it was driving me crazy for weeks because
it would happen on some projects, but on others, it worked like a charm.
After sitting down and looking for something wrong, i realized that some of
our developers - the ones who write the html and js - were giving (we use
swfobject, by the way) the overwritten div and the object tag(second param
passed to swfobject) the same id's. and since IE uses the object tag with an
id, there were two nodes with the same id on the page. other browsers use
the embed tag, which uses a name attribute, not an id.so it was only
happening in ie. i havent had a problem with ExternalInterface at all since
then.

On 10/16/06, Clark, Craig [EMAIL PROTECTED] wrote:


I am getting an error in Internet Explorer whenever I try to use the
External Interface to call JavaScript from Flash or when I try to call
actionScript from JavaScript. I do not receive an error in other
browsers. It is only in IE. The error I get is a runtime error that says
Object does not support this property or method. When I open up Just
In Time debugging, it shows there is a problem with this method when I
call JavaScript from Flash.

try {
externalInterfaceTests.SetReturnValue(__flash__toXML(sayHello(browser)
) ); } catch (e) {
externalInterfaceTests.SetReturnValue(undefined/); }

I am not sure what the problem is.  I haven't used External Interface
since Flash 8 first came out and it worked fine at that time. I suspect
that recent changes to IE may be the cause.

Has anyone else had similar problems with IE and ExternalInterface?

Thanks

Craig Clark
Instructional Developer
Concurrent Technologies Corporation


This message and any files transmitted within are intended
solely for the addressee or its representative and may
contain company sensitive information.  If you are
not the intended recipient, notify the sender immediately
and delete this message.  Publication, reproduction,
forwarding, or content disclosure is prohibited without the
consent of the original sender and may be unlawful.

Concurrent Technologies Corporation and its Affiliates.
www.ctc.com  1-800-282-4392

___
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





--
John Van Horn
[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


Re: [Flashcoders] Movieclip To BitmapData won't work with .flv

2006-09-25 Thread John VanHorn

first thing that comes to mind is a cross domain issue. are you loading the
flv from another domain? if so, bitmapdata.draw will not work.

On 9/25/06, Martin Baltzer Hennelund [EMAIL PROTECTED] wrote:


Hi all,

I'm using the BitmapData Object to take a snapshot of the pages in my
flash app and it works fine on movieclips without a flv video player inside.
But on of the pages has an movieclip inside it which is playing
(streaming) a flv file and when I try to take a snapshot of this page
movieclip the bitmap objects returns empty (It is created but is blank).
When I remove the movieplayer mc the bitmapdata is created correctly!

What am I doing wrong or is this flash bug?

Cheers Martin

Heres my code

//--
public function toBitmapData(mContent:MovieClip):BitmapData{

  var width:Number  = Math.min( Math.ceil(mContent._width), 2880);
  var height:Number = Math.min(Math.ceil(mContent._height), 2880);

  var oBmp:BitmapData = new BitmapData(width,height, true, 0x55ff);

  oBmp.draw( mContent );

  //debugging
  var m:MovieClip = _level0.createEmptyMovieClip(mcTest, 9);
  m.attachBitmap(oBmp, 1);

  return oBmp;
}
//--

-Oprindelig meddelelse-
Fra: [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] På vegne af Josh Santangelo
Sendt: 25. september 2006 11:09
Til: Flashcoders mailing list
Emne: Re: [Flashcoders] Mute Flash Application, mac.

There is a bug which you could potentially exploit for this.

http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?
catid=184threadid=1000550enterthread=y

Note the last post. If MIDI is not set to 44.1, Flash can't output
any audio.

-josh

On Sep 22, 2006, at 10:27a, aaron smith wrote:

 Does anyone know of an application that can mute flash or browsers
 for a
 mac?

 or maybe a way to do it through the terminal?

 thanks.
 ___
 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





--
John Van Horn
[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


Re: [Flashcoders] Right-MouseClick

2006-09-22 Thread John VanHorn

http://www.flashextensions.com/index.php?page=labs

im not exactly sure how he does it, but robert taylor has a custom right
click menu component.

On 9/22/06, Michael Bedar [EMAIL PROTECTED] wrote:


Is there a reliable way to detect a r-mouse click, and at the same
time suppress the context menu? I could swear that there was a simple
way to do it, but I amy be having a DIrector flashback..no pun intended.

Thanks,
Mike

___
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





--
John Van Horn
[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


Re: [Flashcoders] ExternalInterface error

2006-09-18 Thread John VanHorn

read this tech note:

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=4b687833

if thats not your problem, then try try calling the alert with a setTimeout.
i had a problem a little while back with alert, and calling it with
setTimeout solved it. also, in your example, you really dont need to define
a javascript function for a simple alert. try this:

ExternalInterface.call(alert, Some message.);

if thats giving you problems, call it with setTimeout, like this:

ExternalInterface.call(setTimeout, alert('some message'););

On 9/18/06, Mendelsohn, Michael [EMAIL PROTECTED] wrote:


Hi list...

[IE6, WinXP, FP9]
Why am I getting an error icon in the status bar when I try to do this
simple call to javascript?

Thanks,
- Michael M.


In the Flash:
/
public function loadVideo(theVid, callingLink) {
if (ExternalInterface.available) {
var rslt:String =
String(ExternalInterface.call(flashAlert, theVid));
}
}


On the webpage:
/
script language=JavaScript type=text/javascript
function flashAlert(msg){
alert(msg);
}
/script

___
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





--
John Van Horn
[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


Re: [Flashcoders] ExternalInterface error

2006-09-18 Thread John VanHorn

i forgot one param above:

ExternalInterface.call(setTimeout, alert('some message');, 50);

On 9/19/06, John VanHorn [EMAIL PROTECTED] wrote:



ExternalInterface.call(setTimeout, alert('some 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] Help needed on Loader Component

2006-09-04 Thread John VanHorn

Jeroen's solution would work, but the onLoadError event will fire for other
reasons, beside a 404.I wouldnt use the onLoadError event to determine the
end of your file list.

why not use another technology?.php, asp, remoting... any of those could
generate an xml file or even an array from a directory listing. then you
wouldnt have to name the files 1.jpg, 2.jpg, etc.

On 9/4/06, Jeroen Beckers [EMAIL PROTECTED] wrote:


You should use the MovieClipLoader class. You could set an interval to
about 50ms, which should be enough time for the MCL class to throw the
onLoadError event. In the onLoadError event, you delete the interval
which will stop the loading.



___
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] File upload : getting Flash to know the new name

2006-08-29 Thread John VanHorn

what you can do is have a script or remoting method that you can call that
will generate a file name for you. you can then pass that string to the
upload script.

On 8/25/06, Serge Jespers [EMAIL PROTECTED] wrote:


Hey guys,

I'm doing a fileUpload in this project and in my PHP script, I rename
the file (make an MD5 from it).
I was just wondering how I can get Flash to understand this new
filename... Is this possible at all?

Thanks for your fast responses ;-)

Serge
___
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





--
John Van Horn
[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


Re: [Flashcoders] Tabbing and Components (again) ...

2006-08-25 Thread John VanHorn

i had this problem a while back and was able to solve it...but i cant
remeber exactly what i did.

i think i had to set focusManger to false on every onKillFocus event. so if
you had 1 combo box and two input text fields, you would need to write, for
every component and text field:

instanceName.onKillFocus = function():Void{
_root.focusManager.enabled = false;
}

also, for the next project i worked on, I used the mCom components (
http://www.metaliq.com/mcom/) http://www.metaliq.com/mcom/ and found that
they dont suffer from this problem at all.


On 8/24/06, Stephen Ford [EMAIL PROTECTED] wrote:


Hi,

I have a flash application that has a couple of combo box components and a
couple of text fields.

Trying to tab between my text fields doesn't work, even though they are
all tab enabled and have tab indexes.

The reason for this, I have recently found out, is due to the combo box
component - it breaks the tabbing.

The workaround for this is to include the following line (after the first
frame in my movie):

_level0.focusManager.enabled = false;

This works, HOWEVER, as soon as you choose something from the combo box,
the tabbing is broken again ???

Any anyone assist with what is going on here and if there is a fix.

Thanks.___
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





--
John Van Horn
[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] flv / flash player 7 prob

2006-08-18 Thread John VanHorn

im having a problem with a swf that plays a progressive download flv. a
coworker has IE with flash player 7, and she cannot view the flvs. there is
nothing flash 8 specific, and the swf is published for player 7, and the
flvs were converted with flash 7 settings as well. serviceCapture shows the
response code from the request for the flv is 206 partial-content.

any body have any ideas on whats wrong?

--
John Van Horn
[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


Re: [Flashcoders] Help Getting Size of Text Dynamically

2006-08-17 Thread John VanHorn

there are many ways to do the spacing. if your mc is sized after the width
of the textfield, just add the witdh of the mc to its _x plus the 15px for
spacing to get the _x of the next mc.

On 8/17/06, Aaron Roberson [EMAIL PROTECTED] wrote:


I'm half way there...

I figured out how to resize the movie clip based on the length of the
text being loaded from the name attribute of the xml node. I added the
following line to my code:

curr_item.name.autoSize = left;

Now I need to figure out how to make the spacing between each menu
item 15px. Sounds simple, and is for others, but now that each movie
clip is a different size I'm not sure how to do that. Any help on that
would be appreciated!

-Aaron

On 8/17/06, Elena Blanco [EMAIL PROTECTED] wrote:
 By size, are you referring to the length of the text (in this case the
 name?)

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Aaron
 Roberson
 Sent: Thursday, August 17, 2006 1:55 PM
 To: flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] Help Getting Size of Text Dynamically

 I am creating a dynamic drop down menu using XML and I am having
 trouble spacing out each menu item.

 Is there a way of determing the size of the text in each xml node?

 Thanks for your help,
 Aaron

 P.S. This menu is based on a tutorial at kirupa.com.

 Here is the XML:

 ?xml version=1.0 encoding=iso-8859-1?
 menu name=navigation
 item name=Home link=http://whitehorsemedia.com; /
 menu name=About Us
 link=http://whitehorsemedia.com/about/index.cfm;
 item name=Our Name
 link=http://whitehorsemedia.com/about/name.cfm; /
 item name=News
 link=http://whitehorsemedia.com/about/news.cfm; /
 item name=We Believe
 link=http://whitehorsemedia.com/about/believe.cfm; /
 item name=Staff
 link=http://whitehorsemedia.com/about/staff.cfm; /
 item name=Projects
 link=http://whitehorsemedia.com/about/projects.cfm; /
 /menu
 /menu

 Here is the ActionScript:


 // generates a list of menu items (effectively one menu)
 // given the inputted parameters.  This makes the main menu
 // as well as any of the submenus
 GenerateMenu = function(container, name, x, y, depth, node_xml) {
 // variable declarations
 var curr_node;
 var curr_item;
 var curr_menu = container.createEmptyMovieClip(name, depth);

 // for all items or XML nodes (items and menus)
 // within this node_xml passed for this menu
 for (var i=0; inode_xml.childNodes.length; i++) {
 // movieclip for each menu item
 curr_item =
curr_menu.attachMovie(menuitem,item+i+_mc,
 i);
 curr_item._x = x + i*curr_item._width;
 curr_item._y = y;
 curr_item.trackAsMenu = true;

 // item properties assigned from XML
 curr_node = node_xml.childNodes[i];
 curr_item.link = curr_node.attributes.link;
 curr_item.name.text = curr_node.attributes.name;

 // item submenu behavior for rollover event
 if (node_xml.childNodes[i].nodeName == menu){
 // open a submenu
 curr_item.node_xml = curr_node;
 curr_item.onRollOver = curr_item.onDragOver =
 function(){
 var x = 200;
 var y = this._y + this._height;
 GenerateMenu(curr_menu, submenu_mc, x,
y,
 1000, this.node_xml);
 // show a hover color
 var col = new Color(this.background);
 col.setRGB(0xf4faff);
 };
 }else{ // nodeName == item
 curr_item.arrow._visible = false;
 // close existing submenu
 curr_item.onRollOver = curr_item.onDragOver =
 function(){
 curr_menu.submenu_mc.removeMovieClip();
 // show a hover color
 var col = new Color(this.background);
 col.setRGB(0xf4faff);
 };
 }

 curr_item.onRollOut = curr_item.onDragOut = function(){
 // restore color
 var col = new Color(this.background);

 col.setTransform({ra:100,rb:0,ga:100,gb:0,ba:100,bb:0});
 };

 // any item, menu opening or not can have actions
 curr_item.onRelease = function(){
 Actions[goToURL](this.link);
 CloseSubmenus();
 };
 } // end for loop
 };

 // create the main menu, this will be constantly visible
 CreateMainMenu = function(x, y, depth, menu_xml){

Re: [Flashcoders] Net Debugger not working

2006-08-16 Thread John VanHorn

you said you called NetDebug.initialize(), but are you including the
RemotingDebugClasses in the library? also, are you including an absolute
path to gateway.php?
___
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] WSIWYG HTML text editor in Flash - follow on question

2006-08-07 Thread John VanHorn

have you tried using the unescape function?.something like this:

test_txt.replaceSel(unescape(img src=\mountains.jpg\ width=\350\
height=\120\ /));

On 8/7/06, Merrill, Jason [EMAIL PROTECTED] wrote:


Oh, and to follow up with some further information:

It seems to only encode those HTML entities when I use
TextField.replaceSel().  If I just add the img tag string on to the
htmltext field value, it works:

//works:
test_txt.htmlText += img src=\mountains.jpg\ width=\350\
height=\120\ /;

//fails - shows literal text, and encodes entities:
test_txt.replaceSel(img src=\mountains.jpg\ width=\350\
height=\120\ /);

Am I left with splitting the string in two, inserting the img tag, and
re-assembling the string?  Or is there a way to get replaceSel() to work
with HTML tags?

Thanks,

Jason Merrill
Bank of America
Learning  Organization Effectiveness - Technology Solutions




___
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] Invalid gateway URL

2006-08-05 Thread John VanHorn

get ServiceCapture:

http://kevinlangdon.com/serviceCapture/

On 8/2/06, Wade Arnold [EMAIL PROTECTED] wrote:


I was wondering if there is a way to capture the error that happens when
you
do not have a proper gateway URL for flash remoting. Flash just traces out
that it can not open the url. Is there a way to do this or should I try
and
use getURL before I run the remoting service?



Thanks;

Wade

___
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





--
John Van Horn
[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


Re: [Flashcoders] FileReference.upload onComplete event fails on OSX

2006-08-05 Thread John VanHorn

this has been discussed before.

http://www.abdulqabiz.com/blog/archives/flash_and_actionscript/workaround_file_1.php

On 8/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


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





--
John Van Horn
[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


Re: [Flashcoders] Custom cacheAsBitmap with scale and rotate

2006-07-31 Thread John VanHorn

cacheAsBitmap is a boolean property of a moive clip, so cant you set it to
true while it is static, and then false before you have to scale or rotate
it?

On 7/31/06, Seb L [EMAIL PROTECTED] wrote:


Yes that's exactly what I'm about to do, but I remember seeing someone
else had done that a while back, and I was asking if anyone could tell
me who it was, to save me the trouble :-)

Seb

On 31/07/06, Howard Nager [EMAIL PROTECTED] wrote:
 Have you tried drawing the movieclip to a bitmap using the BitmapData
draw() methos? You could display (scale/rotate) the bitmap instead of the
cacheAsBitmap movieclip.


 -Original Message-
 From: [EMAIL PROTECTED] on behalf of eric
dolecki
 Sent: Mon 7/31/2006 8:20 AM
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Custom cacheAsBitmap with scale and rotate

 If you are scaling and rotating a clip often, it wouldn't seem likely to
be
 a good candidate for cacheAsBitmap in the first place.

 - e.d.

 On 7/31/06, Seb L [EMAIL PROTECTED] wrote:
 
  Hi guys,
 
  So cacheAsBitmap is great, but it re-renders the bitmap every time you
  scale or rotate. I remember seeing some code that you could apply to a
  movie clip and it manually cached a bitmap version of the clip, which
  was scaled and rotated as a bitmap... but I can't remember where...
  can anyone else?
 
  Thanks in advance!
 
  Seb
  ___
  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@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





--
John Van Horn
[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


Re: [Flashcoders] sequential tweens ?

2006-07-23 Thread John VanHorn

i think the setInterval thing would work just fine. you could pass the same
time to the interval that you do to the tween.

or you could do somehthing like this:

//if pics are loaded dynamically, these can be set dynamically
var mcNum:Number = 1;
var mcMax:Number = 4;

function nextTween(){
   var theMc:MovieClip = this[mc + mcNum];
   var theTween:Tween = new Tween(theMc, _x, Strong.easeInOut, theMc._x,
theMc._x - 85, 1, true);
   theTween.onMotionFinished = function(){
   mcNum++;
   if(mcNum = mcMax){
   nextTween();
   }
   }
}

nextTween();

On 7/23/06, jcarlos [EMAIL PROTECTED] wrote:


Hi All,

I need some ideas how to workaround the following situation

I have na mc as an holder for some photoStrip   this photoStrip has n
photos as mcs in it   I want to produce some tween over each one BUT
the next tween should only begin after the previous has finished

as I don´t know how many photos are ther and as I´m using DepthManager
class
to to set up the photos into the PhotoStrip

I begin using  for in to trasverse the strip but I´m stucked here with
some
clever idea about how to chain these tweens, any help,please ?

  for (var prop in photoStrip)
  {
   if (prop != _childCounter)
   {
 var animPhotoX:Tween = new Tween (photoStrip[prop], _xscale,
Bounce.easeOut, 100, 120, 0.5, true);
 var animPhotoY:Tween= new Tween (photoStrip[prop], _yscale,
Bounce.easeOut, 100, 120, 0.5, true);

 animPhotoY.onMotionFinished = function()
 {
//  would be the next tween something like
 }
   }
  }
}



I know that inside the the strip the mcs are named as childDepth0  to
childDepthN-1 being N the number of photos placed in it

I tryed something with a for photoStrip[depthChild + i]  but it didn´t
work, since the for runs for all values of the control variable not caring
about if  motionFinished has occurred or not

The last idea I had, but it seemed too dirty would be to have an
SetInterval
checking from time to time if the currente Tween ended and then increment
i and clear it after the last tween happen.

I need something like an (irch)  GOTO  or some Design Pattern
techinique I do not master at this point.

Joao Carlos



___
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





--
John Van Horn
[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


Re: [Flashcoders] Re: BitmapData.draw() peculiarity

2006-07-20 Thread John VanHorn

sure...
say you have a movie clip named contentMc, with the reg point in the center.
that would mean that the upper left most content within that movie clip
would have a negative _x and _y, say -50,-50. if you use:
bmpObject.draw(contentMc),
it will only draw a bitmap starting at 0,0so you would only get the
content in the bottom right quadrant of contentMc.

one of the params you can pass the draw() method is a transformation matrix.
so if you used:

bmpObject.draw(contentMc, new Matrix(1,0,0,1,50,50));

it would start drawing the bitmap from -50,-50 within contentMc. the last 2
params of the matrix are the amount of offset.

On 7/20/06, jim [EMAIL PROTECTED] wrote:


Im interested, do you have a quick example of this.

Jim

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John
VanHorn
Sent: 19 July 2006 15:29
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Re: BitmapData.draw() peculiarity

ok, luckily a friend had an answer for me.

if any body is curious, you can offset the negative space by passing a
transformation matrix as a param to the draw() method.

On 7/18/06, John VanHorn [EMAIL PROTECTED] wrote:

 has anyone tried to use the BitmapData.draw() method to draw a movieclip
 that has content in the negative coordinate space? it seems like no
matter
 what i do, i can only get the draw() method to start from the point 0,0
in
a
 movie clip, when i need it to start at say -20,-20. even passing the
 clipRect param to the method does not do what you would expect. am i
missing
 something here?

 any solutions or workarounds would be appreciated.

 --
 John Van Horn
 [EMAIL PROTECTED]




--
John Van Horn
[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





--
John Van Horn
[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] Re: BitmapData.draw() peculiarity

2006-07-19 Thread John VanHorn

ok, luckily a friend had an answer for me.

if any body is curious, you can offset the negative space by passing a
transformation matrix as a param to the draw() method.

On 7/18/06, John VanHorn [EMAIL PROTECTED] wrote:


has anyone tried to use the BitmapData.draw() method to draw a movieclip
that has content in the negative coordinate space? it seems like no matter
what i do, i can only get the draw() method to start from the point 0,0 in a
movie clip, when i need it to start at say -20,-20. even passing the
clipRect param to the method does not do what you would expect. am i missing
something here?

any solutions or workarounds would be appreciated.

--
John Van Horn
[EMAIL PROTECTED]





--
John Van Horn
[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] BitmapData.draw() peculiarity

2006-07-18 Thread John VanHorn

has anyone tried to use the BitmapData.draw() method to draw a movieclip
that has content in the negative coordinate space? it seems like no matter
what i do, i can only get the draw() method to start from the point 0,0 in a
movie clip, when i need it to start at say -20,-20. even passing the
clipRect param to the method does not do what you would expect. am i missing
something here?

any solutions or workarounds would be appreciated.

--
John Van Horn
[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


Re: [Flashcoders] Flash Site Looses FUcntionality on Server

2006-06-28 Thread John VanHorn

pierre, i wouldnt be suprised to see a 404 error

get serviceCapture http://kevinlangdon.com/serviceCapture/...a must-have
for any developer. it captures http requests and responses. it has
definitely helped me out countless times. if somethings not working for me,
the first thing i do is open up serviceCapture and make sure all requests
are finding the right files.

On 6/27/06, Gravelat, Pierre [EMAIL PROTECTED] wrote:


I designed a simple Flash site that uses code to load flash objects
within the template (content area). I placed the artwork contained in
the library in separate folders along with a style sheet in its own
folder and all swf files are in the main folder together. While all
works fine locally, whether as a swf file directly tested or within a
web browser, using the .htm file that hosts the main flash object, once
I place it on web server, the template appears but nothing else
functions at all, as if all code was ignored.



Any suggestion would be welcome.



Pierre A. Gravelat

Systems Analyst/Web Developer

Brevard County Information Systems

Tel: 617 7395 #54133

email: [EMAIL PROTECTED]



[Any views or opinions expressed in this message
are solely those of the individual sender, except (1) where
the message states such views or opinions are on behalf of
a particular entity;  and (2) the sender is authorized by
the entity to give such views or opinions. ]



___
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





--
John Van Horn
[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


Re: [Flashcoders] Export frame option disabled

2006-06-23 Thread John VanHorn

two things you can do to remedy this problem:

1.pay attention to the bandwitdth profiler when you test your movie.it
sounds like the bulk of your movie is being loaded in the first frame. make
sure that the only thing on the timeline in the frame or frames where the
preloader works is the preloader. make sure classes are set to export in a
frame after the preloader. also if you have assets in the library set to
export for actionscript, by default, they load in the first frame. either
change that or store them off stage after the first couple of frames.

2. use a stub swf. you can make a very lightweight stub swf that contains
only the preloader and a blank movie clip in which to load your main movie.

On 6/22/06, Mike Boutin [EMAIL PROTECTED] wrote:


Hey everyone,

Im creating a preloader and I notice that it doesnt start until about
90% done loading the file.  I believe this is because my ui components
are exported to the first frame.  I tried unchecking export to first
frame with no difference.  I also tried changing the actionscript
setting to export it to frame 2 rather than 1, but it is unavailable to
change (the field is disabled).  Am I missing something here? ;) Thanks!



Mike
___
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





--
John Van Horn
[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