Re: [Flashcoders] IE8 - Strange display behaviour [SOLVED]

2010-04-08 Thread Alain Rousseau

I finally solved this one,

For those interested in the solution here it is.

It was merely a case of browser cache not acting as expected. So, I 
called the swf file with a date variable to prevent caching :


   script type=text/javascript
  var flashvars = {};
 var params = {};
 var attributes = {};
 swfobject.embedSWF(mySwfApp.swf?t= + new Date().getTime(),
   mySwfApp, 550, 400, 9.0.0, false, flashvars, params,
   attributes);
   /script


And all is fine now.


Alain Rousseau wrote:

Hi all,

I have been experiencing some strange display behaviours with IE8 lately.

I did a module for Joomla that displays a Flash based menu. In IE8 it 
loads fine the first time, but as soon as I change page, the menu 
doesn't show anymore.


If you have the IE Developper Toolbar, you'll see in the Scripts 
Console the traces from Flash (gotta love 
ExternalInterface.call(console.log, trace from flash) !! )


So with that I know all the data is here, I know wich menu item is 
supposed to be visible and yet, nothing shows. Could it be the CSS ? 
or the Flash Player in IE8 ? (got the latest version). I'm using 
SWFObject 2.2 for embedding. Tested on WinXP.


Safari, Firefox and Opera all display the menu.


the website is http://www.creativeflats.com

Hope someone can help me figure this out ! thks !

Alain

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


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


[Flashcoders] IE8 - Strange display behaviour

2010-04-07 Thread Alain Rousseau

Hi all,

I have been experiencing some strange display behaviours with IE8 lately.

I did a module for Joomla that displays a Flash based menu. In IE8 it loads 
fine the first time, but as soon as I change page, the menu doesn't show 
anymore.

If you have the IE Developper Toolbar, you'll see in the Scripts Console the traces from Flash 
(gotta love ExternalInterface.call(console.log, trace from flash) !! )

So with that I know all the data is here, I know wich menu item is supposed to 
be visible and yet, nothing shows. Could it be the CSS ? or the Flash Player in 
IE8 ? (got the latest version). I'm using SWFObject 2.2 for embedding. Tested 
on WinXP.

Safari, Firefox and Opera all display the menu.


the website is http://www.creativeflats.com

Hope someone can help me figure this out ! thks !

Alain

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


Re: [Flashcoders] Minimizing Code: Logic Issue

2009-12-09 Thread Alain Rousseau
You can create an array of MovieClips as well and if you don't have to 
fetch the movieclip's parent name in order to controll it's alpha



var myStuff:Array = [_root.mc1., _root.mc1., _root.mc1.]

for (var i:Number = 0; i  myStuff.length; i++
{
   myStuff[i].mc3.onRollOver = function() {changeViewOn(this);};
   myStuff[i].mc3.onRollOut = function() {changeViewOff(this);};

}

function changeViewOn(mov:MovieClip)
{
   mov._parent.alpha = 100;
}

function changeViewOff(mov:MovieClip)
{
   mov._parent.alpha = 0;
}



Lehr, Theodore wrote:

Here is the solution I came up with - a mishmosh of a few peoples help:

var myStuff:Array = [a,b,c];

for (var i:Number=0; imyStuff.length; i++) {
 var nm:String = myStuff[i];
 
 _root.mc1[nm].mc3.onRollOver = function() {

  changeViewOn(this);
 }

 _root.mc1[nm].mc3.onRollOut = function() {
  changeViewOff(this);
 }
}

function changeViewOn(mov) {
 _root[mov._parent._name].alpha=100;
}
function changeViewOff(mov) {
 _root[mov._parent._name].alpha=0;
}

Thanks!

From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter 
[davehunte...@hotmail.com]
Sent: Tuesday, December 08, 2009 9:22 AM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Minimizing Code: Logic Issue

i've been following this thread and may have missed a critical detail, but why 
do you need to check an instances name against an array if all you want to 
change is its alpha? or if you have extra values you need to check can't you 
just assign them to each instance when you add the rollover behaviours?
i put an example of what i mean on pastebin: http://pastebin.com/m1db46cee
hope it helps and i haven't completely missed the point and wasted your time!
david

  

From: ted_l...@federal.dell.com
To: flashcoders@chattyfig.figleaf.com
Date: Tue, 8 Dec 2009 08:58:34 -0500
Subject: RE: [Flashcoders] Minimizing Code: Logic Issue

OK - I think I MAY have found a way - which leads me to another question: how can I grab 
the FULL name of an object (ie _level0.mc1.mc2.mc3) and substring it - like 
in the example, I want to extract mc2 from the path.


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike 
[g...@engineeredarts.co.uk]
Sent: Tuesday, December 08, 2009 8:02 AM
To: Flash Coders List
Subject: Re: [Flashcoders] Minimizing Code: Logic Issue

Hmm,

Just to be clear.  I guess you are creating a number of clips on
which you set the alpha.  Then you are using an equal number of clips
that can be rolled over.  When you rollover these clips, you set the
alpha on the corresponding alpha clip.

I can see why it might be using the last array member - that would
be assigned the last time you loop through the array.  You might want to
add traces in a few more places - e.g. trace out the clip you are
messing with, trace out it's name, etc. after you assigned it?

Are you adding the clips programmatically - at runtime - or at
authortime - in the IDE?  Not 100%, but if you are adding them at
authortime, you might not be able to add to their properties.

I usually do a loop like below and attach symbols, then create
properties on them, e.g.

//Trimmed down example of adding a load of button clips
for (iBut=0; iButsection.buttons.length; iBut++) {
var btn:Object = section.buttons[iBut];
trace(button  + btn.text +  attributes:  +
btn.attributes[audioID] + ,  + btn.attributes[seqID] );

// create speech clip button
var speechMC:MovieClip =
this.speechButtons.dummy.attachMovie(audio button, speechS+iBut,
(1000+iBut));
//Assign properties.
speechMC.audioID = btn.attributes[audioID];
speechMC.seqID = btn.attributes[seqID];

//add the onRelease functionality
speechMC.onRelease = function() {
trace(onRelease  + this +  audioID  + this.audioID);
if (this.seqID  this.audioID) {
playSequenceA(this.seqID, this.audioID);
} else if (this.seqID) {
playSequence(this.seqID);
} else if (this.audioID) {
playAudio(this.audioID);
}
//Generic button handling for rollover colours...
fButtonOff(this);
}
}

Also, when you rollover and it traces - does each clip have the same
nm value - that will break it / not work.  You could always use the
_name value of the clip to find out what to change.



Lehr, Theodore wrote:


ALSO: (and this might be impacting my results... when I used this.nm it did not work at 
all... so I took this. out and just used nm, while it works they are all 
suing the last array member


From: flashcoders-boun...@chattyfig.figleaf.com 

Re: [Flashcoders] Recommendation for AS3 decompiler?

2009-05-07 Thread Alain Rousseau
If you want to have your MXML back from a SWF than there isn't a tool 
out there that can do that. You will get some Classes but they may not 
reflect the project's structure in the begining. Otherwise only SoThink 
SWF Decompiler can read AS3 based SWFs.


Gordon and Eltima Trillix only decompile up to AS2.

You would have to go with the PC decompilers, and my favourite so far is 
burak's  Action Script Viewer (http://www.buraks.com/asv/)


Hope this helps

Alain

Gerry Beauregard wrote:
Does anyone have a recommendation for a good tool for decompiling SWFs 
(and if possible SWCs) written in ActionScript 3?  Must run on MacOS 
10.5.  I was considering buying the SoThink SWF Decompiler for Mac, 
but unfortunately it often crashes when I select an SWF I just built 
with Flex Builder 3, and even when it doesn't crash, the trial version 
doesn't display ActionScript code.


Incidentally, I have no intention of ripping off anyone else's 
ActionScript code.  Quite the contrary, I'm developing new code, and 
want to see what people using a decompiler would be able to figure out 
if I don't use obfuscation. If I conclude that obfuscation is 
necessary at all, I'll need a decompiler to evaluate obfuscation 
options...


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


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


Re: [Flashcoders] This is kind of Wonderfl

2009-02-02 Thread Alain Rousseau

not SPAM,

TYPO :)


http://wonderfl.kayac.com/

Merrill, Jason wrote:

Is this spam?  Or did that site not pay their ISP dues?  This 
(http://wonderfl.kayack.com/) seems to be a web site circa 1998 - what does 
this have to do with Flash?


Jason Merrill
Bank of America Instructional Technology  Media   ·   Learning Performance 
Solutions LLD

Interested in Flash Platform technologies?  Join the Bank of America Flash Platform Community 
Interested in innovative ideas in Learning?  Check out the Innovative Learning Blog and subscribe.






-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steve Mathews
Sent: Monday, February 02, 2009 10:58 AM
To: azf...@googlegroups.com; flexcod...@yahoogroups.com; Flash Coders List
Subject: [Flashcoders] This is kind of Wonderfl

Spotted a post over at Techcrunch about wonderfl.kayack.com . Looks like a
pretty cool project. And if the creator(s) happen to see this, a big thumbs
up!
Steve
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

  

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


Re: [Flashcoders] Payment processing in Flash?

2008-09-19 Thread Alain Rousseau

Usually there are two ways of handling payement,

first is the hosted pay page, which means the payment is done through de 
payment processing website, not on yours.
The second, and I presume you want that one, is done all on the 
merchant's server. This requires you to buy an SSL key,
have your flash form through https (otherwise they won't accept dealing 
with you). Otherwise it's just communicating with their server
with POST. You'd have to look at the API of the service you want to use 
to know wich variables are sent back to you, and which are required from 
you.


I'm currently working on a site that uses Moneris, here are a few links 
to see what goes on :

https://www3.moneris.com/connect/en/index.html
https://www3.moneris.com/connect/en/process/index.html
https://www3.moneris.com/connect/en/documents/index.html

and to do some tests :

https://esqa.moneris.com/mpg/index.php?u=DemoUserp=passwords=store2

Store IDstore5

User ID demouser

Password password

Anyway you should read the documents they provide, everything is in there.
I'm pretty sure the basic processes are the same elsewhere, just the 
variables that differ.


Hope this helps


Meinte van't Kruis wrote:

I'm not sure about this one, but couldn't you just make the form in flash
yourself and just
post the same variables to the service, which the usual HTML foms also post.
You could just
peek in the HTML form, check out the variables which it will send and
simulate that behaviour in flash.

Transaction failure, secury etc is something the service itself is
responsible for. If you can ask the party
in question what kind of responses you can receive, than you could also
handle these in flash.

On Fri, Sep 19, 2008 at 11:38 AM, Henry Cooke 
[EMAIL PROTECTED] wrote:

  

Hey all,

We're working on a site for a charity in which we want to build a
really quick, streamlined donation process - basically, a user sticks
their credit card details and email address into a simple form in our
Flash site, we process the transaction in the background and the UX
continues in our site.

Now, leaving aside for a second the potential complications there
(transaction failiure, security etc), does anyone know if any of the
big payment processing services provide an interface through which
something like this can be done?

We're hoping to present the UI for the entire payment process in our
(Flash) site without linking off to someone else's forms.

Any pointers would be helpful. I've been poking through the PayPal
docs this morning, which look promising, but they're a bit of a
tangled mess...

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






  

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


RE: [Flashcoders] smooth animation

2008-06-06 Thread Alain Rousseau
Hardware might also be to blame. With poor VRAM the display will not render
flash properly. I know, I have an old G4 at home and Flash is really choppy
on it when it gets animation intensive. So ask that information to your
client so you might try and see what he sees.

HTH 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of robert
Sent: June 6, 2008 11:20 AM
To: Flash Coders List
Subject: [Flashcoders] smooth animation

Hi
I am working on a flash piece in which there is a band of 9 jpegs that
slowly move horizontally along the screen in a never ending band (the images
are repeated to the left as they exit to the right).

My client still perceives the movement as choppy. I have tried basic tricks
like onEnterFrame and Tween() and a plain old timeline tween.  
The movement speed is very slow at 1px at 31fps. I've made it slightly
smoother by checking each jpg to allow smoothing. Are there any other
tricks at the newbie level or flashcoder level? Or is this something
inherent in flash or related to the viewing hardware?

Thank you very much
robert
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


RE: [Flashcoders] secure FLV linking

2008-05-13 Thread Alain Rousseau
Actually, Dave's way is much better. I am able to download the flv directly
off youtube without any problems. All you need is Fiddler (IE) or Charles
(Firefox) to find wich request is actually the FLV file, whether it uses
it's real name or a proxy name. 

The rule is, if your browser can play a file, then you can download it on
your computer, unless it is streamed from your server.

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Glen Pike
Sent: May 13, 2008 1:15 PM
To: Flash Coders List
Subject: Re: [Flashcoders] secure FLV linking

You can't hide URL requests, but you could use a proxy script to mask the
FLV names.

The problem is that like YouTube's get_video.php script, you can still call
this from anywhere.  YouTube makes it a bit harder by adding on a variable
called t that seems to change per video called - it's probably linked to
your session or similar.  Have a look at the sequence of headers when you
load a YouTube page and you will see what I mean.

It's a barrier to many, but is easily circumvented - demonstrated by the
fact the people can play YouTube FLV's on their own site without the player,
etc. - although this is not guaranteed to work and is often flaky, it's a
good example.

Anyway, google for YouTube FLV proxy or something similar for code examples.

Glen

Dave Watts wrote:
 hey all I was wondering what is a pretty standard way to call an FLV 
 so its actually path isn't transparent. Like I want to call...
 http://www.mysite.com/myFLV.flv but I don't want people to be able to 
 see the URL in service capture like that. I want it to be more like 
 http://www.mysite.com/something_encrypted.
 Sorry i'm not sure how to say what i am looking to do but I hope this 
 makes sense! any direction on the standard for doing something like 
 this would be great! thanks!
 

 There is no standard for doing something like this, because it's not 
 possible. You can't hide URLs requested by the client from network 
 monitoring. You can require authentication for specific URLs, however, 
 using either your web server or your application server. If these FLVs 
 are being streamed through Flash Media Server, it provides 
 authentication functionality. If they're static FLV files, you can 
 enable authentication on your web server, or serve the files through 
 an application server like ColdFusion.

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/

 Fig Leaf Training: Adobe/Google/Paperthin Certified Partners 
 http://training.figleaf.com/

 WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
 http://www.webmaniacsconference.com/
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


   

-- 

Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk

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

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


RE: [Flashcoders] __proto__ but not prototype?

2008-04-25 Thread Alain Rousseau
From the documentation here is what they say about prototype :


prototype (Object.prototype property)
public static prototype : Object

A reference to the superclass of a class or function object. The prototype
property is automatically created and attached to any class or function
object you create. This property is static in that it is specific to the
class or function you create. For example, if you create a custom class, the
value of the prototype property is shared by all instances of the class, and
is accessible only as a class property. Instances of your custom class
cannot directly access the prototype property, but can access it through the
__proto__ property.

Which means prototype is read only and that if you want to change it's value
you do so through __proto__

Another way to achieve what you want would be to add the following to your
class

 

class PixView extends MovieClip {

static var symbolName:String = __Packages.PixView ;
static var symbolOwner:Function = PixView ;

var className:String = PixView ;

function PixView {
// constructor code
}

// do your stuff

static var symbolLinked = Object.registerClass(symbolName, symbolOwner);

}

Then you can do the following anywhere, on stage or in another class:

import PixView;
var pv:PixView = PixView(this.attachMovie(PixView.symbolName, pv,
this.getNextHighestDepth()));

and that's it. You have a MovieClip of the class PixView on stage.

 

Alain


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mendelsohn,
Michael
Sent: April 25, 2008 8:13 AM
To: Flash Coders List
Subject: [Flashcoders] __proto__ but not prototype?

Hi list...

I have a class (pixViewer extends MovieClip) and an empty MovieClip
(linkage:emptyMC, not registered to any class in the linkage dialog).  I
want attached this emptyMC to the stage and I want it to be an instance of
pixViewer.

__proto__ works, but why won't prototype or registerClass?

//works:
var pv:MovieClip = _root.createEmptyMovieClip(pixViewer, 180);
pv.__proto__ = new pixViewer(); pv.onLoad();

/*
Why doesn't this work:
pv.prototype = new pixViewer();
pv.registerClass(pixViewer);
*/


Thanks,
- MM

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

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


[Flashcoders] For those who want to unsubscribe - change settings

2007-10-20 Thread Alain Rousseau
Read the first message from the new list !

If you ever want to unsubscribe or change your options (eg, switch to or
from digest mode, change your password, etc.), visit your subscription page
at:

  http://chattyfig.figleaf.com/mailman/options/flashcoders/


You can also make such adjustments via email by sending a message to:

  [EMAIL PROTECTED]

with the word 'help' in the subject or body (don't include the quotes), and
you will get back a message with instructions.

You must know your password to change your options (including changing the
password, itself) or to unsubscribe.


Enjoy ! 

A.

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


RE: [Flashcoders] amf-php

2007-10-20 Thread Alain Rousseau
Hello Kerem,

if you're using AS2 for your Remoting, you should read this post :
http://blog.vixiom.com/2007/04/17/actionscript-20-flash-remoting-with-flash-
cs3/


otherwise you could check out both of these posts on how to do remoting with
CS3 without the Remoting classes :
http://www.oscartrelles.com/archives/as3_flash_remoting_example
http://osflash.org/as3lrf

and of course the all powerfull google :
http://www.google.com/search?q=Flash+CS3+remoting

Hope this helps !

A. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kerem Iseri
Sent: 19 octobre 2007 05:32
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] amf-php

hello guys,, im happy to hear from flashcoders again, and here is new my new
question on virgin server, i havent tried using amf-php on any project after
i started using flash cs3,  now im having problems because of the remoting
components are not working. how can i run my old remoting components on
flash cs3?

thanx

kerem.

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

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


Re: [Flashcoders] protecting graphics

2007-09-16 Thread Alain Rousseau
You could try and save your vector data, or SVG,  in a database (SQL) 
and retrieve your map through remoting.
you would then only need to parse back the vector data in Flash. But 
then I guess this could be tough on the user's CPU !


Alain



Stanford Vinson wrote:

Some excellent ideas here. Thanks!

I am not so worried about the screen shots. However, I AM worried about
people extracting my very complex vector graphics, scaling them anyway
they choose and printing any dimensions etc that they want and maybe
reselling in a market I would never think to check. I had considered
something along the way of the SVG solution you suggest Michael, but yes
its WAY to much extra work as far as I can imagine.

If anyone else is inspired to give me his 2 cents worth as to how to
construct the loading of a maps graphical elements to make it difficult to
reconstruct, I'm all ears.

All the best,

L. Stanford Vinson
www.wegame.dk


  

On 9/14/07, Stanford Vinson [EMAIL PROTECTED] wrote:


I am looking for a way to make it very difficult for a user who
downloads
my flash APP to extract the graphics. Can anyone help? Here is my
situation:
  

Do all you want, but you'll never prevent anyone from taking screenshots.

I've heard (and I don't know if this is true or not) that mapmaking
companies will actually occasionally make up a street (like an
out-of-the way cul-de-sac or something). That way, if someone copies
them (as opposed to doing the actual legwork), they can prove it.

One safeguard I can think of would be to create a proprietary format
(preferably binary) for vectors and then render it in Flash using
Graphics objects. You could save out the vector maps as SVG files,
write some code to translate SVG to your format, and then have your
live app use the proprietary format. That would be a lot of work,
though. Again, ti wouldn't prevent anyone from taking screenshots, but
it would make stealing the vector source much much harder.
--
T. Michael Keesey
Director of Technology
Exopolis, Inc.
2894 Rowena Avenue Ste. B
Los Angeles, California 90039
http://exopolis.com/
--
http://tmkeesey.net/
___
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


RE: [Flashcoders] what is that

2007-08-22 Thread Alain Rousseau
That's a BoxStopper SpamTrap automated message, that person didn't put the
list's adress in his whitelist 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of dr.ache
Sent: 22 août 2007 04:56
To: flashcoders
Subject: [Flashcoders] what is that

i just received an email, with the following content. is it real ?

From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED];
Subject: Re: [Flashcoders] Intro to OOP using ActionScript
Date: 8/22/2007

has been just received by risorsei.it mailserver.

To prove that your message was sent by a human and not a computer, please
visit the URL below and type in the alphanumeric text you will see in the
image. You will be asked to do this only once for this recipient.

http://mail.risorsei.it:32000/challenge/?folder=2007082210464758665722

Your message will be automatically deleted in a few days if you do not
confirm this request.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] PreLoading Multiple SWFs

2007-08-16 Thread Alain Rousseau
A nice way to preload without having the files playing is to use LoadVars.

var lvLoader:LoadVars = new LoadVars();
lvLoader.load(file.swf);
// or any other file you want to preload 

it will load practically any file type and the data will be in the cache, so
no need to use MovieClipLoader or LoadMovie , etc ...


HTH

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Shawn
Steward
Sent: 16 août 2007 12:51
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] PreLoading Multiple SWFs

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

___
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] Class to loop sound objects in order

2007-08-15 Thread Alain Rousseau
you can check out these set of classes I created for something similar 
to what you need.
it doesn't loop each mp3 files but,  creates a song based on an array of 
mp3 files .


You can modify it as you wish to fit your needs but the simplest thing 
would be to just to repeat the filename in the array [file1, file1, 
file1, file2, file3, ... ]


http://lab.daroost.ca/2007/02/25/sondloop2-revisited-musicbuilder-soundobject/

HTH

Alain

[EMAIL PROTECTED] wrote:

Hi there, thanks for checking my post. I am trying to create a class that will 
play a number of mp3 loops each a specified number of times and in the 
specified order. I have tried to find an existing class but cant find one 
anywhere.

My solution (which may not be that efficient), is to create all of the sound objects in the fla then load the mp3s into them. When they are all loaded each sound object is added to a new object that holds it as well as a 'loops' property that says how many times the sound object must play. These objects are then put into an array in the order they are to be heard. This array is passed to my LoopSound class that controls the playback. I can also pass a 'loopForever' property that will make the series repeat indefinitely. 


The problem I am having is re-triggering the play() function from within my 
LoopSound Class to move onto the next sound in the array. I am sure that there 
will be a much neater way of achieving what I want, and maybe even a 
pre-written class!

Any direction / suggestions / encouragement much appreciated :)

Thanks!
Danny



//this code would create an instance of the class in the FLA


var mySound:Sound = new Sound();
mySound.loadSound(sounds/gas.mp3, false);
//once sound is loaded:
var my_ar:Array = new Array();
//create object to add to array
var myOb:Object = new Object();
myOb.sound = mySound;
//is to play 3 time
myOb.loops = 3;
my_ar.push(myOb);
var myLooper:LoopSound = new LoopSound(my_ar)


Here is the class:


//this class is designed to play a number of already loaded sound objects 
sequentially, each sound object can be looped for a specified number of times 
then the whole series can be repeated infinitely. Th constructor is passed an 
array of objects that have sound and loop properties that contain a sound 
object and the number of times the sound object is to be looped.


class LoopSound {
private var sounds_ar:Array;
//sound playing currently
var currSound:Sound;
//which stage of the array we are currently up to
private var mp3Count:Number = 0;
//if this series of loops is meant to keep playing until they are 
stopped
private var loopForever:Boolean;
//receives array that holds objects that have the key sound  loops
public function LoopSound(a:Array, lF:Boolean) {
trace(loopsound created:+a);
mp3Count = 0;
sounds_ar = new Array();
sounds_ar = a;
loopForever = lF;
this.play();
}
private function play() {
trace(Loopsound started playing);
trace(mp3 count:+this.mp3Count+:+sounds_ar);
currSound = sounds_ar[mp3Count][sound];
//creating local vars for targetting from currSound complete
var mp3C:Number = mp3Count;
var snds_ar:Array = sounds_ar;
//calculate number of times mp3 is to loop
var currLoops:Number = sounds_ar[mp3Count][loops];
currSound.start(0,currLoops);
currSound.onSoundComplete = function() {
//if there are more sound objects to play iterate thru 
array and retrigger play()
if (mp3Countsnds_ar.length) {
mp3Count++;
//this bit isn't working!
play();
} else {
if (loopForever) {
mp3Count = 0;
this.play();
} else {
//all sound objects have played and 
play() is not retriggered
mp3Count = 0;
}
}
};
}
}

___
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

RE: [Flashcoders] Class to loop sound objects in order

2007-08-15 Thread Alain Rousseau
If you know the length of that gap (usually 25 ms) you can stop the playback
of that file accordingly, that's what I tried in my new set of Classes. It's
not perfect but with a little tweeking it's possible to obtain something
good ...

Of course if your sounds are really short, then this is not a solution. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Patrick
Matte|BLITZ
Sent: 15 août 2007 14:06
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Class to loop sound objects in order

But isn't there a small glitch in the song between each loop because of
the mp3 compression? I thought the only way to get rid of the glitch was to
export every sound as a swf.

BLITZ | Patrick Matte - 310-551-0200 x214

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alain
Rousseau
Sent: Wednesday, August 15, 2007 4:53 AM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Class to loop sound objects in order

you can check out these set of classes I created for something similar to
what you need.
it doesn't loop each mp3 files but,  creates a song based on an array of
mp3 files .

You can modify it as you wish to fit your needs but the simplest thing would
be to just to repeat the filename in the array [file1, file1, file1, file2,
file3, ... ]

http://lab.daroost.ca/2007/02/25/sondloop2-revisited-musicbuilder-soundobjec
t/

HTH

Alain

[EMAIL PROTECTED] wrote:
 Hi there, thanks for checking my post. I am trying to create a class that
will play a number of mp3 loops each a specified number of times and in the
specified order. I have tried to find an existing class but cant find one
anywhere.

 My solution (which may not be that efficient), is to create all of the
sound objects in the fla then load the mp3s into them. When they are all
loaded each sound object is added to a new object that holds it as well as a
'loops' property that says how many times the sound object must play. These
objects are then put into an array in the order they are to be heard. This
array is passed to my LoopSound class that controls the playback. I can also
pass a 'loopForever' property that will make the series repeat indefinitely.

 The problem I am having is re-triggering the play() function from within
my LoopSound Class to move onto the next sound in the array. I am sure that
there will be a much neater way of achieving what I want, and maybe even a
pre-written class!

 Any direction / suggestions / encouragement much appreciated :)

 Thanks!
 Danny



 //this code would create an instance of the class in the FLA


 var mySound:Sound = new Sound();
 mySound.loadSound(sounds/gas.mp3, false); //once sound is loaded:
 var my_ar:Array = new Array();
 //create object to add to array
 var myOb:Object = new Object();
 myOb.sound = mySound;
 //is to play 3 time
 myOb.loops = 3;
 my_ar.push(myOb);
 var myLooper:LoopSound = new LoopSound(my_ar)


 Here is the class:


 //this class is designed to play a number of already loaded sound objects
sequentially, each sound object can be looped for a specified number of
times then the whole series can be repeated infinitely. Th constructor is
passed an array of objects that have sound and loop properties that contain
a sound object and the number of times the sound object is to be looped.


 class LoopSound {
   private var sounds_ar:Array;
   //sound playing currently
   var currSound:Sound;
   //which stage of the array we are currently up to
   private var mp3Count:Number = 0;
   //if this series of loops is meant to keep playing until they are
stopped
   private var loopForever:Boolean;
   //receives array that holds objects that have the key sound  loops
   public function LoopSound(a:Array, lF:Boolean) {
   trace(loopsound created:+a);
   mp3Count = 0;
   sounds_ar = new Array();
   sounds_ar = a;
   loopForever = lF;
   this.play();
   }
   private function play() {
   trace(Loopsound started playing);
   trace(mp3 count:+this.mp3Count+:+sounds_ar);
   currSound = sounds_ar[mp3Count][sound];
   //creating local vars for targetting from currSound complete
   var mp3C:Number = mp3Count;
   var snds_ar:Array = sounds_ar;
   //calculate number of times mp3 is to loop
   var currLoops:Number = sounds_ar[mp3Count][loops];
   currSound.start(0,currLoops);
   currSound.onSoundComplete = function() {
   //if there are more sound objects to play iterate
thru array and retrigger play()
   if (mp3Countsnds_ar.length) {
   mp3Count++;
   //this bit isn't working!
   play();
   } else {
   if (loopForever

Re: [Flashcoders] Loading xml in AS 2

2007-08-03 Thread Alain Rousseau
If you want to trace out your xmlData then put that trace INSIDE the 
onLoad function.

otherwise you will get nothing back !

don't forget, these are asynchronus functions -  load  and onLoad

HTH

Omar Fouad wrote:

class LoadXML {

function LoadXML() {
var xmlData:XML = new XML();

xmlData.ignoreWhite= true;
xmlData.onLoad = function (success) {
if(success) {
trace(loaded);
}
}
xmlData.load(data.xml);
trace(xmlData);
}
}
this is not working

  

___
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] AS2: EventDispatcher.initialize() andsuper()conflict?

2007-06-09 Thread Alain Rousseau
On another note, if you only need to listen to another class events 
simply register that class with the one you use. (like a controller)

Unless you need to dispatch an event afterwards.


import classToListen;
class myClass extends otherClass
{

private var _classToListen:classToListen;
   function myClass(m:Model)
   {
   super();
   }

   public function register(registeredClass)
   {
   _classToListen = registeredClass;
   _classToListen.addEventListener(onEvent, Delegate.create(this, 
eventHandler);

   }

   public function eventHandler(evtObj:Object)
   {
   //do stuff
   }
}


if you need to dispatch events then decorate with EventDispatcher as 
Jesse and Muzak recommand.


Alain

Muzak wrote:

As Jesse said, use the static way instead of initializing it in the constructor.
This serves 2 purposes:
- mixin only occurs once (rather than which each instance created)
- mixin occurs before the constructor is run

With that said, any reason why you're not decorating the super class with 
EventDispatcher?
When decorating the super class every subclass will have event dispatching 
(which is usually what you want).

regards,
Muzak

- Original Message - 
From: Jesse Graupmann [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Saturday, June 09, 2007 1:57 AM
Subject: RE: [Flashcoders] AS2: EventDispatcher.initialize() andsuper()conflict?


  

I never use super() so I have no idea, but see what happens when you throw
the initialize in a static variable like;


class myClass extends otherClass
{
private static var EventDispatcherDependancy  =
mx.events.EventDispatcher.initialize ( myClass.prototype );
public var addEventListener:Function;
public var removeEventListener:Function;
public var dispatchEvent:Function;

public function myClass (m:Model) {
super();
}
}

_

Jesse Graupmann
www.jessegraupmann.com
www.justgooddesign.com/blog/
_



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Friday, June 08, 2007 4:31 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] AS2: EventDispatcher.initialize() and
super()conflict?

I have a class that has to call it's superclass in the constructor.
However, it also needs to initialize EventDispatcher to listen to
dispatch events that another class is listening to.  It seems, and I
could be wrong, that EventDispatcher does not work if it's not the first
thing in the constructor.  I thought someone had said once, or I read
it, that EventDispatcher has to be first in the constructor.  And of
course, probkem then is super() will not work if it's not first, so it
seems to be a catch-22.  Is this true regarding
EventDispatcher.initialize() and how to avoid?

code snippet:

  /*=Constructor=*/
public function MyClass(m:Model)
{
super(m);
EventDispatcher.initialize(this);
}

If this is OK then maybe something else is wrong in my code, I just
wanted to find out if maybe this is why the events aren't firing.

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


RE: [Flashcoders] EventDispatcher weirdness in AS2

2007-06-07 Thread Alain Rousseau
If you are using this exact code then I believe you have an error in the
constructor :

public function MyClass  should be  public function MyMainClass

also you should either set your vars as private or whatever kind you need.

Another thing, your eventlistener should have an object as second param, not
a function so your Class should become :


import myClass;
import myOtherClass;
import mx.events.EventDispatcher;

class MyMainClass
{
private var _myClass:MyClass;
private var _myOtherClass:MyOtherClass;

public function MyMainClass() 
{
doStuff();
}

private function doStuff()
{
_myClass = new MyClass();
// Refer to the listening object, in this case it's the
current Class MyMainClass (this)
_myClass.addEventListener(onTransition, this)
_myOtherClass = new MyOtherClass();
}

// I usually define event handlers as simple function not public nor
private - took that approach from ARP :)
function onTransition(evtObj:Object)
{
trace(Hello World, the event fired);
trace(_myOtherClass);
}

} 

This is not tested but I believe it should yield something 

As for your MovieClip problem, I feel your pain ... seen it before and can't
remember how I fixed it. Is there a stop() at the beginning of that clip ?
in another timeline code or class ? This usually brings problems with
gotoAndPlay ... Sometimes we forget to remove a stop() at certain places
where it is unneeded - OnEnterFrame, setInterval, etc ..

HTH 

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: 6 juin 2007 16:30
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] EventDispatcher weirdness in AS2

Driving me mad.  I don't get what could possibly be happening here.  Why
would _myOtherClass instance no longer exist after the event in an
unrelated class fires?   Any ideas?

import myClass;
import myOtherClass;
import mx.events.EventDispatcher;

class MyMainClass
{

  var _myClass:MyCLass;
  var _myOtherClass:MyOtherClass;

  public function MyClass()
  {
doStuff()
  }
  
  private function doStuff()
  {
_myClass = new MyClass();
_myClass.addEventListener(onTransition, onTransitionHandler);
_myOtherClass = new MyOtherClass(); 
trace(_myClass) //traces [object Object] as expected
trace(_myOtherClass)//traces [object Object] as expected
  }

  private function onTransitionHandler():Void
  {
//Event is heard just fine, the following traces just fine:
trace(Hello World, the event fired!) 

//but this does not:
trace(_myOtherClass)//traces undefined !?!
  }

}

Also, in other movie clip, a simple gotoAndPlay(theframelabel) does not
work.  It goes to the right framelabel, but willl NOTplay - even if I force
it with a mc.nextframe() and mc.play() it only advances one frame and stops
again.  There are no other stop() actions in the clip or anywhere else
referencing the clip.  Makes me wonder if my project is somehow corrupt. ?

Jason Merrill
Bank of America
GTO Learning  Leadership Development
eTools  Multimedia Team

___
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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.9/834 - Release Date: 2007-06-05
14:38
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.11/837 - Release Date: 2007-06-06
14:03
 

___
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] EventDispatcher weirdness in AS2

2007-06-07 Thread Alain Rousseau
Hehe no prob.

For your listener are you doing something like

_myClass.addEventListener(onTransition, Delegeate.create(this,
onTransitionHandler));

private function onTransitionHandler() {
//do stuff
}

don't you prefer

_myClass.addEventListener(onTransition, this);

function onTransition() {
//do stuff
}

for better clarity and less code writing ? No need of delegate in this case.

Of course it's a question of choice and habit. Just to let you know of the
alternatives !

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: 7 juin 2007 09:30
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] EventDispatcher weirdness in AS2

Thanks, yes, I actually posted that I solved it last night - (un-related
- that was just a typo for my constructor when I wrote the e-mail - that
wasn't the actual problem) - the problem was I wasn't using Delegate in the
listener.  So what threw me was the listener WAS detecting the event
dispatch, but losing scope.  I just forgot about using Delegate in this
case.  Thanks.

also you should either set your vars as private or whatever kind you 
need.

I do/did, so confused by that comment, but regardless, it's working.
Thanks for the input!

Jason Merrill
Bank of America
GTO Learning  Leadership Development
eTools  Multimedia Team


 
___
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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.11/837 - Release Date: 2007-06-06
14:03
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.11/837 - Release Date: 2007-06-06
14:03
 

___
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] EventDispatcher weirdness in AS2

2007-06-07 Thread Alain Rousseau
Never thought of that and never had to listen to multiple events with the
same name !

Thanks for the heads up Muzak!

Alain 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Muzak
Sent: 7 juin 2007 12:22
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] EventDispatcher weirdness in AS2

Even though it's possible to use the class instance as the listener (this),
you're still better off using Delegate.
What if you have 2 instances dispatching the same event that need to be
handled completely different?

submit_btn.addEventListener(click, this);
aTotallyUnrelated_btn.addEventListener(click, this);

The above will work, but they'll both trigger the same event handler and
you'll have to resort to if()else() stuff.
No big deal if you have 2 buttons.. get's hairy with loads of buttons.
Or what about different components (DataGrid, ComboBox, List, etc..) who all
dispatch a change event..

_dg.addEventListener(change, this);
_cb.addEventListener(change, this);
_list.addEventListener(change, this);

versus:

_dg.addEventListener(change, Delegate.create(this,
datagridChangeHandler)); _cb.addEventListener(change,
Delegate.create(this, comboChangeHandler)); _list.addEventListener(change,
Delegate.create(this, listChangeHandler));

Get in the habit of using Delegate (in AS2) and *always* use it.. no
exceptions ;-)

regards,
Muzak

- Original Message -
From: Alain Rousseau [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Thursday, June 07, 2007 4:07 PM
Subject: RE: [Flashcoders] EventDispatcher weirdness in AS2


 Hehe no prob.

 For your listener are you doing something like

 _myClass.addEventListener(onTransition, Delegeate.create(this,
 onTransitionHandler));

 private function onTransitionHandler() {
 //do stuff
 }

 don't you prefer

 _myClass.addEventListener(onTransition, this);

 function onTransition() {
 //do stuff
 }

 for better clarity and less code writing ? No need of delegate in this
case.

 Of course it's a question of choice and habit. Just to let you know of the
 alternatives !

 Alain



___
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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.11/837 - Release Date: 2007-06-06
14:03
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.11/837 - Release Date: 2007-06-06
14:03
 

___
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] Setting up loadVars onLoad handler within custom class

2007-06-04 Thread Alain Rousseau

To learn more about Delegate I'd suggest you read the following :
http://osflash.org/flashcoders/as2

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rákos Attila
Sent: 4 juin 2007 10:32
To: Daniel Glue
Subject: Re: [Flashcoders] Setting up loadVars onLoad handler within custom
class


Where did you instantiate LoadVars? I don't see it anywhere. But it almost
doesn't matter, since you will have scoping problems, look after some kind
of delegation (eg. mx.utils.Delegate).

  Attila

DG Hey there, I am creating a custom class with a loadVars object that 
DG gets data from a web page. My problem is I can't get my loadVars 
DG object to load! I think I am setting the onLoad handler in the wrong 
DG place. Might anyone have any ideas how I set this inside my custom 
DG class?
DG 
DG Thanks in advance guys!
DG Danny
DG 
DG 
DG Here is my code:
DG 
DG Class VersionChecker{
DG private var my_lv:LoadVars;
DGprivate var xmlAdd:String;
DG   private var browserType:String;
DG   private var ipAddress:String;
DG 
DG 
DG //receives url to connect to sets onLoad handler
DG  public function VersionCheck(xmlAddy:String {
DG xmlAdd = xmlAddy;
DG my_lv.onLoad = function(success:Boolean) {
DG if (success) {
DG trace(loaded);
DG browserType = this.browser;
DG ipAddress = this.ip;
DG } else {
DG trace(load failed);
DG }
DG };
DG startCheck();
DG }
DG 
DG   private function startCheck() {
DG trace(version checker starting to check:+xmlAdd);
DG my_lv.load(xmlAdd);
DG }
DG }


___
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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.7/830 - Release Date: 2007-06-03
12:47
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.7/830 - Release Date: 2007-06-03
12:47
 

___
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] AS 2 Delegate question

2007-06-02 Thread Alain Rousseau
Or you could use another Delegate class. There is the Proxy class I 
believe (can't remember who did it)  and the one I use the most is the 
one on dynamicflash.com

http://dynamicflash.com/2005/05/delegate-version-101/

You can pass parameters in the Delegate call


myButton.onRelease = Delegate.create(this, myFunction, param1, param2, ...);



Merrill, Jason wrote:
In this case the delegate will send to the btnRollOver 
function only the parameters of the event onRollOver.
You will have to find another way to solve this problem... 
maybe extend the MovieClip class, or maybe it could be better 
to not use the delegate.
  


Actually, you can do it this way:

import mx.utils.Delegate

var myDel:Object = myButton.onRelease = Delegate.create(this,
myFunction);
myDel.myVariable = Hello World;  


function myFunction()
{
trace(arguments.caller.myVariable)
}

Jason Merrill
Bank of America  
GTO Learning  Leadership Development

eTools  Multimedia Team

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] seamless audio loops

2007-05-30 Thread Alain Rousseau
You could also try out my looping classes if you want to loop a 
dynamically loaded mp3 : 
http://lab.daroost.ca/2007/02/25/sondloop2-revisited-musicbuilder-soundobject/


To loop only 1 sound file use the SoundObject Class, to create a song 
based on multiple files and looping that new song, use the MusicBuilder 
Class.
You specify the number of milliseconds that the silence gap  added lasts 
(usually around 25ms).


The other solution, as mentioned in he other posts, is to reencode your 
MP3 file, or import it as Steven said.
But WAV format is much better for the latest (or AIFF on Mac), you'll 
have to take into account the added weight to your swf.


HTH

Alain



Mike Duguid wrote:
You can also edit the mp3 frames directly using mp3directcut which can 
help

without having to rencode.
http://mpesch3.de1.cc/mp3dc.html

On 5/30/07, nik crosina [EMAIL PROTECTED] wrote:


Hi Guys,

We are having problems with seamlessly looping audio in Flash - is
there a special way of doing this? We are using mp3 and even thought
eh audio is perfect (tested in other apps) we can't get it to loop
properly without gap!

Thanks,

Nik


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Press

2007-05-29 Thread Alain Rousseau

MovieClip.onReleaseOutside = ...



Laurent CUCHET wrote:

Good morning
There is a movie witch run to image 5 if mouse roll over it

How can I do to go to image 1 if I press outside it ?

Thank you
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Class broadcasting Question...

2007-05-21 Thread Alain Rousseau

You forgot to add a listener ! :)

in the timeline  code :

bar.AddListener(this);
and it will listen to all event  broadcasted by your Login Class. Note 
that it's AddListener not AddEventListener as you're using AsBroadcaster.


As easy as that !

HTH

Alain

eric e. dolecki wrote:

This may sound daft, and perhaps not the way to go, but here is what I am
trying to do (AS2):

I have a class that I would like timeline code to instantiate and call a
method on. I would like the class to broadcast back to whomever is
listening...

simplified class:

import mx.utils.Delegate;
class Login extends AsBroadcaster
{
   function Login()
   {

   };

   public function foo( sValue:String ):Void
   {
   // stuff
   broadcastMessage( attempt, bValue );
   };
}

timeline code (not class-based):

var bar:Login = new Login();
bar.foo( test string );

function attempt( bValue:Boolean ):Void
{
trace( the result is  + bValue );
}

===

Obviously I am missing some pieces here, any quick insights?

- Eric
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] wedging in a preloader -- lazy developer alert!

2007-05-12 Thread Alain Rousseau

Or even Simpler,

Add a scene to your FLA before the main scene and put the preload script 
there ... no need for loadmovie :)


Ian Thomas wrote:

A simple fix - create a wrapper Flash movie, and load the bulky movie
in as a child. As long as it doesn't use _root all the time, it should
work fine. (And even if it does, you could use _lockroot to fix that).

Ian

On 5/11/07, Hairy Dog Digital [EMAIL PROTECTED] wrote:

Hi all,

Wasn't sure whether to post there here or Flash-Newbie, so I'm starting
here.

I've inherited a project where all Flash assets (MCs, buttons, 
components)
are included in an FLA and setup on frameone. All code is in external 
class

definition files, and it isn't pretty. With classes linked to symbol
instances in the FLA's library.

Client now wants an animated preloader, because the app takes too 
long to
load before running. You see where this is going... everything is on 
frame 1
and all actionscript classes and used library symbols are flagged to 
export

on frame 1. Ugh!

This has probably been covered ad naseum, but cannot give me some quick
pointers on fixing this?

(If I was doing this from scratch, I'd simply have the preloader and 
related
elements export on frame 1, with symbols and actionscript on frame 
2-5, to
get the preloader loaded and running while everything else loads. Is 
really
as simple as wedging some frames in the start and changing the 
export/load

frame?)

...Rob

___
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


RE: [Flashcoders] RGB tinting using the colorMatrixFilter()

2007-05-10 Thread Alain Rousseau
Does it need to be using ColorMatrixFilter ? I have a Tint utility class
that does exactly what you want but it's a simple color transform on a
MovieClip:

http://www.daroost.ca/download/Tint.as

It's in AS2 but I guess you could try and change it to work in AS3 ...

HTH

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike
Mountain
Sent: 10 mai 2007 05:40
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] RGB tinting using the colorMatrixFilter()

not sure I made myself clear - given a desaturated greyscale image I need to
be able to tint it to an RGB value - so black stays black, white stays white
and rgb=128,128,228 (50% grey) is the actual colour - with all the shade in
between. I need to be able to do this by using code like this:

[as3]
trace(composite startTime:+getTimer());
// tint
var matrix:Array = new Array();
matrix = matrix.concat([r1, r2, r3, r4, r5]);
matrix = matrix.concat([g1, g2, g3, g4, g5]);
matrix = matrix.concat([b1, b2, b3, b4, b5]);
matrix = matrix.concat([a1, a2,a3, a4, a5]);
var tintFilter = new ColorMatrixFilter(matrix); [/as3]

so how do I work out the r's g's and b's in the matrix?

Cheers

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


No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.467 / Virus Database: 269.6.6/795 - Release Date: 2007-05-09
15:07
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.467 / Virus Database: 269.6.6/795 - Release Date: 2007-05-09
15:07
 

___
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 filter to the stage.

2007-05-06 Thread Alain Rousseau
to reference the current MovieClip you can use the this statement. If 
you put that code on a frame of the timeline, it will reference the 
whole flash Movie thus applying the BlurFilter to it and all containing 
movie clips (in theory). it would be the same as writing _level0 or 
_root but don't use the last.


Gustavo Duenas wrote:
So If I add this code to my movie, I could have the blur for the whole 
stage(including movie clips?);


this would be the main timeline...would you please explain me more 
this in detail?


regards


gustavo Duenas

On May 6, 2007, at 10:28 AM, Alain Rousseau wrote:


It would be more something like

this.filters = [stageBlur];

where this is the main timeline or _level0

HTH

Gustavo Duenas wrote:
hi Guys, I've been thinking of this, is possible to add a filter to 
the stage?


like:

stageBlur:BlurFilter = new BlurFilter();


stage.filters=[stageBlur];

I don't know maybe I'm looking for something crazy, but I'd 
appreciate any input you would have guys.


regards





Gustavo Duenas
Creative Director
LEFT AND RIGHT SOLUTIONS LLC
1225 W. Beaver St. Suite 119
Jacksonville, Fl.  32204
904 . 2650330
www.leftandrightsolutions.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




___
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] Flash / Java Communication with ExternalInterface

2007-05-03 Thread Alain Rousseau
Hi All,
 
we're at a point in a project where we need good communication between Flash
and Java. ATM we are using SWT Flash and it's FSCommand handling. I would
like to go a bit further to be able to send complex objects via
ExternalInterface. I know there is Javaflash (HYPERLINK
http://www.osflash.org/javaflash/http://www.osflash.org/javaflash/) out
there but the official website is so slow and it seems to be still in beta. 
 
Basically, we are using Flash as GUI for a Java backend. We'll need to send
back and forth some complex objects. We are currently exploring the
possiblity of using XML to send values. 
 
What solution would be the best ? Meaning which one gets the fastest
response, stability and extendability.
 
Are there any other options or howto's than FSCommand ? any link or tips are
welcome. Or is Javaflash stable enough for use in a commercial App ?
 
Thanks in advance !
 
Alain

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.467 / Virus Database: 269.6.2/785 - Release Date: 2007-05-02
14:16
 
___
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 / Java Communication with ExternalInterface

2007-05-03 Thread Alain Rousseau

Currently we're using Flash 8, but switching to Flex is also an option.
The thing is that we are building a Java Desktop Application, forgot to 
mention that,  it's not a web application.


FYI, ExternalInterface can be used with any other platform if the proper 
hooks are in place. It can be done with JavaScript, C# and Java (with 
JavaFlash)


As I said JavaFlash is still in beta and I'm looking for other options, 
but not web options as Robert proposed. Thanks for the advice tho !


We have FLash running inside a widget created by SWT Flash. Inside it we 
can use a flashobject widget with code looking like this :


  flashobject.setVariable(String name, String value)

wich is the basic setVariable sending only strings. We need to be able 
to call Flash Methods as well, so we would like to do
  
   flashobject.FlashMethodCall(args)


So far the only thing we can do is use FSCommand and pass variables as 
strings ... If it's the only option, we'll go back to the old parse the 
string to extract your data way.

Otherwise any other option is welcome ! :)

Thanks !



T. Michael Keesey wrote:

On 5/3/07, Alain Rousseau [EMAIL PROTECTED] wrote:

Hi All,

we're at a point in a project where we need good communication 
between Flash
and Java. ATM we are using SWT Flash and it's FSCommand handling. I 
would

like to go a bit further to be able to send complex objects via
ExternalInterface. I know there is Javaflash (HYPERLINK
http://www.osflash.org/javaflash/http://www.osflash.org/javaflash/) 
out
there but the official website is so slow and it seems to be still in 
beta.


Basically, we are using Flash as GUI for a Java backend. We'll need 
to send

back and forth some complex objects. We are currently exploring the
possiblity of using XML to send values.


I'm confused. Communicating with a back end would be better done with
mx.rpc classes or something like that, no? ExternalInterface is
usually for communicating with JavaScript, not Java.

Which version of Flash are you using?

___
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 / Java Communication with ExternalInterface

2007-05-03 Thread Alain Rousseau

Thanks Muzak,

We'll look into that. As for your other post, we'll be looking into 
Apollo in the near future but right now we are stuck with Java as our 
App is pretty much completed.


Thanks all for your answers, it will give us some food for thought.


Alain

Muzak wrote:

In that case, look into JSON.

http://www.json.org/

regards,
Muzak

- Original Message - 
From: Alain Rousseau [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Friday, May 04, 2007 12:40 AM
Subject: Re: [Flashcoders] Flash / Java Communication with ExternalInterface


  

Currently we're using Flash 8, but switching to Flex is also an option.
The thing is that we are building a Java Desktop Application, forgot to mention 
that,  it's not a web application.

FYI, ExternalInterface can be used with any other platform if the proper hooks are in place. It can be done with JavaScript, C# 
and Java (with JavaFlash)


As I said JavaFlash is still in beta and I'm looking for other options, but not web options as Robert proposed. Thanks for the 
advice tho !


We have FLash running inside a widget created by SWT Flash. Inside it we can use a flashobject widget with code looking like this 
:


  flashobject.setVariable(String name, String value)

wich is the basic setVariable sending only strings. We need to be able to call 
Flash Methods as well, so we would like to do
  flashobject.FlashMethodCall(args)

So far the only thing we can do is use FSCommand and pass variables as strings ... If it's the only option, we'll go back to the 
old parse the string to extract your data way.

Otherwise any other option is welcome ! :)

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


Re: [Flashcoders] AS2: generating new instances dynamically?

2007-05-02 Thread Alain Rousseau

Hi Sebastian,


When extending the MovieClip Class in AS2, there is no way to access the 
constructor. All initializations should be done, like Matthias Dittgen 
mentionned with the optional initObject argument of 
attachMovie(libraryID, instanceName, depth, initObject)
That way you set all the properties that you need before the onLoad() of 
your Class. Don't forget that it's a MovieClip and in AS2 it's instances 
are not handled the same way as other Classes  and has it's own rules :)


You should read on the MovieClip Class, it's all there

HTH

Alain

sebastian chedal wrote:

If it is a movie clip you want to instantiate then you have to use:
_root.attachMovie(libraryID, instanceName, depth);



The class associated with it will construct and the onLoad event will
trigger if it is being listened to.


this indeed works, but then i can't pass any values to the constructor.
Is there any way to attachMovie and at the same time pass values to it?

I supose I can always refer to it afterwards on the time line and call a
custom function... but it would be nice to use the constructor's
functionality.

I had hoped I could generate new instances just by calling a constructor
instead of attaching it to something; but i guess logically i it needs 
to be

attached to be on the timeline. Correct me if I am wrong.

Thanks!

Seb.

On 5/1/07, O. Fouad [EMAIL PROTECTED] wrote:


are u executing the class post view?

On 5/1/07, Andy Herrman [EMAIL PROTECTED] wrote:

 Or have the function return it, which is what it seems like would be
 the right thing for that method.

   -Andy

 On 5/1/07, Ron Wheeler [EMAIL PROTECTED] wrote:
  I am not sure if you are showing all the code but in your code
fragment,
  newPost is a local variable that will be destroyed as soon as
createPost
  ends. A short and brutal life.
 
  It needs to be a class property and you will want to have a 
getter to

  access it.
 
  Ron
 
  sebastian chedal wrote:
   Hello Flashcoders,
  
   Sorry to bother you with another simple AS2 questions, I'm making
good
   progress but I am stumped with one simple thing.
  
   I have one class/object that I want to use to generate copies
   [instances] of
   another class.
  
   The second class is an object in the library with an ID and an
 assosiated
   *.as file [in the linkage panel].
  
   The code is:
   =
  
   //PostModel.as
  
   import com.blabla.PostView;
  
   class com.blabla.PostModel {
  
 public function createPost (__id) {
  var newPost = new PostView (__id);
 }
   }
  
   =
  
   When I run this code, the class doesn't construct an instance...
  
   What am I missing? If I need to call the Library Identifyer 
instead,

 how
   would I do that?
  
   I don't want to attach the PostView to the PostModel class, I just
   want to
   create instances of them and attach them to _root [or some 
other MC

in
   the
   timeline].
  
   Thanks!!
  
   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




--
O.Fouad - Digital Emotions
___
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 

Re: [Flashcoders] setting a timer in flash 8

2007-03-25 Thread Alain Rousseau


I made a Timer class that I use for another set of Classes I wrote. Here 
is the class itself, it's pretty precise and reliable so far. Hope it 
Helps !


usage :

import ca.daroost.utils.Timer;
soundTimer = new Timer();
soundTimer.addEventListener(onTimerDone, this);
soundTimer.addEventListener(onTimerStart, this);

soundTimer.startTimer(0, 2000); // 2 second timer

function onTimerDone(evtObj:Object) {
   trace(Timer is done after +evtObj.delta+ms   - wanted time is : 
+evtObj.timerDelta+ms);

}

function onTimerStart(evtObj:Object) {
   trace(Timer has started);
}

 Class Start ---

import mx.events.EventDispatcher;
import mx.utils.Delegate;

class ca.daroost.utils.Timer {
// Constants:
   public static var CLASS_REF = ca.daroost.utils.Timer;
// Public Properties:
   public var dispatchEvent:Function;
   public var addEventListener:Function;
   public var removeEventListener:Function;
// Private Properties:
   private var tEnd:Number;
   private var tStart:Number; // usually this is 0, but in case of a 
sound loop there could be a start offset
   private var _starttime:Number; // actual timer start value set with 
getTimer()

   private var tDelta:Number; // Delta time between tEnd and tStart
   private var tInterval:Number;
// Initialization:
   public function Timer(startTime:Number,endTime:Number) {
   EventDispatcher.initialize(this);
   tStart = (startTime != undefined) ? startTime : 0;
   tEnd = (endTime != undefined) ? endTime : 0;
   tDelta = 0;
   tInterval = 0;
   }

// Public Methods:
   public function startTimer(startTime:Number,endTime:Number) {
   tEnd = endTime;
   tStart = startTime;
   tDelta = tEnd - tStart;
   _starttime = getTimer();
   tInterval = setInterval(this, updateTimer, 1);
   this.dispatchEvent({target:this, type:onTimerStart, 
startTime:tStart, endTime:tEnd});

   }
  
   public function set endTime(value:Number):Void {

   tEnd = value;
   }
  
   public function get endTime():Number {

   return tEnd;
   }
  
   public function set startTime(value:Number):Void {

   tStart = value;
   }
  
   public function get startTime():Number {

   return tStart;
   }
// Semi-Private Methods:
// Private Methods:
   private function updateTimer():Void {
   var _delta:Number;
   _delta = getTimer() - _starttime;
   if (_delta = tDelta -50) {
   // here we will get a more precise value with the last 50 ms
   while (_delta  tDelta) {
   _delta = getTimer() - _starttime;
   }
   this.dispatchEvent({target:this, type:onTimerDone, 
delta:_delta, timerDelta:tDelta});

   clearInterval(tInterval);
  
   }

   }

}


 Class End---

Gustavo Duenas wrote:
Hi, I'm trying to set a timer to trigger a event after 20 seconds or 
less, but so far i have this code, but with no results

someone help me? .
I don't know how could I got into but some help might be needed


this is the code: is inside the first frame of a movie clip and the 4 
frame has: gotoAndPlay(1);



var now = getTimer();
var seconds:Number = now/1000;
var later:Number = seconds+20;
this.onEnterFrame= function (){
if(seconds == later){
trace(llegamos);
   
}

}
trace(seconds);



Regards


Gustavo Duenas



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] setting a timer in flash 8

2007-03-25 Thread Alain Rousseau
Btw when setting a start time other than 0 to the timer, it's the 
difference between both that will be calculated.

Example :

you app starts at 0ms, but for some reason you need some data loaded 
that your timer needs before it starts. You need to take into account 
the time elapsed.


var wantedEnd:Number = 2000;
var curTime:Number = getTimer();
soundTimer.startTimer(curTime, wantedEnd);

the Timer won't go for 2 seconds, but an event will be triggerred after 
2 seconds of the Application launch.


HTH

Alain Rousseau wrote:


I made a Timer class that I use for another set of Classes I wrote. 
Here is the class itself, it's pretty precise and reliable so far. 
Hope it Helps !


usage :

import ca.daroost.utils.Timer;
soundTimer = new Timer();
soundTimer.addEventListener(onTimerDone, this);
soundTimer.addEventListener(onTimerStart, this);

soundTimer.startTimer(0, 2000); // 2 second timer

function onTimerDone(evtObj:Object) {
   trace(Timer is done after +evtObj.delta+ms   - wanted time is : 
+evtObj.timerDelta+ms);

}

function onTimerStart(evtObj:Object) {
   trace(Timer has started);
}

 Class Start ---

import mx.events.EventDispatcher;
import mx.utils.Delegate;

class ca.daroost.utils.Timer {
// Constants:
   public static var CLASS_REF = ca.daroost.utils.Timer;
// Public Properties:
   public var dispatchEvent:Function;
   public var addEventListener:Function;
   public var removeEventListener:Function;
// Private Properties:
   private var tEnd:Number;
   private var tStart:Number; // usually this is 0, but in case of a 
sound loop there could be a start offset
   private var _starttime:Number; // actual timer start value set with 
getTimer()

   private var tDelta:Number; // Delta time between tEnd and tStart
   private var tInterval:Number;
// Initialization:
   public function Timer(startTime:Number,endTime:Number) {
   EventDispatcher.initialize(this);
   tStart = (startTime != undefined) ? startTime : 0;
   tEnd = (endTime != undefined) ? endTime : 0;
   tDelta = 0;
   tInterval = 0;
   }

// Public Methods:
   public function startTimer(startTime:Number,endTime:Number) {
   tEnd = endTime;
   tStart = startTime;
   tDelta = tEnd - tStart;
   _starttime = getTimer();
   tInterval = setInterval(this, updateTimer, 1);
   this.dispatchEvent({target:this, type:onTimerStart, 
startTime:tStart, endTime:tEnd});

   }
 public function set endTime(value:Number):Void {
   tEnd = value;
   }
 public function get endTime():Number {
   return tEnd;
   }
 public function set startTime(value:Number):Void {
   tStart = value;
   }
 public function get startTime():Number {
   return tStart;
   }
// Semi-Private Methods:
// Private Methods:
   private function updateTimer():Void {
   var _delta:Number;
   _delta = getTimer() - _starttime;
   if (_delta = tDelta -50) {
   // here we will get a more precise value with the last 50 ms
   while (_delta  tDelta) {
   _delta = getTimer() - _starttime;
   }
   this.dispatchEvent({target:this, type:onTimerDone, 
delta:_delta, timerDelta:tDelta});

   clearInterval(tInterval);
 }
   }

}


 Class End---

Gustavo Duenas wrote:
Hi, I'm trying to set a timer to trigger a event after 20 seconds or 
less, but so far i have this code, but with no results

someone help me? .
I don't know how could I got into but some help might be needed


this is the code: is inside the first frame of a movie clip and the 4 
frame has: gotoAndPlay(1);



var now = getTimer();
var seconds:Number = now/1000;
var later:Number = seconds+20;
this.onEnterFrame= function (){
if(seconds == later){
trace(llegamos);
   }
}
trace(seconds);



Regards


Gustavo Duenas



___
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


Re: [Flashcoders] Resize tool like Illustrator or photoshop white arrow

2007-03-25 Thread Alain Rousseau
You mean like a Free Distort tool ? I've seen some tests done with, 
can't remember the link ... might be a 3D experiment of some sort. I'll 
try to see if I bookmarked it.


Cédric PASCAL wrote:

Hello,

I'am actionscript programmer and also a studiant an i'would like to 
know how
to code a system to resize each corner of a movie clip or of an image 
(like

the white arrow in illustrator or photoshop).

Maybe a AS3 classe exist ?
A really dont know but i'am very interested by it.

Thanks and have a good week end !



___
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] Dealing with size of a multi languages site

2007-03-22 Thread Alain Rousseau

Hi Robert,

You should look into shared librairies for your fonts as it will spread 
the weight of the fonts over multiple files.
For possible solution I'd recommend going over 
http://www.muzakdeezign.com/flashcoders/ and search for font shared 
library

Lots of discussion on the subject !

Good luck !


Alain

Gosselin, Robert wrote:

HI,

I am building a site where we must include 6 different languages in it.
I am doing this by using the i18n method and everything work perfectly.

What would be the best way of dealing with the embedded fonts in my project?
What is the best method for saving size of my swf?

Right now I am doing some test and the swf is [EMAIL PROTECTED] heavy.

Thanks



ROBERT GOSSELIN   SENIOR FLASH DEVELOPER
SID LEE514.282.2200 # 619
COMMERCIAL CREATIVITY�SIDLEE.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


Re: [Flashcoders] Flash JavaScript Integration Kit Issues

2007-03-22 Thread Alain Rousseau
Check more on the JavaScript Side, It might be a problem accessing the 
DOM objects in IE6.


Check out document.documentElement in javascript, sometimes this is 
where the solution lies in such problems.
put some alerts() at the key places and try to find the value of the 
Flash object for IE6 ...


Hope this helps

Steve Mathews wrote:

Hi,

I have an issue with some e-learning content that I can't figure out.
The content is setup to communicate with the LMS using AICC and is
currently working fine in IE7 and FireFox. In IE6 it fails to finish
initializing and I believe I have tracked it down to a point where
Javascript is calling a Flash method, but Flash doesn't seem to
receive the call. Is there any known issues with the kit and IE6 that
I might look at, or any reasons for a call to just not get sent?

Thanks,
Steve
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Compiling with self-reference

2007-03-22 Thread Alain Rousseau
Hi Danny,

Maybe make it a 

public var pParent:Clarss;

or if you don't want your var to be accessed directly outside the class
(best practice)


class Clarss {
private var _pParent:Clarss;

function Clarss(tParent:Clarss) {
pParent = (tParent != undefined) ? tParent : this;
}


public function get pParent():Clarss {
return _pParent;
}

public function set pParent(value:Clarss):Void {
_pParent = value;
}
}


HTH

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Danny
Kodicek
Sent: 22 mars 2007 07:16
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Compiling with self-reference

Slightly complicated and not terribly important but annoying:

It's possible for a class to compile while self-referring:

class Clarss {
var pParent:Clarss;
function Clarss(tParent:Clarss) {
if (tParent != undefined) {
pParent = tParent;
}
}
}

This compiles fine. But with inheritance this no longer works:

class Clarss {
var pRoot:Clarss2
function Clarss() {
}
}
class Clarss2 extends Clarss {
function Clarss2() {
}
}

Now the compiler gets confused by the circular reference and tells me
**Error** C:\...Clarss.as: Line 1: The name of this class, 'Clarss',
conflicts with the name of another class that was loaded, 'Clarss'.


It's a shame: My object structure has a bunch of objects in a tree
structure, all of which inherit the same base class. I'd like them all to
have a reference to the top-level node object, but I have to refer to it as
an Object instead of its actual class name because otherwise it can't
compile.

Danny

___
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 2007-03-22
07:44
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.17/730 - Release Date: 2007-03-22
07:44
 

___
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] Anyway way to capture a SWF as a bitmap?

2007-03-21 Thread Alain Rousseau
Have you tried loading the swf inside a MovieClip and then trace the
MovieClip to a BitmapData object ? 
I don't know if the same security restrictions apply to swf files as with
image files ...

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Douglas
Pearson
Sent: 21 mars 2007 10:56
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Anyway way to capture a SWF as a bitmap?

Anyone know if there's a way to draw the contents of a SWF to a
Bitmap/BitmapData object within Flash?

I have a SWF that involves lots of complex rendering steps and I want to be
export it as a bitmap.  The export part should be fine (using a server to
actually save the file) if I can figure out how to get it into a BitmapData
object so I can call getPixels() on it.

Anyone have any ideas?

Doug

___
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.16/729 - Release Date: 2007-03-21
07:52
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.16/729 - Release Date: 2007-03-21
07:52
 

___
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: test EventDispatcher speed please

2007-03-20 Thread Alain Rousseau

Definitely slower on a Mac

FF :
EventBroadcaster: 5021
EventDispatcher: 16148


Safari :
EventBroadcaster: 5845
EventDispatcher: 17080


Opera 8.5:
EventBroadcaster: 5469
EventDispatcher: 17635


Player MAC, 9,0,28,0

no clue as to why tho ...

Good luck !

Francis Bourre wrote:

Hello list !

I noticed something weird about EventDispatcher execution speed in my 
mac player.
EventDispatcher.dispatchEvent execution is slow compared to a custom 
dispatcher implementation (named EventBroadcaster).


On Mac, EventDispatcher is slow:
EventBroadcaster: 2925
EventDispatcher: 12438

On Pc, EventDispatcher is faster.
EventBroadcaster: 3908
EventDispatcher: 3407

Can you please report the values you got (displayed on screen) when 
you open the url below and the browser you used for testing.

It takes few seconds to initialize (bench with iterations)

http://www.tweenpix.net/TestEventBroadcaster.swf

Any clue is welcome. ;)
Thanks in advance guys !

francis



Content of the test:

var tf1 : TextField = new TextField();
var tf2 : TextField = new TextField();
var tf3 : TextField = new TextField();
tf2.y += 30;
tf3.y += 60;
tf1.width = tf2.width = tf3.width = 150;
this.addChild( tf1 );
this.addChild( tf2 );
this.addChild( tf3 );
   
var holder : Array = new Array();

var l1 : Number = 1;
var l2 : Number = 1;
var lNum : Number = 500;

var eb : EventBroadcaster = new EventBroadcaster ( this );

var ed : EventDispatcher = new EventDispatcher ();
   
while( --lNum -(-1) )

{
var tg : Object = {foo:function( e : Event ):void{ this.e = 
e.type; }};

ed.addEventListener( foo, tg.foo );
eb.addEventListener( foo, tg );
holder.push( tg );
}

var t : Number = 0;
var e : Event = new Event( foo );

//

t = getTimer();
while( --l2 -(-1)) eb.broadcastEvent( e );
t = getTimer() - t;
trace( EventBroadcaster: , t );
tf1.text = EventBroadcaster:  + t;
//
t = getTimer();
while( --l1 -(-1)) ed.dispatchEvent( e );
t = getTimer() - t;
trace( EventDispatcher: , t );
tf2.text = EventDispatcher:  + t;

tf3.text = flash.system.Capabilities.version;
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Accessing an Associative Array

2007-03-13 Thread Alain Rousseau
Actually you have an Object not an Array when you define your variable :

var myarray = { text:Lorem ipsum };

is the same as

var myarray:Object = new Object();
myarray.text = Lorem ipsum;

but with Actionscript you can access objects with the array notaion []

var i:Number = 1;
var myMC:String = movieClip+i;

this[myMC]._x = 26;

myarray[text] = Lorem Ipsum;

instead of

this.movieClip1._x = 26;

myarray.text = Lorem Ipsum;


If you really want an associative array, look at Jason's answer
Otherwise keep on using the Object notation, but you will lack all the Array
object specific methods 


Alain 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andy Herrman
Sent: 12 mars 2007 16:47
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Accessing an Associative Array

I think this is your problem:

showPopup(myarray);

You're passing showPopup a string with the value myarray, not the array.
Remove the quotes and you should be good.

  -Andy

On 3/12/07, Bill Abel [EMAIL PROTECTED] wrote:
 How do you access an associate array using a variable?

 Inside my function popup[text]; won't access the array. I can't find 
 any information in the books I have Actionsript Cookbook and 
 Actionscript for Flash MX.

 Anyone dealt with this before?

 // Define the text and titles for the popups var myarray = { text: 
 Lorem ipsum dolor sit amet ... };

 // Testing - this works!
 trace(myarray[text]);

 // Show the popup
 function showPopup(popup) {
 mainMap[popup].gotoAndPlay(on);
 mainMap[popup].label_title.text = popup[text];  // This doesn't
work.
 trace(popup[text]);
 };

 showPopup(myarray);
 ___
 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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.10/720 - Release Date: 2007-03-12
19:19
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.10/720 - Release Date: 2007-03-12
19:19
 

___
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] Calling Captivate variables from Flash.

2007-03-09 Thread Alain Rousseau

You should go to the following sites :

http://www.adobe.com/cfusion/webforums/forum/index.cfm?NoCookies=Yes

http://www.raisingaimee.co.uk/index.php?option=com_contenttask=viewid=27Itemid=29

There you will find more answers to Captivate !


Good Luck !

Alain

yuvarajm wrote:

Hi,
Thanks for the help. I tried xray but it didn't work.  
I don't have any .fla files I have only swf. Through Captivate I tried

exporting the files to flash 2004 or flash 8 (so as to get the .fla's)
but it is giving me error. My Basic problem is that I a have some demo
created in captivate followed by two to three Multiple choice assessment
questions followed by the result screen. I Have loaded the swf in a
flash using loadmovie. But I want to track all the variables like score,
Max score, number of questions etc. How do I access them? I tried using
the debugger in flash but it does not show me any variables. Please let
me know how to go about it? 
Thanks and Regards,

Yuvaraj



Unless indicated otherwise, the information contained in this message is 
privileged and confidential, and is intended only for the use of the 
addressee(s) named above and others who have been specifically authorized to 
receive it. If you are not the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this message and/or attachments 
is strictly prohibited. The company accepts no liability for any damage caused 
by any virus transmitted by this email. Furthermore, the company does not 
warrant a proper and complete transmission of this information, nor does it 
accept liability for any delays. If you have received this message in error, 
please contact the sender and delete the message. Thank you.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Calling Captivate variables from Flash.

2007-03-08 Thread Alain Rousseau

Hi Yuvaraj,

if you load your captivate file inside a Flash Movie with either 
loadMovie or MovieClipLoader, then you can access the variables directly 
through code.
To know wich variables are available to you, you should look into XRay 
http://www.osflash.org/xray, it will list them all


HTH

Alain


yuvarajm wrote:

Hi,
I need to access the variables of captivate from flash, how do I go
about it? I have created an assessment in captivate and I have to access
the variables which store score, correct option , number of tries etc.
and is there any way I can pass variables from flash to captivate? Does
any body have a doc or a PDF related to this.
Regards,
Yuvaraj Mohite

Unless indicated otherwise, the information contained in this message is 
privileged and confidential, and is intended only for the use of the 
addressee(s) named above and others who have been specifically authorized to 
receive it. If you are not the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this message and/or attachments 
is strictly prohibited. The company accepts no liability for any damage caused 
by any virus transmitted by this email. Furthermore, the company does not 
warrant a proper and complete transmission of this information, nor does it 
accept liability for any delays. If you have received this message in error, 
please contact the sender and delete the message. Thank you.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Updating old source

2007-03-08 Thread Alain Rousseau

Gordon is a Flash Decompiler for Mac
http://www.futurecandy.net/




Glen Pike wrote:

Hi,

If your source's are corrupted and you still have the SWF's you may 
want to look at using a decompiler to rebuild your FLA files.


I like ASV http://www.buraks.com/asv/ and Flash Decompiler 
http://www.flash-decompiler.com/  I know these are Windows only so you 
may want to Google for other stuff or someone else may want to help 
you out here...


Glen

David Cohn wrote:

Andy,

Sorry if that wasn't specific enough.

By source, I mean .fla files-- replete with all sorts of graphics, 
movieClips, buttons, etc...


Thanks,
--Dave




From: Andy Herrman [EMAIL PROTECTED]

So, by source, do you mean code, or are there graphics objects as
well?  If it's just code then why not open them in 10.2 where it works
and then copying the code out to text files?

   -Andy

On 3/8/07, David Cohn [EMAIL PROTECTED] wrote:

Hey all,

I'm trying to update some old, old source FLA files which were last
updated in Flash MX (the original development preceeded even that),
and I'm having trouble with some of the files-- i.e. Flash crashes on
opening them!

The old source is on a Mac 10.2.8 system, and I need to get the files
editable on Mac 10.4.8.

I've tried:
1. copying the MX files from 10.2 and opening them with 
Flash 8 on 10.4
2. installing MX 2004 on 10.2, saving and compacting the 
files,

copying and opening them with Flash 8 on 10.4
3. installing MX 2004 on 10.4, and opening the MX04 source 
with MX

2004 on 10.4
4. opening the MX source in MX 2004 on 10.4

In both cases, I updated MX04 to v7.2.
In all cases, the same few files crash Flash (except #4, where the
files wouldn't open at all).

Anybody run into this, or have any ideas on how I can salvage the
source?

Thanks,
--Dave




___
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


RE: [Flashcoders] AS3... when to start?

2007-03-05 Thread Alain Rousseau
The thing is, are you a graphic designer or a programmer? 

If the first, i'd recommend you stick with Flash, otherwise it's up to you
to choose.
Not all Flash websites are RIA, but they are tending to be so more and more.
hence the need of a team : Designers -Flash ,  Programmers - Flex or FLash


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Seth
Caldwell
Sent: 5 mars 2007 13:26
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] AS3... when to start?


 If you have an ounce of artist in you please avoid Flex. 
I would disagree with this entirely. Flex frees up an artist to focus on the
areas they want to work with. If you're a UI artist, sure, avoid flex.

Telling an artist to avoid flex in flash development would be like telling a
video game developer to avoid directx.

Not all sites use that many flex components, but they're a good tool when
needed.

Seth



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kalani
Bright
Sent: Sunday, March 04, 2007 1:28 PM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] AS3... when to start?


I don't know about FDT or what that was based on.
I know Adobe purchased a company which produced Eclipse related plugins such
as JSEclipse.
Which probably is how they got Flex Builder built so fast.

As far as Flex goes verything can be done in Flash.
If you have an ounce of artist in you please avoid Flex. 
Flex is somewhat the equivalent of visual studio .net's ide.  Drag and drop
components onto the stage.
It's a boring sort of deal...more interesting than other technologies...but
not flash + code.  But yes it is faster.

But I use Flex Builder 2 in conjuction with Flash and avoid Flex altogether.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Omar Fouad
Sent: Sunday, March 04, 2007 12:28 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] AS3... when to start?

I think what you can do in flex can be done in flash, flex is
easierthough

Is this right??


On 3/4/07, Chris RM [EMAIL PROTECTED] wrote:

 I didn't know Flex Builder was based off Eclipse. I haven't used F.B.
 but how does it differ from the FDT plug-in for Eclipse? Is it as 
 robust as FDT?

 http://ftd.powerflasher.com

 Chris


 On Mar 4, 2007, at 12:04 PM, Muzak wrote:

  Hi Micky, see inline reply.
 
  - Original Message -
  From: Micky Hulse [EMAIL PROTECTED]
  To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
  Sent: Sunday, March 04, 2007 6:32 AM
  Subject: [Flashcoders] AS3... when to start?
 
 
  Hi all,
 
  I just picked-up Actionscript 3.0 Cookbook (O'Reilly) today, and 
  found myself pondering this:
 
  Is it time to make the switch from v2 to v3 AS?
 
  That (as always) depends on your goal (project).
  If you're into RIA's, Flex+AS3 is probably better suited for the job.
 
  Third paragraph states:
 
  This book assumes that you have obtained a copy of Flex Builder 2 
  and have successfully installed it on your computer. ... 
 
  What happened to coding in Flash? Am I waiting for the next version 
  of Flash until I can successfully and/or easily write AS3 via the 
  Flash application?
 
  I think the above answer applies here as well.
 
  Will the future of Flash AS always require the Flex Builder? Or, is 
  Flex Builder just one out of many/few code editors for compiling 
  the new AS3 code?
 
  Flex Builder is just another AS editor. It just happens to be ahead 
  of the Flash IDE when it comes to AS-version.
  AS3 for the Flash IDE is currently only available through the AS3 
  alpha preview (http://labs.adobe.com)
 
  If I only want to animate some objects around the stage 
  programatically (for something like a website header), should I 
  just make the switch to AS3 (if player versions were not an issue), 
  or is
  AS2 still an acceptable way of producing small action-scripted 
  movies?
 
  I see no reason why you'd switch to AS3 for this kind of work.
 
  Links? Blog posts? Articles? Am I over-complicating things?
 
  What kind of links/articles are you looking for?
  http://labs.adobe.com/technologies/flash9as3preview/
  http://www.adobe.com/products/flex/
  http://www.adobe.com/devnet/flex/
  http://tech.groups.yahoo.com/group/flexcoders/
  http://weblogs.macromedia.com/mxna/
 
 
  As for over-complicating things, I'd say, yes ;-)
 
  Flex/Flex Builder was made because Flash (as a technology) has 
  become more and more powerful and more and more programmers with all 
  kinds of backgrounds (Java, .NET, etc..) started using it (or wanted
  to) but found the Flash IDE lacking, especially compared to other 
  tools available for other languages.
  So Flex/Flex Builder is not here to replace the Flash IDE, but
  (finally) gives those that are more into the programming side of 
  things a powerful and robust tool that they're probably already 
  comfortable with, since it's based on Eclipse
 

Re: [Flashcoders] clearInterval(0);

2007-03-04 Thread Alain Rousseau

Well actually, clearInterval(0) clears the interval ID 0

lets say you have an interval defined :

var myInt:Number = setInterval(this, doSomething, 1000);

then it is possible that myInt = 0.

The value of myInt is set by calling setInterval, which returns the ID 
of the interval,

so doing clearInterval(0) is the same as doing clearInterval(myInt)

but otherwise it doesn't do anything if no interval ID 0 exists

Adam Pasztory wrote:

Wow, lots of interval questions lately... :)

I don't believe clearInterval(0) does anything.  However, the code you
posted looks correct.

-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




___
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 Dynamic Text to Scroll Pane

2007-03-01 Thread Alain Rousseau
Again you need to have your MovieClip inside the Library not on stage and
contentPath takes only a String not a MovieClip.

so you have to do the following :

myListingScroll.contentPath = listingTextMC;  // this does the same as
attachMovie but inside the ScrollPane
var listingMC:MovieClip = myListingScroll.content; // make a reference of
the movieClip you just added to the ScrollPane
var myTextFld:TextField = listingMC.Listing_Text;  // make a reference of
the textField inside your movieClip

var dataLV:LoadVars = new LoadVars();
dataLV.onLoad = function(success) {
if (success) {
myTextFld.text = dataLV.Listings;
}
};
dataLV.load(listing.txt);

 Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve Abaffy
Sent: 1 mars 2007 13:09
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Adding Dynamic Text to Scroll Pane

Hello, 

Thank you for the warm welcome, I am glad to be here.

The problem unfortunately still exists. Here is the code I now have.

Data = new LoadVars();
Data.load(/listing.txt);
Data.onLoad = function (success)
{
if (success)
{
ListingTextMC.Listing_Text = Data.Listings;
MyListingScroll.contentPath = ListingTextMC;
MyListingScroll.Refresh();
}
}
ListingTextMC is a movie clip and all that is in it is a dynamic textbox
with the name Listing_Text

And there is no content in the scroll pane. I added a dynamic text box to
the same frame as the scrollpane and I can put the value of Data.Listing
into it so I know that I am reading the file correctly.
What I am I doing wrong here??

__
Hello Steve and welcome to flashcoders,


the proper way to set content for a ScrollPane is as follow :

MyScrollPane.contentPath = myContent;

where myContent is a MC in your library with a linkage ID myContent

So what you should do is create a MovieClip with your dynamic text in it and
export it for ActionScript with linkage ID myContent

Look up the ScrollPane methods in Flash help as well for other tips.

Hope this helps

Alain

   
___
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.5/706 - Release Date: 2007-02-28
16:09
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.5/706 - Release Date: 2007-02-28
16:09
 

___
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] Set Interval Question

2007-03-01 Thread Alain Rousseau
You should rethink your approach, 

I believe it will be easier to just 

start a fade in, 
wait 10 seconds, 
fade out. 

When the fade out is complete start over with another picture. 

untested code below :

import mx.transitions.Tween;
import mx.transitions.easing.*;

var curID = 0;
fadeIn();

function fadeIn() {
curID++;
var curMC:MovieClip = image + curID;
myTween = new Tween(curMC, _alpha, Strong.easeIn, 0, 100, 1.5,
false); // or something like that 
myTween.onMotionFinished = Delegate.create(this, pauseImage);
}

function pauseImage() {
setTimeout(fadeOut, 7000);
}

function fadeOut() {
var curMC:MovieClip = image + curID;
myTween = new Tween(curMC, _alpha, Strong.easeOut, 100, 0, 1.5,
false);
myTween.onMotionFinished = Delegate.create(this, fadeIn);
if (curID  6) curID = 0; // we start back at the first image
}

HTH !

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul V.
Sent: 1 mars 2007 14:46
To: Flash Coders; Flashnewbie Mailing List
Subject: [Flashcoders] Set Interval Question

Hello Again,
  I have a setInterval issue/question, here it is.  I set a main timer.  10
seconds.  In that 10 second interval, I load, fade in, pause on, and fade
out, that image.  That is working mostly fine.  Accept I have a seperate
setInterval starting for the images fade in and fade out functions (1.25 sec
* 2).  And have it pausing for the remainder which should be 7.5 seconds.
Problem is it doesn't work out, and by the 4th or 5th image it is noticably
offset.  I am guessing this is because of the time it takes to process the
code, didn't seem likely at first, but It is not off by much, and it seems
to be increasing marginally which means that not much, becomes significant.
Long story short, well...point being that I want to be able to call the main
timer, and tap into it at 0-1.25 seconds and then again at 7.5 -10 seconds
to run the image fade in and fade out.  Can I do this, from  

variableName = SetInterval (function, 1);  

use the running timer for other functions?

Thanks again.
If you need clarification about just what the heck I am trying to say.  I
can send in some code.

Thanks,

Paul Vdst
___
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.5/706 - Release Date: 2007-02-28
16:09
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.5/706 - Release Date: 2007-02-28
16:09
 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Getting frustrated. regarding set Interval, and for loop.

2007-02-28 Thread Alain Rousseau

Hi Paul,

actually  what you should do with setInterval is something like 
setInterval(functionReference, interval);
or to keep the scope of the interval : setInterval(this, 
functionReference, interval);


secondly, if you want  to load the image at a set interval, then your 
approach is wrong. You should call setInterval to attach a new movie and 
increment the count inside that interval.
There is no delay in a for loop, at least none noticeable enough in this 
case. What is happening in your code is that all 5 pictures will appear 
at the same time after 1 second. Don't know if that's what you aim for.


in the case you want the pictures to appear at a 1 second interval, your 
code would become :


// if you're in a class do the following
private var myIntrvl:Number;
private var movieCount:Number;

// if not :
var myIntrvl:Number = 0;
var movieCount:Number = 0;

function loadImages() {
   this.clearInterval(myIntrvl);  // it's best practice to clear your 
interval before setting it, you never know where it has been set before

   myIntrvl = setInterval(this, doLoadImage, 1000);
}

function doLoadImage() {
   movieCount++;
   this.attachMovie(image+i, image+i, 41); // allways refer to the 
movieClip you are attaching, in your case it's this
   image = this[image+i]; // eval is deprecated in Flahs 8,  so this 
is a better syntax

   // rest of your resizing code afterwards
}
  
Hope this helps !



Alain

Paul V. wrote:

Let me explain the problem I am having and then I will send you some code.  I 
want to load up images in a slide show with set interval, with the images being 
called image1 image2 image 3 etc.  I want to be coding a dynamic slide show so 
that if I change the images I can just replace the mc images.

here is the code I am working on, I am a little new to setInterval (completely new to that function actually) - I do understand the basic syntax, 
setInterval( function (){ //entire function here;},1000);


But I don't know how to run a for loop inside it and pass a variable to it. (I 
am a newbie).

function loadImages(){//Ihave this here so I can run an external for 
loop.
 for(i=1;i6;i++){
  setInterval(function(){ //set interval and begins anonymous function  i.e function() -no name   
  attachMovie(image+i,image+i,41);   //trying to attach the images, image1 - image5

  image = eval(image+i);//instance assigned to 
variable  'image'
  image._x = ((Stage.width / 2)-(image._width/2));   //positioning
  image._y = (yFactor);//positioning
  oldwidth = image._width;   //saving 
dimensions for resizing formula
  oldheight = image._height;//saving 
dimensions for resizing formula
 
  image._height = yheight; //image height set to variable  
  image._width = ((oldwidth*yheight)/oldheight);   //image width set to proportions of original 
},1000);   //interval to 1 sec. 1000 milliseconds 
 }//end for loop
}   //end container function 


I am trying to set the images up for a second and then have them switch.
Help me out if you you know a solution.  Or even if you see some obvious 
errors. Like I said I am new with the set interval.  by the way if you like 
that little resizing technique, you can use it. Thank you.

Looking forward to a response on this one.

Paul Vdst
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Resize Flash content dynamically via JS in IE6 when DOCTYPE declaration is present in HTML

2007-02-28 Thread Alain Rousseau
If i look at the code from Eduardo Ramos, I can see a problem for IE6 in 
the pixelWidth property. I don't believe it exists ...


what you should be doing is the following :

function newSize(datoX,datoY) {
   var flashElement;
   if(document.all  !document.getElementById) {
   flashElement = document.all['miFlash'];
   }else{
   flashElement = document.getElementById('miFlash');
   }
   flashElement.style.width = datoX + px;
   flashElement.style.height = datoY + px;
}

Where you are setting the CSS width and height of the element you 
selected (miFlash). And CSS width and height styles are defined with 
either px, em, %   


#flashcontent {
   width: 100 px;
   height: 100 px;
}


this is not tested but I believe it should work. I have a similar but 
more complex code for resizing iframes and it works in IE6 as well.


good luck !


Alain


JabbyPanda wrote:

Dear flashcoders,

  I have a flash content sitting on the single page with dynamic height
and width value (100% and 100%).

---example of SWF embedding in HTML
  var flashObj = new SWFObject(myFlash.swf, flash_obj, 100%, 100%, 9, 
true);


  I resize the Flash content using JS by applying technique described by Eduardo
Ramos here: http://2mdc.com/resizableFlash/

  As it was correctly mentioned here
http://www.dncompute.com/blog/2006/03/20/javascript-flash-resize.html
this resize techninuque does not work in Internet Explorer 6 browser
if DOCTYPE XHTML declaration line is present in HTML page.

The question is:
How to resize flash content dynamically if NEED to keep DOCTYPE XHTML 
declaration line
in HTML and IE6 is still on the list of supported browsers :)
  



--
Bstrgs,
JabbyPanda

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Getting frustrated. regarding set Interval, and for loop.

2007-02-28 Thread Alain Rousseau

Ahh yes forgot something to stop loading images :

function doLoadImage() {
  movieCount++;
  this.attachMovie(image+i, image+i, 41); // allways refer to the 
movieClip you are attaching, in your case it's this
  image = this[image+i]; // eval is deprecated in Flahs 8,  so this 
is a better syntax

  // rest of your resizing code afterwards

   // When you have all 5 images, stop calling the interval
   if (movieCount == 5) {
  this.clearInterval(myIntrvl);
   }
}



Alain Rousseau wrote:

Hi Paul,

actually  what you should do with setInterval is something like 
setInterval(functionReference, interval);
or to keep the scope of the interval : setInterval(this, 
functionReference, interval);


secondly, if you want  to load the image at a set interval, then your 
approach is wrong. You should call setInterval to attach a new movie 
and increment the count inside that interval.
There is no delay in a for loop, at least none noticeable enough in 
this case. What is happening in your code is that all 5 pictures will 
appear at the same time after 1 second. Don't know if that's what you 
aim for.


in the case you want the pictures to appear at a 1 second interval, 
your code would become :


// if you're in a class do the following
private var myIntrvl:Number;
private var movieCount:Number;

// if not :
var myIntrvl:Number = 0;
var movieCount:Number = 0;

function loadImages() {
   this.clearInterval(myIntrvl);  // it's best practice to clear your 
interval before setting it, you never know where it has been set before

   myIntrvl = setInterval(this, doLoadImage, 1000);
}

function doLoadImage() {
   movieCount++;
   this.attachMovie(image+i, image+i, 41); // allways refer to the 
movieClip you are attaching, in your case it's this
   image = this[image+i]; // eval is deprecated in Flahs 8,  so this 
is a better syntax

   // rest of your resizing code afterwards
}
  Hope this helps !


Alain

Paul V. wrote:
Let me explain the problem I am having and then I will send you some 
code.  I want to load up images in a slide show with set interval, 
with the images being called image1 image2 image 3 etc.  I want to be 
coding a dynamic slide show so that if I change the images I can just 
replace the mc images.


here is the code I am working on, I am a little new to setInterval 
(completely new to that function actually) - I do understand the 
basic syntax, setInterval( function (){ //entire function here;},1000);


But I don't know how to run a for loop inside it and pass a variable 
to it. (I am a newbie).


function loadImages(){//Ihave this here so I can run an 
external for loop.
 for(i=1;i6;i++){  setInterval(function(){ 
//set interval and begins anonymous function  i.e function() -no 
name attachMovie(image+i,image+i,41);   //trying to 
attach the images, image1 - image5
  image = eval(image+i);//instance assigned 
to variable  'image'

  image._x = ((Stage.width / 2)-(image._width/2));   //positioning
  image._y = (yFactor);
//positioning
  oldwidth = image._width;   
//saving dimensions for resizing formula
  oldheight = image._height;
//saving dimensions for resizing formula
 
  image._height = yheight; 
//image height set to variableimage._width = 
((oldwidth*yheight)/oldheight);   //image width set to proportions of 
original 
},1000);   
//interval to 1 sec. 1000 milliseconds 
 }
//end for loop
}   //end 
container function

I am trying to set the images up for a second and then have them switch.
Help me out if you you know a solution.  Or even if you see some 
obvious errors. Like I said I am new with the set interval.  by the 
way if you like that little resizing technique, you can use it. Thank 
you.


Looking forward to a response on this one.

Paul Vdst
___
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

Re: [Flashcoders] Getting frustrated. regarding set Interval, and for loop.

2007-02-28 Thread Alain Rousseau

And another error on my part in doLoadImage replace i with movieCount

Alain Rousseau wrote:

Hi Paul,

actually  what you should do with setInterval is something like 
setInterval(functionReference, interval);
or to keep the scope of the interval : setInterval(this, 
functionReference, interval);


secondly, if you want  to load the image at a set interval, then your 
approach is wrong. You should call setInterval to attach a new movie 
and increment the count inside that interval.
There is no delay in a for loop, at least none noticeable enough in 
this case. What is happening in your code is that all 5 pictures will 
appear at the same time after 1 second. Don't know if that's what you 
aim for.


in the case you want the pictures to appear at a 1 second interval, 
your code would become :


// if you're in a class do the following
private var myIntrvl:Number;
private var movieCount:Number;

// if not :
var myIntrvl:Number = 0;
var movieCount:Number = 0;

function loadImages() {
   this.clearInterval(myIntrvl);  // it's best practice to clear your 
interval before setting it, you never know where it has been set before

   myIntrvl = setInterval(this, doLoadImage, 1000);
}

function doLoadImage() {
   movieCount++;
   this.attachMovie(image+i, image+i, 41); // allways refer to the 
movieClip you are attaching, in your case it's this
   image = this[image+i]; // eval is deprecated in Flahs 8,  so this 
is a better syntax

   // rest of your resizing code afterwards
}
  Hope this helps !


Alain

Paul V. wrote:
Let me explain the problem I am having and then I will send you some 
code.  I want to load up images in a slide show with set interval, 
with the images being called image1 image2 image 3 etc.  I want to be 
coding a dynamic slide show so that if I change the images I can just 
replace the mc images.


here is the code I am working on, I am a little new to setInterval 
(completely new to that function actually) - I do understand the 
basic syntax, setInterval( function (){ //entire function here;},1000);


But I don't know how to run a for loop inside it and pass a variable 
to it. (I am a newbie).


function loadImages(){//Ihave this here so I can run an 
external for loop.
 for(i=1;i6;i++){  setInterval(function(){ 
//set interval and begins anonymous function  i.e function() -no 
name attachMovie(image+i,image+i,41);   //trying to 
attach the images, image1 - image5
  image = eval(image+i);//instance assigned 
to variable  'image'

  image._x = ((Stage.width / 2)-(image._width/2));   //positioning
  image._y = (yFactor);
//positioning
  oldwidth = image._width;   
//saving dimensions for resizing formula
  oldheight = image._height;
//saving dimensions for resizing formula
 
  image._height = yheight; 
//image height set to variableimage._width = 
((oldwidth*yheight)/oldheight);   //image width set to proportions of 
original 
},1000);   
//interval to 1 sec. 1000 milliseconds 
 }
//end for loop
}   //end 
container function

I am trying to set the images up for a second and then have them switch.
Help me out if you you know a solution.  Or even if you see some 
obvious errors. Like I said I am new with the set interval.  by the 
way if you like that little resizing technique, you can use it. Thank 
you.


Looking forward to a response on this one.

Paul Vdst
___
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


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

2007-02-28 Thread Alain Rousseau

Hi Paul,

checked your files and indeed the position was wrong if you dragged and 
droped too fast. I made a simple fix to your code and now it works 
nicely. In your onRelease function you should grab the final position of 
your mc. Here is the code with a bit of cleaning up and use of Delegate 
to be sure the scope is respected :


import mx.utils.Delegate;

var mouseDragListener:Object = new Object();
var mcDrag:MovieClip = mcTruckScrubber.mcDragControl; // make a 
reference to the draggable mc for easier typing


// This will be used when the drag/scrubber control is moved
mouseDragListener.onMouseMove = Delegate.create(this, setText);

function setText() {
   asdf.text = Math.ceil(this.mcDrag._x);
};



// Watch for mouse down on the scrubber control (the little vehicle icon)
this.mcDrag.onPress = Delegate.create(this, dragMC);

// When the user releases the mouse button outside the drag control 
area, treat it like a normal release:
this.mcDrag.onReleaseOutside = this.mcDrag.onRelease = 
Delegate.create(this, stopDragMC);



function dragMC(){
   mcDrag.startDrag(false,0, 0, 300, 0);
   // Start watching the mouse and do what the listener says:
   Mouse.addListener(mouseDragListener);
};

function stopDragMC(){
   mcDrag.stopDrag();
   asdf.text = Math.ceil(this.mcDrag._x);// grab the final position of 
the mc
   Mouse.removeListener(mouseDragListener);  // this stops listening to 
mouse move goodies

};


enjoy !


Alain

Paul Hoza 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:

Re: [Flashcoders] Adding Dynamic Text to Scroll Pane

2007-02-28 Thread Alain Rousseau

Hello Steve and welcome to flashcoders,


the proper way to set content for a ScrollPane is as follow :

MyScrollPane.contentPath = myContent;

where myContent is a MC in your library with a linkage ID myContent

So what you should do is create a MovieClip with your dynamic text in it and export it 
for ActionScript with linkage ID myContent

Look up the ScrollPane methods in Flash help as well for other tips.

Hope this helps

Alain


Steve Abaffy wrote:

Hello,
 I am new to the group and have already looked at the archives, and
on line for the answer to this and can't find it anywhere. Here is what I
have. I have a MC which has a ScrollPane. I have the ScrollContent set to
nothing (Also tried setting it to a dynamic text box) and when I get all the
text correctly formatted (which is read from a file) I try this in the first
frame of the MC.

MyScrollPane.setScrollContent(MyText); // Doesn't work
MyScrollPane.ScrollContent(MyText); //Doesn't work
MyScrollPane.ScrollContent = MyText; // Doesn't work 


I'm running out of ideas.
Any help would be appreciated.



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Flash 9 Full Screen Mode - Mac Player bugs?

2007-02-28 Thread Alain Rousseau
apart from Do not use Safari, ever ! , I don't know what could be the 
cause of this ...


I've tried with a simple test, and indeed onRollOver and onRollOut seem 
to be overriden by something else ...
If you *click* on the button with a onRollOver, then the call is made ! 
weird ! Definitely a Safari / Flash 9 issue ...


it works fine otherwise.

Maybe a bug report should be filed for this ?

Alain

Dan Rogers wrote:

Yo Flashcoders,

I am attempting to use the fullscreen feature in the Flash 9 player 
(Stage[displayState]), while keeping my publish version set to v8.  
Everything seems to work fine, but when I use the feature on Safari 
for the Mac, some of my button methods aren't working properly-  
namely onRollOver.   Has anyone else ran into this issue?


Any suggestions would be most appreciated.

-Danro
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


.


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


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

2007-02-28 Thread Alain Rousseau
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/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Captivate and ActionScript

2007-02-27 Thread Alain Rousseau
Yup it is possible,
but if you could be a bit more specific as to what you want to fetch and
set, we can tell you which variables can or cannot be changed.

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Roberto M.
Basáñez González
Sent: 26 février 2007 13:02
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Captivate and ActionScript
Importance: High

Hi All:

I need to pass variables from swf animation to captivate and from captivate
to swf animation. It is posible? Any idea?

Thanks, Roberto. 



__
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.4/702 - Release Date: 2007-02-25
15:16
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.4/702 - Release Date: 2007-02-25
15:16
 

___
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 : Captivate and ActionScript

2007-02-27 Thread Alain Rousseau

Hi Roberto,

yes it's possible but you'll have to share more info as to what yo want 
to pass and get. There are certain ways of doing this. What is your setup ?


Alain

Roberto M. Basáñez González wrote:

Hi All:

I need to pass variables from swf animation to captivate and from 
captivate to swf animation. It is posible? Any idea?


Thanks, Roberto.

   
__ LLama Gratis a 
cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por 
minuto. http://es.voice.yahoo.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


Re: [Flashcoders] Append variables to SWF server-side

2007-02-27 Thread Alain Rousseau
You should look into flasm (http://flasm.sourceforge.net/) or any code 
injecting software out there


Mick G wrote:

Does anyone know if there is a way to add data to a SWF file server-side?

Eg. I have a swf that site on my server. I want users to be able to 
select
an option from a dropdown such as Select a color: BLUE. This would 
then send

them a SWF to download that has the variable color=blue embedded into the
SWF. I guess this would mean the server would need to recompile a SWF 
which
would require large CPU so I'm not sure if this is possible but 
thought I'd

ask anyway.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] IE 7 and ExternalInterface.call()

2007-02-19 Thread Alain Rousseau
this could be related to how you reference the ActiveX control in your
javascript. Some things have changed a little between IE6 and IE7 regarding
DOM objects access 

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 19 février 2007 14:12
To: Flashcoders mailing list
Subject: [Flashcoders] IE 7 and ExternalInterface.call()

ExternalInterface.call(myFunction);

is working great in Firefox and Safari, but does nothing in IE7 (though it
worked in IE6).

(addCallback still works OK)

Anyone have a suggestion as to how to fix this?

Thanks,

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

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.18.2/692 - Release Date: 2007-02-18
16:35
 

___
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] Action Script editor (OT)

2007-02-18 Thread Alain Rousseau
We would need the source code of FlashDevelop to compile with DarWINE on 
a Mac, it's not an emulator !



Toby wrote:

Im not sure how good darwine  http://darwine.opendarwin.org/ is getting but
that's something I would look at on the mac most definitely.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of eric dolecki
Sent: 18 February 2007 05:06
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Action Script editor

Intel Mac = XP possibilities. I run the PC version of SEPY on my Mac from
time to time using Parallels and XP.

Eric

On 2/17/07, Muzak [EMAIL PROTECTED] wrote:
  

check the archives
http://muzakdeezign.com/flashcoders/?q=actionscript%20editor

Muzak

- Original Message -
From: pedr browne [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Saturday, February 17, 2007 3:14 PM
Subject: [Flashcoders] Action Script editor




Hi,

Just wondering what AS editors people were using? I love sepy but can't
  

get


it to run without errors on my intel mac. Does anyone have a good
alternative?

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


RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Alain Rousseau
Also if you want to create your own onResult Event (it's not a real event)
you can do this without EventDispatcher or listeners :

class com.boa.projects.iqrcgenerator.components.AdminData{

public var onResult:Function;
private var userData:Object;

public function wsUserDataByLOB(lobDbId:Number):Void{
var getUserListResult:Object = new Object();
getUserListResult =generatorWebService.GetUserList(lobDbId);
getUserListResult.onResult = Delegate.create(this,
resultHandler);
}

private function resultHandler(oUser:object) {
// handle the data however you want ..
// now trigger the onResult method
this.onResult(oUser);
}

//... the rest of your class below 
}

Now in another class where you import AdminData with say an instance called
admData :

var admData:AdminData = new AdminData();
admData.onResult = function(oUser) {
// your code handling here
}




As for a method with EventDispatcher, you'll find pretty much what you need
with what the others gave you ! :)

HTH !

Alain
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: 16 février 2007 10:03
To: Flashcoders mailing list
Subject: [Flashcoders] Events for custom classes?

OK, I'm pretty good at Actionscript 2.0, but something I never really
understood and now need to.

Core question:  How do I make an event in a custom class, and how do I make
a listener in another class listen for the event?  

EventBroadcaster in the help docs seems to only show how to use it with
Adobe classes and components. Docs on listener are the same.  I know how to
set up listeners for other events, like keypresses and mouse rollovers.
Easy enough.  But my problem is this (see comments in code
below):

class com.boa.projects.iqrcgenerator.components.AdminData{

private var userData:Object;

public function wsUserDataByLOB(lobDbId:Number):Void{
var getUserListResult:Object = new Object();
getUserListResult =
generatorWebService.GetUserList(lobDbId);
getUserListResult.onResult = function(oUser){
//this works fine, 
//I can capture this event result here,
//but how do I notify another class?
//also what about scope here?
//how to set userData as oUser result?
//can I fire an event in my AdminData
//class from here?
}
}

public function getUserData():Object{
//can't let user get this data
//until Webserive event is done.
return userData;
}
}

Thanks,


Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
___
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.412 / Virus Database: 268.18.0/689 - Release Date: 2007-02-15
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.412 / Virus Database: 268.18.0/689 - Release Date: 2007-02-15
 

___
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] Events for custom classes?

2007-02-16 Thread Alain Rousseau
Jason,

So if I understand clearly what you want to do is :

From Class A : (pseudo code following)

class ClassA {
private var instClassB:ClassB;
make comboBox
make datagrid
function ClassA() {
instClassB = new ClassB();
comboBox.onChange = Delegate.create(this, cbChangeHandler);
instClassB.addEventListener(webServiceResult, this);
}

function cbChangeHandler(e){
instClassB.getWSdata(e.value);
}

function webServiceResult(evtObj:Object) {
update datagrid with evtObj.newData
}

}

class ClassB {
Decorate with EventDispatcher methods
dispatchEvent, addEventListener, removeEventListener

function ClassB() {
EventDispatcher.initialize(this);
}

function getWSdata(val) {
get data from web service
wsInstance.onResult = Delegate.create(this,
wsResulthandler);
}

function wsResulthandler(data) {
this.dispatchEvent({type:webServiceResult, newData:data})
// add anything you want to pass in the object
}
}

Now you have them both communication the way you want

Have fun !

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: 16 février 2007 14:36
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?

Daniel, try as I may, I can't get your code to work.  I have one class,
which has a combobox.  I can get the event to fire when the combobox changes
just fine, but I can't get it to hear the firing of the data capture from
the webservice in the other class.

So basically, in pseudocode, I need to do this:

class A{
make comboBox
make datagrid
when comboBox changes, use Class B
to get data from webservice
when webservice result received, 
update datagrid with new data

}

class B{
connect to webservice   
when requested, return data to requesting class }

Reason I want these two classes to be separate is because I want other
classes to call Class B to get data as well.  So, I can do all of those
things just fine, they are all working, except for the last part, when
requested, return data to requesting class - I figure since the webservice
is asynchronous, I need to capture the received event, which is fine, I can
do, that works.  But I need to tell Class A to update the datagrid with the
new data when it gets it from Class B - so an event model is required.  

in your code, you have a var r in both the Class A and Class B - I'm
confused about that.  Thanks for any help.


Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Holth, 
Daniel C.
Sent: Friday, February 16, 2007 10:36 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?


Here is your code modified to use the EventDispatcher:

import mx.events.EventDispatcher; // import the event dispatcher

class com.boa.projects.iqrcgenerator.components.AdminData{
  public var addEventListener:Function; // Set the functions
  public var removeEventListener:Function; // Set the functions
  private var dispatchEvent:Function; // Set the functions

  private var userData:Object;

  // I'm sure you have a different constructor, but you need
  // to add that line to it if you want to use the eventdispatcher
  public function AdminData(){
  mx.events.EventDispatcher.initialize(this); // add this to 
constructor
  }

  public function wsUserDataByLOB(lobDbId:Number):Void{
  var getUserListResult:Object = new Object();
  getUserListResult =
generatorWebService.GetUserList(lobDbId);

  var r = this;  // To get this in onResult
  getUserListResult.onResult = function(oUser){

  r.dispatchEvent({type:eventOnResult,
user:oUser}); // Dispatch the event
  

  }
  }


  // I may just take this function out all together since the event
can
  // autommatically send them the data.
  public function getUserData():Object{
  return userData;
  }
}


Then in your other class you can do something like:

//myAdminData is an instance of the class above

var r = this;
r.eventOnResult= function(evtObj:Object){
  trace(user:  + evtObj.user);  // Should return the 
oUser object } // addEventListener takes the event name, and 
who you want to listen 
myAdminData.addEventListener(eventOnResult, r);



Does that help?  I obviously can't test the code, but I think 
everything is right...  I have trouble with scope, which is 
why I use a lot of 'r'
values instead of 'this'... Just easier for me... Probably 
not a good coding 

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Alain Rousseau
 Jason,

By the look of it, you will never receive an onResult for your
getUserListResult ... it's a simple Object and no Method onResult exists for
that class that I know of ...

What are you using to make your webservice calls ?  are you using Flash
Remoting ?

if so you should use the responder to handle the result.


import mx.remoting.Service;
import mx.remoting.PendingCall;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;


var myService:Service = new Service( gatewayUrl , null , serviceName , null,
null );
var pc:Pendingcall = new PendingCall();

pc.relayResponder(myService, handleResult, handleError);

well I can't really remember from the top of my head, I'll need to look it
up from home, 
but this is somewhat how you can know when the data has arrived from the
webservice.

So your class be ends up beeing a Service caller, you can make it a
Singleton and use it to fetch different services from your gateway.

You should definitely look into the ARP framework (or other similar
projects) ... that's how I learned how to best use Design Paterns :) after 2
projets with it, you'll definitely understand :)

HTH !

Alain


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: 16 février 2007 16:37
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?

Alain, 

Been following your suggested method, it's great, and everything works as
advertized, except can't get wsResulthandler to fire once the Webservice
data is received.

Also, how do I send the data from the comboBox change event through to the
getWsData function?  I need to know the data from the selected item in the
combobox, as that is a parameter I sent to the webservice to get the data. I
hard coded it a number for now, but it doesn't work because of the first
problem.  

Here is a snippet of the code in Class B

function getWSdata(lobDbId:Number) {
var getUserListResult:Object = new Object();
getUserListResult = root_mc.generatorWS.GetUserList(1)
//lobDbId);
getUserListResult.onResult = Delegate.create(this,
wsResulthandler);
}

function wsResulthandler(data) {
_level0.traceMsg(WS Result recieved.)
this.dispatchEvent({type:webServiceResult, newData:data}) 
}

Did I set that up right?

Thanks,

Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alain 
Rousseau
Sent: Friday, February 16, 2007 3:01 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Events for custom classes?

Jason,

So if I understand clearly what you want to do is :

From Class A : (pseudo code following)

class ClassA {
  private var instClassB:ClassB;
  make comboBox
  make datagrid
  function ClassA() {
  instClassB = new ClassB();
  comboBox.onChange = Delegate.create(this, cbChangeHandler);
  instClassB.addEventListener(webServiceResult, this);
  }

  function cbChangeHandler(e){
  instClassB.getWSdata(e.value);
  }

  function webServiceResult(evtObj:Object) {
  update datagrid with evtObj.newData
  }

}

class ClassB {
  Decorate with EventDispatcher methods
  dispatchEvent, addEventListener, removeEventListener

  function ClassB() {
  EventDispatcher.initialize(this);
  }
  
  function getWSdata(val) {
  get data from web service
  wsInstance.onResult = Delegate.create(this,
wsResulthandler);
  }
  
  function wsResulthandler(data) {
  this.dispatchEvent({type:webServiceResult,
newData:data}) // add anything you want to pass in the object
  }
}

Now you have them both communication the way you want

Have fun !

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of 
Merrill, Jason
Sent: 16 février 2007 14:36
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Events for custom classes?

Daniel, try as I may, I can't get your code to work.  I have one 
class, which has a combobox.  I can get the event to fire when the 
combobox changes just fine, but I can't get it to hear the firing of 
the data capture from the webservice in the other class.

So basically, in pseudocode, I need to do this:

class A{
  make comboBox
  make datagrid
  when comboBox changes, use Class B
  to get data from webservice
  when webservice result received, 
  update datagrid with new data

}

class B{
  connect to webservice   
  when requested, return data to requesting class }

Reason I want these two classes to be separate is because I want other 
classes to call Class B to get data as well.  So, I can do all of 
those things just fine, they are all

RE: [Flashcoders] onLoadComplete, but no onLoadInit

2007-02-14 Thread Alain Rousseau
I'd look for typos, wrong listener, etc ... If all that's clear then share
your code with us so we can help you better ! :)

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of T. Michael
Keesey
Sent: 14 février 2007 11:06
To: Flashcoders mailing list
Subject: Re: [Flashcoders] onLoadComplete, but no onLoadInit

On 2/14/07, Arseniy Shklyaev [EMAIL PROTECTED] wrote:
 What u load there? If u use to load swf into swf and didnt find 
 solution use getbytestotal or something like in the usual preloaders. 
 When u have 100% loaded execute anyscript you want.

It's SWF into SWF.

Using getBytesTotal() would be a good solution if onLoadComplete wasn't
firing, but that's working fine. I need something to fire after the load has
completed AND the ActionScript on the first frame has been executed (i.e.,
the components on the first frame and all of their subcomponents have run
their constructors). Normally, this is exactly what
MovieClipLoader:onLoadInit is for, but, as I said, it's not being called for
some reason, even though the components in the loaded SWF do initialize.

Just wondering if anyone's encountered a similar situation.
--
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.39/686 - Release Date: 2007-02-14
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.39/686 - Release Date: 2007-02-14
 

___
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] Tracking User progress through a presentation.

2007-02-06 Thread Alain Rousseau
SharedObjects would be much better than cookies as they are native to flash.
or you can keep the progress on your server through a database.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andy Herrman
Sent: 6 février 2007 12:39
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Tracking User progress through a presentation.

Is the tutorial/presentation a single SWF or is it split between a lot of
files?  If it's a single SWF then I don't see how cookies would help.

   -Andy

On 2/6/07, Mike [EMAIL PROTECTED] wrote:
 Can anyone point me towards a tutorial on tracking and providing 
 feedback to a user on where they are in the current tutorial/presentation.

 For instance if a tutorial has 5 sections and they have only completed 
 3 I want to be able to show their overall progress in relation to the 
 entire tutorial.Kind of like a progress meter. Should I do this within 
 Flash or with javascript and cookies? I want the user to be able to 
 come back to a tutorial and pickup where they left off and I am 
 thinking cookies would be the best method for tracking progress.
 -
 Kind Regards,
 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

___
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.28/672 - Release Date: 2007-02-06
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.28/672 - Release Date: 2007-02-06
 

___
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] determining which object is displayed at a givenpoint

2007-02-06 Thread Alain Rousseau

You have your answer in your question ! :)
the _alpha is set to 0, thus invisible but still with a _visible = true 
property.


So check for also the _alpha value, not only the _visible value


Vishal Kapur wrote:

Ok, got it.  Thanks for the suggestion.  I tried this but it doesn't
work with the third-party flash movie I am looking at.  They have an
movie clip with _alpha set to 0 that covers the stage at a depth
higher than all other visible elements.  As a result _droptarget is
always set to that object.  What I need is something that takes into
account visibility.

Any other thoughts on this?

-- Vishal


On 2/6/07, Mike Mountain [EMAIL PROTECTED] wrote:

 What he's saying is that _droptarget will tell you exactly what is at
the top under the users mouse - but in order to use it you have to use
startDrag to fool it in to working. Maybe you could drag an invisible
clip around or something.

M

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf
 Of Vishal Kapur
 Sent: 06 February 2007 16:03
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] determining which object is
 displayed at a givenpoint

 I don't understand what you're suggesting.  The user is not
 dragging the movieclip.

 The idea is to write a function with a signature like:
 function getObjectAtPoint(xmouse:Number, ymouse:Number):Object


ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ
Tel: 01964 672000
Fax: 01964 671102
Registered in England no. 01646471
The information contained within this email expresses the views of 
the sender and not necessarily those of the company. It is private 
and confidential and may be legally privileged. It is intended solely 
for those authorised to receive it. If you are not the intended 
recipient you are hereby notified that any disclosure, copying, 
distribution or action taken in reliance on its contents is strictly 
prohibited and may be unlawful. If you have received this email in 
error, please telephone us immediately on 01964 672000 or email a 
reply to highlight the error and then delete it from your system. 
This email may contain links to web-sites, the contents of which ECM 
Systems Ltd have no control over and can accept no responsibility 
for. Any attachments have been virus-checked before transmission; 
however, recipients are strongly advised to carry out their own virus 
checking as ECM Systems Ltd do not warrant that such attachments are 
virus-free. Please note that this email has been created in the 
knowledge that Internet email is not a secure communications medium. 
We advise that you understand and observe this lack of security when 
emailing us.


ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ

Tel: 01964 672000
Fax: 01964 671102

Registered in England no. 01646471

The information contained within this email expresses the views of 
the sender and not necessarily those of the company.
It is private and confidential and may be legally privileged. It is 
intended solely for those authorised to receive it. If you are
not the intended recipient you are hereby notified that any 
disclosure, copying, distribution or action taken in reliance on its
contents is strictly prohibited and may be unlawful. If you have 
received this email in error, please telephone us immediately
on 01964 672000 or email a reply to highlight the error and then 
delete it from your system. This email may contain links to
web-sites, the contents of which ECM Systems Ltd have no control over 
and can accept no responsibility for. Any
attachments have been virus-checked before transmission; however, 
recipients are strongly advised to carry out their own
virus checking as ECM Systems Ltd do not warrant that such 
attachments are virus-free.
Please note that this email has been created in the knowledge that 
Internet email is not a secure communications medium.
We advise that you understand and observe this lack of security when 
emailing us.




___
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

Re: [Flashcoders] Scrolling text with dragger??

2007-02-05 Thread Alain Rousseau

http://www.google.ca/search?hl=enq=flash+dynamic+text+scrollbtnG=Google+Searchmeta=

Tolis Christomanos wrote:

Hi all!

Can anyone give a link to a tutorial for scrolling external text with
dragger?

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


.


___
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] loadMovie question

2007-02-02 Thread Alain Rousseau
You should try masking your movieclip through code, as you are loading into
it with code :

movieclip_a.masked.setMask(movieclip_a.mask);
then your masked movieClip should remain masked even if you load a jpeg
inside it.

I say should, but I've not tested this precise setup ...

HTH

Alain 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [p e r c e p
t i c o n]
Sent: 2 février 2007 11:26
To: flashcoders
Subject: [Flashcoders] loadMovie question

Hello all,
i'm trying to load a jpg into a movie clip that is nested within a movieclip
and masked by another movieclip within the same clip

for example

movieclip_a.mask
movieclip_a.masked

the problem is that the jpg is showing up on top of everything...shouldn't
it be behind the mask even if it is larger than everything else?

thanks

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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.19/663 - Release Date: 2007-02-01
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.19/663 - Release Date: 2007-02-01
 

___
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] loadMovie question

2007-02-02 Thread Alain Rousseau
Yes or use the MovieClipLoader class

var mLoader:MovieClipLoader = new MovieClipLoader();
mLoader.load(movieclip_a.masked, image.jpg);

If you load your jpeg to a depth of 0 it might overwrite the masked
movieClip and thus you lose the mask as for the skewing, have you rotated or
modified your clips inside the IDE before applying your modifications ? this
might affect the actual way it is resized. Othewise I'm with you ... this is
indeed weird.
You might have to rebuild a new Flash file if this persists ...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Helmut
Granda
Sent: 2 février 2007 12:25
To: Flashcoders mailing list
Subject: Re: [Flashcoders] loadMovie question

It sounds like you are not loading the JPG to the right target. Make sure
your loadmovie is loading correctly.

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

 Hi Alain,
 I would think that would work too, but i tried that as well...not sure 
 what's happening...

 in fact all of my coordinates are all screwed up...plus i've noticed 
 that when i change the width of some clips it literally skews the clip 
 as if i used the transform tool...very strange as i haven't touched 
 the matrix of the clip...

 i've never had this happen before so i quite baffled

 thanks

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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.19/663 - Release Date: 2007-02-01
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.19/663 - Release Date: 2007-02-01
 

___
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] loadMovie question

2007-02-02 Thread Alain Rousseau
and what are you tracing exactly ? that's only the result.
But at first glance Target looks like a file path and not a clip path to me
... 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [p e r c e p
t i c o n]
Sent: 2 février 2007 12:49
To: flashcoders
Subject: [Flashcoders] loadMovie question

here's what the output window is spitting out...

Target not found: Target=/screen_container/card1/image_container
Base=_level0.screen_container.card1.image_container

the clip is on the stage...which this trace confirms

image container: _level0.screen_container.card1.image_container

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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.19/663 - Release Date: 2007-02-01
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.19/663 - Release Date: 2007-02-01
 

___
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 8 Pro - new interface (for me)

2007-02-01 Thread Alain Rousseau
 While in the workspace you can do CTRL-F (PC)   or Command-F (Mac) to open
the search window. It will search in all frames, all clips, etc ...

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of BOYD SPEER
Sent: 1 février 2007 09:32
To: Flashcoders mailing list
Subject: [Flashcoders] Flash 8 Pro - new interface (for me)

just a quick question..
I just upgraded to Flash 8 and am switching back to Flash after a Director
project so my mind is trying to overcome inertia and go back to actionscript
mode.

Is there a way in Flash 8 to search all scripts in a project for instances
of a phrase (as we can in Director)???

Thanks for any suggestions..

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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.18/662 - Release Date: 2007-01-31
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.18/662 - Release Date: 2007-01-31
 

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

2007-02-01 Thread Alain Rousseau
Simply use isNAN() method :
http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhel
p.htm?context=LiveDocs_Partsfile=1737.html

if (isNAN(fooN)¨{
// do stuff
else {
// do else stuff
} 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andy Herrman
Sent: 1 février 2007 12:12
To: Flashcoders
Subject: [Flashcoders] Detecting NaN

I'm trying to convert an arbitrary object into a Number, and then detect if
the conversion actually succeeded.  In theory I would convert it and then
check if the converted value is NaN, but this doesn't seem to work.

Here's my test.  In a blank FLA I put the following code:

--
var foo = foobar;
var fooN:Number = Number(foo);
trace(typeof(fooN));
if(fooN == NaN) {
trace(fooN is NaN);
} else {
trace(fooN is a number:  + fooN);
}
--

This should output:
number
fooN is NaN

but instead I get:
number
fooN is a number: NaN

For some reason the check to see if it's NaN isn't working, and I have no
idea why.

It looks like I can use isNaN(fooN) for the check instead, but I'm wondering
why == doesn't work.

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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.18/662 - Release Date: 2007-01-31
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.18/662 - Release Date: 2007-01-31
 

___
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] Class Initiation Q:

2007-02-01 Thread Alain Rousseau


check out also this link :

http://www.osflash.org/flashcoders/as2#creating_a_class_instance_based_on_movieclip_without_a_symbol_in_the_library

I've used it a few times and it works great !



Helmut Granda wrote:
I created a simple class for an object that would be attached to the 
Stage

with a simple:

attachMovie(blah, bla);

it all works great, but I wanted to move the code completely away from 
the

timeline and move it into
a new class that will initiate the whole process.

So my first thought was attach the Movie within the original class, 
but of

course now my events wont have effect into the new created object.

So what would be the best approach?

In the perfect world I would have a class that will then use the class 
that

I created to create new items without having to do any coding in the
timeline

One more thing, I tried registerClass after creating the objects 
within the

original class, it works but for some odd reason it adds 2 items on the
stage
rather than only 1 as requested.

TIA
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




___
Flashcoders@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 do I setvalue and then getvalue between flash and scorm server

2007-02-01 Thread Alain Rousseau
if you can use ExternalInterface (Flash 8)  or the Javascript 
Integration Kit (http://osflash.org/flashjs) to communicate back and 
forth with your LMS.
As for having cuepoints triggering your actions you should look up 
FLVPlayback.cuePoint events

http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=3488.html#wp3773909

// from livedocs

var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
   trace(Elapsed time in seconds:  + my_FLVPlybk.playheadTime);
   trace(Cue point name is:  + eventObject.info.name);
   trace(Cue point type is:  + eventObject.info.type);
}
my_FLVPlybk.addEventListener(cuePoint, listenerObject);

inside your listener function you could define your LMS actions.

Zhu dan wrote:

Hello all,
I am working on a flash video learning program. I have encoded the FLV 
video with 5 cuepoints that set to navigation cuepoint. I have full 
playback features for this video and five buttons to let the audiences 
to directly go to the cuepoint if they want to.


Here is my problem, I can't get the FSCommand to track and record the 
prograss of the video. And if I can use FSCommand to track and record 
prograss, can I use this track information to resume video playback? 
For example, an audience closed the webpage at cuepoint 3, is it 
possible I can use the FSCommand's tracking information to let the 
audience resume where he stopped? The code I have is below without the 
resume playback part. Thank you very much.



Here is the code I have so far.
video learning program. I have encoded the FLV video with 5 cuepoints 
that set to navigation cuepoint. I have full playback features for 
this video and five buttons to let the audiences to directly go to the 
cuepoint if they want to.


Here is my problem, I can't get the FSCommand to track and record the 
prograss of the video. And if I can use FSCommand to track and record 
prograss, can I use this track information to resume video playback? 
For example, an audience closed the webpage at cuepoint 3, is it 
possible I can use the FSCommand's tracking information to let the 
audience resume where he stopped? The code I have is below without the 
resume playback part. Thank you very much.



Code:
import mx.video.FLVPlayback;
var my_flvPb:FLVPlayback;
my_flvPb.autoPlay = false;
btn1.label = Part1;
btn2.label = Part2;
btn3.label = Part3;
btn4.label = Part4;
btn5.label = Part5;
function clickMe1() {
my_flvPb.seekToNavCuePoint(cue1);
trace(Cue point 1)
FSCommand(LMSSetValue,cmi.core.score.raw, 20);
FSCommand(LMSSetValue,cmi.core.lesson_status, failed);
}
function clickMe2() {
my_flvPb.seekToNavCuePoint(cue2);
trace(Cue point 2)
FSCommand(LMSSetValue,cmi.core.score.raw, 40);
FSCommand(LMSSetValue,cmi.core.lesson_status, failed);
}
function clickMe3() {
my_flvPb.seekToNavCuePoint(cue3);
trace(Cue point 3)
FSCommand(LMSSetValue,cmi.core.score.raw, 60);
FSCommand(LMSSetValue,cmi.core.lesson_status, failed);
}
function clickMe4() {
my_flvPb.seekToNavCuePoint(cue4);
trace(Cue point 4)
FSCommand(LMSSetValue,cmi.core.score.raw, 80);
FSCommand(LMSSetValue,cmi.core.lesson_status, failed);
}
function clickMe5() {
my_flvPb.seekToNavCuePoint(cue5);
trace(Cue point 5)
FSCommand(LMSSetValue,cmi.core.score.raw, 100);
FSCommand(LMSSetValue,cmi.core.lesson_status, finished);
}
btn1.addEventListener(click, clickMe1);
btn2.addEventListener(click, clickMe2);
btn3.addEventListener(click, clickMe3);
btn4.addEventListener(click, clickMe4);
btn5.addEventListener(click, clickMe5);

the FSCommand works everytime I click on the button, how can I make 
them work when the video playback reach a cuepoint automatically?


Thanks.

Sincerely,
Daniel Zhu

_
Check out all that glitters with the MSN Entertainment Guide to the 
Academy Awards®   
http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline2


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] onLoadInit running when swf doesn't exist

2007-01-31 Thread Alain Rousseau
 have you tried defining your listening function before your loadText
function ? Had similar problems when defining the event handlers after the
load() call. Also you could use LoadVars to test the existence of the file
firsthand.

import mx.utils.Delegate;

var fileExists:Boolean = false;
var testFile:LoadVars = new LoadVars();
testFile.onLoad = Delegate.create(this, testExist);

function testExist(success:Boolean) {
fileExists = success;
}

testFile.load(pPath + texts.swf);



Then load either the swf or the xml accordingly.


HTH

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Danny
Kodicek
Sent: 31 janvier 2007 11:16
To: 'Flashcoders mailing list'
Subject: [Flashcoders] onLoadInit running when swf doesn't exist

I've got some information that might either be contained in a swf file or an
xml file. What I'm doing (stripped down) is this:

function loadText():Void {
var tSwf:String = pPath + texts.swf;
var tContainer:MovieClip = this.createEmptyMovieClip(txt,
this.getNextHighestDepth());
var tLoader:MovieClipLoader = new MovieClipLoader();
tLoader.addListener(this);
tLoader.loadClip(tSwf, tContainer);
}
function onLoadError(tContainer:MovieClip):Void {
tContainer.removeMovieClip();
importText(pPath + texts.xml);
}
function onLoadInit(tContainer:MovieClip):Void {
stuff here
}

So it tries to load in the .swf, and if this isn't found, it looks for the
XML. Running locally, this is working fine. But running online, it's
failing: despite the fact that the swf file doesn't exist, it's running
onLoadInit instead of onLoadError.

Anyone have any thoughts?
Danny

___
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.17.17/661 - Release Date: 2007-01-30
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.17.17/661 - Release Date: 2007-01-30
 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Need a volunteer Flash Programmer

2007-01-31 Thread Alain Rousseau
It's the website of the one asking for volunteer work ! 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of hank
williams
Sent: 31 janvier 2007 15:44
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Need a volunteer Flash Programmer

On 1/31/07, nelson ramirez [EMAIL PROTECTED] wrote:
 http://www.swivelgames.com

 that says it all.


Err.. excuse me, but what exactly does that say. Doesnt seem to relate to
the thread at all.

Hank

 On 1/31/07, Gustavo Duenas [EMAIL PROTECTED] wrote:
 
  Sorry, but my family don't get feed with the non-profit I cannot pay 
  rethoric.
 
  Regards
 
  On Jan 31, 2007, at 1:26 AM, Swivelgames Support wrote:
 
   Hey, I am looking for some US based or English speaking Flash 
   Programmers to help out with me on a small project. This is very 
   small and non-profit. I cannot pay you, but if you have a website 
   and information then I can add you to my contact page as a member 
   in the project and add your website to the affiliates list.Heres 
   what I need...I need a Flash Media Player with the following features:
   - A watermark that cannot be covered up in any mode (probably just 
   a 20height x 300width area at the bottom of the program so I can add
   alogo at the bottom using an external file)- 3
   modes:- Music mode: Mode with just the basic controls for
   music player and the list of songs on the playlist
   - Preferable height x width would be 115-130 x 300-350-
   Video mode: Just the video on bottom with the basic controls on
   top. - Preferable height x width would be 450-500 x
   450-500
   - Fullscreen mode: Music and Video, it will have the controls 
   in the top left corner, small, and the playlist or the video in the
rest
   of the screen - Preferable height x width would
   be... erm... Fullscreen? 100% x 100% xD- Compatible with M4A,
   MP3, WMA, M4V, AVI, and WMV audio and video files.- Compatible
   with M3U, XML(preferably), PLS, and any a short list of other 
   common playlist files.
   - The text in the flash variable f should be used to load the 
   audio, video, or playlist file using, say, ./load.php?file=$f or
something.
   - This will give me the possibility of using a PHP to my 
   advantage so I can use a MySQL DB to save video and music files and
not worry
   aboutthe downloading and distributing of songs and
   videos illegally.- And a few others.I
   may or may not pay you, give me a wanted salary and I may give you 
   commission, but I do not have money atm to give away. It would be 
   great if someone could help me though, and I am looking for 
   someone who can voluntarily help me through out the project when I 
   need help.Thanks for your time, if this is possilbe thanks 
   ALOT!And if I do end up getting money off this I might be able to 
   try and find a way to pay you.Of course, as I said, all credit 
   goes to you. You will be added to my Contacts page as a member of 
   the projecteven if you will have nothing to do with me after this. 
   You can add any info you want on the contacts page,including, 
   email, name, location, job, resume, etc...
   _
   Live Search: Better results, fast
   http://get.live.com/search/
   overview___
   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
  
 
  Gustavo Duenas
  Creative Director
  LEFT AND RIGHT SOLUTIONS LLC
  1225 w. Beaver St. suite 119
  Jacksonville, FL 32204
  904 . 2650330
  www.leftandrightsolutions.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


-- 
No virus found in this incoming 

RE: [Flashcoders] Launch an application from CDROM based projector

2007-01-30 Thread Alain Rousseau
You cannot send parameters from fscommand to the bat file. Allready tried
once to no avail. It is a security feature If I remember right my readings
on the subject. Zinc would be a better option than fscommand. Or if you want
to avoid Zinc, use fscommand to call a bat file that has all the parameters
inside it. Usually you can just open de needed file with the bat file, and
the System will find the proper app to open it if it's defined in the
Registry.

HTH

Alain 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Shang
Sent: 30 janvier 2007 09:55
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Launch an application from CDROM based projector

why not you try it in DOS commands first. You need to check what kind of
parameters the application supports . If the application does support a
parameter like -o filename, then you can write a bat file and use
fscommand to call it.

On 1/30/07, Paul Steven [EMAIL PROTECTED] wrote:
 I am creating an application using Flash 8 (PC only) and need to 
 launch an application that is installed on the users hard drive.

 I think this can be fairly easily achieved using a third party app 
 such as Zinc.

 However I need to do a bit more than just launch the application. I 
 also need to get this application to go to a certain exercise. 
 Basically this application consists of a series of exercises.

 I was hoping I could simply pass a parameter to the executable but as 
 I do not know if this is at all possible or indeed what that parameter 
 would be, I think this may not be possible to do?

 Anyone know if this is possible and how to go about it?

 Many thanks

 Paul



 ___
 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



-- 
/*
Bored, sometimes.
*/
___
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


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.17.15/659 - Release Date: 2007-01-30
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.17.15/659 - Release Date: 2007-01-30
 

___
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] SCORM?

2007-01-29 Thread Alain Rousseau
Usually we didn't have control over the LMS server but that didn't matter
(except for updating and testing ... but that's another story)
 
We delivered everything in our package ... let's say you had a directory
structure as follow :

- imsmanifest.xml
- course (folder)
- SCO1.html
- sco1.swf
- assets (folder)
- movie.FLV
- movie2.FLV
- sound.mp3
- etc ...

So when you send your PIF (simple .zip file) to the LMS, all the necessary
info should be there. No need to put your movies on another server. They can
be all in your package.

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dave
Mennenoh
Sent: 29 janvier 2007 11:33
To: Flashcoders mailing list
Subject: Re: [Flashcoders] SCORM?

For your FLV, you should load it dynamically and keep it external. We
had lots of external assets used by our SWF (MP3, FLV, pictures) and we kept
them out of the SCOs and out of the imsmanifest.xml, it was becoming hard to
list all those files in there ! But if you only have a few external files,
then you should (as it is best practice) keep them listed in the manifest.

Great, glad to know this is possible. However, did you have control of the
LMS server? Or are the FLV's on a separate server? I as as the whole point
of scorm and sco's are to enable them to be deployed by almost any LMS, and
the admins of this one seem to think that is important.

Thanks for the scoring info. I think we'll just keep the overall score for
now as that should work fine.


Dave -
Head Developer
www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.17.14/657 - Release Date: 2007-01-29
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.17.14/657 - Release Date: 2007-01-29
 

___
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] Shorhand for if statement without else statement

2007-01-29 Thread Alain Rousseau
Gee ! didn't know it was such a dirty hack ! lol 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks
| BLITZ
Sent: 29 janvier 2007 13:14
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Shorhand for if statement without else statement

 (foo) ? foo() : (bar) ? bar() : (foobar) ? foobar() : 
 trace(sorry! no soup for you!);

I feel like I need a shower after that one.  ;)
___
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


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.17.14/657 - Release Date: 2007-01-29
 

___
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] access movieclip trough a class

2007-01-29 Thread Alain Rousseau
You must defined the variable first in your class before using it.


class Holder extends MovieClip {
private var mc1:MovieClip;
function Holder() {
mc1._x = 50;
}
}


that way you won't get any compiler errors 


Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of ntasky
Sent: 29 janvier 2007 14:32
To: Flashcoders mailing list
Subject: [Flashcoders] access movieclip trough a class

i have a movieClip holder that contains other child movieClips (mc1, mc2,
mc3...) created in the flash interface.
From the librairie i linked themovieClip holder to this Class.

class Holder extends MovieClip{
 //constructor
 function Holder(){
  mc1._x=50
 }
}

But it says mc1 is undefined.Well, it is undefined in the class but it is in

the movieClip which is linked to.
I was just wondering if i can access the movie clips created in the 
interface trought the linked class and how.
don't know if i was clear :)

thx

N. 

___
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



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.17.14/657 - Release Date: 2007-01-29
 

___
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] SCORM?

2007-01-27 Thread Alain Rousseau

You have 2 solutions concerning your Quizz issue,

1. In case each question is a SCO, get the current score from the LMS 
with FlashVars and send the updated value to the LMS.
2. Have your quiz (all 21 questions) in only one SCO and send the score 
at the end.


as for the FLV's they should be refered inside the SWF only, no need to 
add them to the manifest. Only the SCO entry points are usually required 
in it.


HTH

Alain

Dave Mennenoh wrote:
I did a small quiz for a client and now they've decided to make it 
integrate into their LMS. I did some looking and it seems using 
external interface and calling the LMS like so: 
ExternalInterface.call(LMSInitialize); should work pretty well. 
However two things are not making sense to me. I see how I can call 
LMSSetValue to set the users score but I only see min, max, and raw 
score entries. The quiz has 21 questions, can I not track the response 
for each question?
Finally, this quiz has a bunch of associated FLV's - 50MB worth. Can 
the video content be kept outside of the SCO package? Does it need to 
be included in the manifest XML file? I thought I could just place the 
flvs on their server and reference them from Flash... that's what I 
was hoping.


Thanks for any insight.


Dave -
Head Developer
www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] SCORM?

2007-01-27 Thread Alain Rousseau
For your FLV, you should load it dynamically and keep it external. We 
had lots of external assets used by our SWF (MP3, FLV, pictures) and we 
kept them out of the SCOs and out of the imsmanifest.xml, it was 
becoming hard to list all those files in there ! But if you only have a 
few external files, then you should (as it is best practice) keep them 
listed in the manifest.


As for your score handling ... Here is what we did :  We kept track of 
the scores inside the Flash (considering we had 1 SCO for the quiz) and 
only sent out the failed, passed or incomplete status back to the LMS. 
Also we used a Flash SharedObject to keep track of where the user was 
last time in his answers and progress. You could send that out in your 
location variable to the LMS as well, depending on how much information 
you want to send. There are some limitations to string length to consider.


So it's up to you to decide how you want to track the score inside the 
SCO. You just need to send the right information back to the LMS, and 
get it back properly through FlashVars and / or SharedObjects.


The downside of SharedObjects is that if the user changes computers to 
try again the Quiz all the previous progress saved in the last session 
won't be accessible.


Alain

Dave Mennenoh wrote:
Thanks for the info, but saying I should include the files in the 
manifest xml file is not saying I should need ti include them within 
the SCO itself. Do I need to? I can see from the perspective of 
allowing any LMS to deploy this SCO that the video files should be 
in the SCO... but is a 50MB SCO a normal thing? Seems to negate the 
whole point of using streaming files.


Also, Alain said - have all 21 questions in one SCO and send the score 
at the end. This is what I have... they wanted SCORM at the end so it 
was never developed for scorm compatibility in the first place... From 
what I see though sending at the end only allows me to send the 
min,max or core scores... so min at 0 and max at 21 and they got 18 
right - so that's the core score... it works OK, but is not the best. 
Without having separate SCO's for each question, is it possible to 
record the answers for each question - or is it only possible to 
record the fact that they got 18 right out of 21...?



Dave -
Head Developer
www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Trace the _x and _y from node of Tree component

2007-01-27 Thread Alain Rousseau

import mx.utils.Delegate;

var listenerObject:Object = new Object();
listenerObject.itemRollOver = Delegate.create(this, handleRollOver);

function handleRollOver(eventObject:Object) {
   trace(menuTree2.selectedNode._y);
}

menuTree2.addEventListener (itemRollOver, listenerObject);



If the selectedNode has a ._y property it will work well. Otherwise 
check to see what properties are available to you for that node. I don't 
really know the Tree component so I can't be sure.


HTH

Alain


Lois IN wrote:

I'm sorry, but when I typing the code I forget this 2.
The code is the same, and the listener is working, but I can't print 
the the

_x _y:

var listenerObject:Object = new Object();
listenerObject.itemRollOver = function(eventObject:Object) {
   trace(menuTree2.selectedNode._y);
};
menuTree2.addEventListener (itemRollOver, listenerObject);



2007/1/26, Hans Wichman [EMAIL PROTECTED]:


Hi,
i see menuTree*2*.selectedNode and menuTree.addEventListener?
Beside that, might be a scoping/reference issue, your listener doesnt 
have

a
reference to the menuTree.

greetz
JC


On 1/26/07, Lois IN [EMAIL PROTECTED] wrote:

 Hello,
 (first of all, sorry for my english)

 I have the Tree component in my scene and this is generated by a xml.
It's
 working fine.

 But I want to know the _x and the _y of any tree node or folder, by
 passing
 mouse over them, with the function itemRollOver.

 For example, the Tree shows that:

 FOLDER
 SubFolder_A
 SubFolder_B
 SubFolder_B1
 SubFolder_B2
 SubFolder_B3
 SubFolder_C

 If the mouse is over SubFolder_B1 the _x and the _y are diferent 
than

 SubFolder_A...

 I try with a Listener, like this:

 var listenerObject:Object = new Object();
 listenerObject.itemRollOver = function(eventObject:Object) {
trace(menuTree2.selectedNode._y);
 };
 menuTree.addEventListener(itemRollOver, listenerObject);

 but the tracer is undefined.


 Somebody knows about it?

 Thanks a lot!
 ___
 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


Re: [Flashcoders] triangle help

2007-01-26 Thread Alain Rousseau
You can also check this post : 
http://chattyfig.figleaf.com/pipermail/flashcoders/2006-December/177264.html


where i share a class of mine called TriangleSolver ...

in your case, you can use the sine rule method

Sine Rule : side1/angle1 = side2/angle2 = side3/angle3
or hypotheneuse/90 = side2/angle2  = side3/(180 - (90+angle2))

angle1 for example is the angle opposite to side1


var otherSide:Number = TriangleSolver.sineRule(null, angle1, side2, 
angle2); // will return side1


var otherSide:Number = TriangleSolver.sineRule(side1, null, side2, 
angle2); // will return angle1


HTH

Alain



Jason Rayles wrote:
Given the interior angles and the length of one side (not the 
hypoteneuse) of a right triangle, how do I calculate (in Flash) the 
length of the other 2 sides?


Thanks,
Jason
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


.


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Shorhand for if statement without else statement

2007-01-26 Thread Alain Rousseau

you could take that a bit further :

(foo) ? foo() : (bar) ? bar() : (foobar) ? foobar() : trace(sorry! no 
soup for you!);


Steven Sacks | BLITZ wrote:

function foo() {
trace(foo);
}
function bar() {
trace(bar);
}
(true) ? foo() : bar();
-- foo
(false) ? foo() : bar();
-- bar

Works fine for me.  Not the best practice (I would never use it), but
just showing what's possible with inline conditionals.



  

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of eka

Sent: Friday, January 26, 2007 2:27 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Shorhand for if statement without 
else statement


Hello :)

In FDT for example : cond ? methodA() : methodB() failed :)

The operator cond ? true : false is used to return a value 
but isn't really the good solution to launch method i think :)


EKA+ :)


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Loading international language XML into Flash

2007-01-16 Thread Alain Rousseau
Using system fonts is the best idea since people that will read in 
Chinese will have the Chinese language installed on their comp.
That's what I did for a multilanguage site i'm working on. For my part 
it's not XML but either text from a database or text file saved in UTF-8.


To test your movies you would need to install those languages on your 
system as well.


If you want to animate your text with alpha and tweening, then you'll 
definitely need to embed fonts for each language ... with the weight of 
your files increasing accordingly !


HTH

Alain


Mick G wrote:
I have a file that needs to be able to load various languages into the 
Flash

via XML (Chinese, Japanese, Russian, etc.)
Any tips?
- Is this as simple as using system fonts for all dynamic text fields
- If I want smooth fonts, do I just need to find a font to embed for each
language (in which case I would need a seperate SWF for each language)
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Critical bug in IE

2007-01-10 Thread Alain Rousseau
Had this problem as well recently,

I used XRay to see what was going on and I noticed that 2 or 3 times the
Stage onResize event  would be triggered with height and width values of 0
before getting the correct values. So I only added a conditional statement
to delay my positioning actions :

var firstResize:Boolean = true;
var stageListener:Object = new Object();
stageListener.onResize = Delegate.create(this, onResizeHandler);
Stage.addListener(stageListener);

function onResizeHandler(){
// 
if (firstResize) {
if (Stage.height != 0) {
//Do your stuff here
firstResize = false;
} else {
if (Stage.height != 0) {
//Do your other stuff here
}
}
}


HTH

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andy Herrman
Sent: 9 janvier 2007 15:28
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Critical bug in IE

When are you doing that?  I've noticed some weird issues in IE where the
Stage stuff doesn't always behave correctly at the beginning of the movie
(my case the Stage was telling me the width/height was 0 when code in
external .as files was running, but if it was code in the FLA itself, which
ran earlier, it was correct).  If you're doing that as part of
initialization then maybe delaying it will help.

   -Andy

On 1/8/07, William Smith [EMAIL PROTECTED] wrote:
 I have this problem to when I use Stage.scaleMode on this one movie it 
 will always end up messing up the position and covering half of 
 certain movieclip (though not all) when I view the movie in IE, both 6 
 and 7. I have tried everything I can thing of and nothing works. Any
ideas?
 ___
 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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.16.8/621 - Release Date: 2007-01-09
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.16.8/621 - Release Date: 2007-01-09
 

___
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] Chinese characters in mailto: link

2006-12-26 Thread Alain Rousseau
You first need to activate Chinese language pack on your computer to be 
able to see the characters properly throughout your system, maybe it's 
that ? or maybe your e-mail program doesn't take the characters as UTF-8 
, then you might need to specify other kinds of encoding for your mailto 
... don't know how to do it, maybe in the headers of the e-mail itself ?


Hope this gets you in the right direction.

A.

Joshua Sera wrote:

I'm trying to use chinese characters in the body of a
mailto: link, but all I'm getting is garbage.

I'm getting them from an XML file. Flash is reading
them fine, and displaying them fine in a text box.

getURL(mailto:[EMAIL PROTECTED]subject=blabody=+chineseTextHere,
_blank);

gets me a line of garbage.

Has anyone had any experience with this problem?

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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


RE: [Flashcoders] Area of a triangle using perimiter values only

2006-12-14 Thread Alain Rousseau
 Speaking of Triangles, I made an utility Class to help me solve Triangle
problems
and the formulas are all taken from mathworld website 

It will help you get the missing values of your triangles :

Hope it helps someone out there ...


Alain


/***
**
*
*   Triangle Solver
*
*   File: TriangleSolver.as
*   Created by: [EMAIL PROTECTED]
*

*/
/***
**
*
*
*   Class: TriangleSolver
*
*   Class that helps solving triangle equations, all the methods are
static
*   so there is no need to create an instance of the class
*
*   Math reference : http://en.wikipedia.org/wiki/Triangle
*
*   Usage Example : 
*
*   import ca.daroost.utils.TriangleSolver;
*   // lets say that we have a rectangle triangle of known height and
width and we are looking for the hypotenuse
*   var hyp:Number = TriangleSolver.hypothenuse(100, 50);
*
*

*/
class ca.daroost.utils.TriangleSolver {
//

/***
**
*
*  Properties
*


*/
//
public static var DEGTORAD:Number = Math.PI/180;
public static var RADTODEG:Number = 180/Math.PI;

//

/***
**
*
*  Constructor : TriangleSolver
*


*/
//
function TriangleSolver() {

}
//

/***
**


**
**
**
Methods
**


**


*/
//
//

/***
**
*
*  Method : hypothnuse
*
*  The Pythagorean theorem
*
*   @param : a - the a side
*b - the b side
*


*/
//
// c = sqrt(a^2 + b^2)
public static function hypothenuse(a:Number, b:Number):Number {
var c:Number;
c = Math.sqrt(Math.pow(a,2)+Math.pow(b,2));
return c;
}
//

/***
**
*
*  Method : sineRule
*
*  Refers to the sine rule
*  c/sin(angleC) = a/sin(angleA) = b/sin(angleB)
*
*   @param : c - the c side
*angleC - the angle opposed to the c
side
*a - the a side
*angleA - the angle opposed to the a
side
*


*/
//
// 
public static function sineRule(c:Number, angleC:Number, a:Number,
angleA:Number):Number {
if ( (angleC == undefined) || (angleC == null) ) {
angleC = Math.asin(c*Math.sin(a)/angleA);
return angle;
} else if ( (c == undefined) || (c == null) ) {
c = a*Math.sin(angleC)/Math.sin(angleA);
return c;
}
}
//

/***
**
*
*  Method : cosRule
*
*  Refers to the cosine rule which is the extended version
of the Pythagorean theorem
*  c^2 = a^2 + b^2 - 2*a*b*cos(angleC)
*
*   @param : c - the c side
*a - the a side
*b - the b side
*angleC - the angle opposed to the c
side
*


*/
//
public static function cosRule(c:Number, a:Number, b:Number,
angleC:Number):Number {
if ( (angleC == undefined) || (angleC == null) ) {
 

RE: [Flashcoders] disable flvplayback seekBar

2006-12-14 Thread Alain Rousseau
check to see if this will help you

http://livedocs.macromedia.com/flash/8/main/3480.html#wp3797830


It might disable all controls but you could turn them back on the same way 
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Appenzellar
Sent: 14 décembre 2006 13:10
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] disable flvplayback seekBar

I have 2 videos. During the first video I want to not show or disable the
flvplayback seekBar, but I want to show/enable the seekBar during the 2nd
video

 

Here is the code that is playing both videos...

 

listenerObject.complete = function(eventObject:Object):Void {

if (vid.contentPath == qthigh4.flv) {

playerBar.gotoAndStop(1);

vid.play(12-07-06.flv);

}

};

 


Michael Appenzellar
Sr. Web Applications Developer


Mirame Interactive

http://www.mirameinteractive.com

301-663-5672 x6413

 

___
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.18/586 - Release Date: 2006-12-13
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.18/586 - Release Date: 2006-12-13
 

___
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] cuepoint/flvplayback question

2006-12-12 Thread Alain Rousseau
Have you tried using MediaDisplay instead of FlvPlayback ? You won't have
any controls showing, only your FLV. 
Or you can adjust your skin parameter of your component :

http://livedocs.macromedia.com/flash/8/main/3480.html#wp3797830


HTH

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Appenzellar
Sent: 12 décembre 2006 10:11
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] cuepoint/flvplayback question

Cuepoint question:
I have cuepoints working but they act strange if you move the video seekbar
aroundthe video shows the wrong cuepoint until the video hits the next
cuepointany way to have the cuepoint follow the seekbar position?

flvplayback question:
I have 2 videosI can show the first one and then show the 2nd one fine,
but I don't want to show any player controls, specifically the seekbar
during the first video...I have tried just putting a graphic over the
controls but that didn't work as expected.

 


Michael Appenzellar
Sr. Web Applications Developer


Mirame Interactive

http://www.mirameinteractive.com

301-663-5672 x6413

 

___
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.16/582 - Release Date: 2006-12-11
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.16/582 - Release Date: 2006-12-11
 

___
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] preloader not completely preloading...

2006-12-11 Thread Alain Rousseau
The only place I see where this could fail, is at your if line. 
You should probably calculate nTBytes outside your checkLoad() function and
pass it as a variable at your first call.

for your if statement you should maybe write it like this :

var minPercentLoad:Number = 100;
if ( nPercent == minPercentLoad) {
//...
}

that way you'll be sure that your movie has loaded all the way before doing
anything else.


HTH

Alain

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Count
Schemula
Sent: 11 décembre 2006 09:12
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] preloader not completely preloading...

I'm using the code at the bottom of this post.

Using the Simulate Download and the Bandwidth profiler, I have two different
files where it's basically downloading about 15% of the file and then
continuing playing.

The preloader starts to work correctly, but basically quits out incorrectly
around 15%.

Looking at the bandwidth profiler, it continues downloading in the
background while trying to (poorly) play.

Any obvious hangups?

No components are in use, all assets are inside the flash file. The
bandwidth profiler shows a linear download, 0 to 100%, just around 15% or so
it just goes on and tries the play the file after showing me the preloader
for the first 15%.

I've used this code successfully before, it's just that now I have a
deadline, so, I guess it totally makes sense that it does not work now. Grr.

=== CODE ===

// preloader
function checkLoad(mcTarget:MovieClip):Void{
  var nLBytes:Number = mcTarget.getBytesLoaded();
  var nTBytes:Number = mcTarget.getBytesTotal();
  var nPercent:Number = (nLBytes/nTBytes)*100;
  mcLoader.mcBar._xscale = nPercent;
  var sPercent:String = Math.floor(nPercent).toString();
  var sKBytes:String = Math.floor(nTBytes/1024).toString();
  var sMessage:String = sPercent + % of  + sKBytes + K loaded.;
  mcLoader.tPercent.text = sMessage;
  if (nLBytes = nTBytes  nTBytes  0) {
if (nCount = 12) {
  clearInterval(nProgress);
  mcTarget.gotoAndPlay(main);
} else {
  nCount++;
}
  }
  updateAfterEvent();
}

var nCount:Number = 0;
var nProgress:Number = setInterval(checkLoad, 100, this);

stop;

--
count_schemula
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training http://www.figleaf.com
http://training.figleaf.com


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.15/581 - Release Date: 2006-12-09
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.15/581 - Release Date: 2006-12-09
 

___
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] MovieClipLoader/loadMovie vs. digit on instance name

2006-12-09 Thread Alain Rousseau

Hi Wagner,

INMHO, the best way to add your numbers to the name of MovieClip is to 
first define a variable as the base name of your mc, then add the number 
(id) to that base name. I do it like this :


var baseName:String = newWin_;
var mcID:Number = Math.round( Math.random() * 100 );
var mcName:String = baseName + mcID;

you'll be sure to allways have a string that way!

I usually use this in a loop (for or while) where I use an incremental 
number (i++)


var baseName:String = newWin_;
for (var i:Number = 0; i  maxMC; i++) {
   var mcName:String = baseName + i;
}

HTH

Alain

Wagner Amaral wrote:

Yesterday I was building a WindowManager class, and I wanted to assign
random names to each created window. So I went for the obvious:

var randName:String = String(Math.round( Math.random() * 100 ));
var _newWin:Window = Window( _tgt.attachMovie(_linkage, newWin_ +
randName, _tgt.getNextHighestDepth(), initObj) );

which gives me something like: _level0.windowContainer.newWin_123456

however, when I tried to load an external image into a movieclip
inside this new Window, MovieClipLoader.loadClip() failed silently,
and loadMovie() gives an error in the path (doesn't specify which
path, but then I found it was the destination movie's path)
setting properties like _newWin.textContainer.text = 'xyz'; works ok,
but I could not load an image into _newWin.imageContainer, even though
I can trace it (gives me
_level0.windowContainer.newWin_123456.imageContainer)

then I did this, and the image loaded correctly, along with the text 
properties:


var randName:String = String(Math.round( Math.random() * 100 ));
var randNameArray:Array = randName.split( '' );
var newNameArray:Array = new Array( randNameArray.length );
for ( var i:Number = 0; i  randNameArray.length; ++i ) {
newNameArray[i] = String.fromCharCode( 97 + 
Number(randNameArray[i]) );

}
randName = newNameArray.join( '' );
var _newWin:Window = Window( _tgt.attachMovie(_linkage, newWin_ +
randName, _tgt.getNextHighestDepth(), initObj) );

basically I converted the numbers into their letter equivalent,
starting from a, which gives me something like:
_level0.windowContainer.newWin_abcdef

and now both loadMovie() and MovieClipLoader.loadClip() loads the
image correctly

my question is, why is this happening? isn't a digit a valid
'variable-letter' in flash ?
is this a known issue, or is it just me? am I doing something wrong?
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Loading library movie clips sequentially? Best way to do this?

2006-11-29 Thread Alain Rousseau
Hi Micky,

if you want to spread the load across time, the best approach is to have 36
.swf files that you load one at a time.
To perform the loading you should use the MovieClipLoader (look it up on
HYPERLINK
http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/js/html/wwhelp.h
tm?href=2538.htmllivedocs or just HYPERLINK
http://www.google.ca/search?hl=enq=MovieClipLoadermeta=google)
And of course there are many preloaders out there that can speed up the
process as well.

With that you'll be on your way in no time !

HTH !

Alain



-Original Message-
From: [EMAIL PROTECTED] [HYPERLINK
mailto:[EMAIL PROTECTED]mailto:flashcoders-bounces
@chattyfig.figleaf.com] On Behalf Of Micky Hulse
Sent: 29 novembre 2006 07:52
To: Flashcoders mailing list
Subject: [Flashcoders] Loading library movie clips sequentially? Best way to
do this?

Hello,

Here is the scoop: I have 36 movie clips in my library that get placed on
stage via actionscript...

Long story short, I would like to load each clip one at a time, for
example: movie_clip-01 fully loads and animates into position, then
movie_clip-02 loads and animates into position, (...), and finally
movie_clip-36 loads and animates into position. Basically, I want to
break-up the load across time, vs. doing it all at the beginning.

Just wondering if the above idea makes sense? Is it standard to do that type
of loading from the library at runtime, or should I be working with
  36 external swf files?

Anyone seen any tutorials and/or example files on the web that cover this
type of loading?

Any tips/suggestions/links/rtfm's (with page #) ya'll can send my way would
be kick-butt! :)

Sorry if noob question... I am just now getting back into Flash after a
2-year hiatus.

Many thanks in advance.
Cheers,
Micky

--
  Wishlist: HYPERLINK http://snipurl.com/vrs9http://snipurl.com/vrs9
Switch: HYPERLINK http://browsehappy.com/http://browsehappy.com/
  BCC?: HYPERLINK http://snipurl.com/w6f8http://snipurl.com/w6f8
My: HYPERLINK http://del.icio.us/mhulsehttp://del.icio.us/mhulse
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
HYPERLINK
http://chattyfig.figleaf.com/mailman/listinfo/flashcodershttp://chattyfig.
figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training HYPERLINK
http://www.figleaf.comhttp://www.figleaf.com HYPERLINK
http://training.figleaf.comhttp://training.figleaf.com


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.19/555 - Release Date: 2006-11-27




-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.19/556 - Release Date: 2006-11-28
 
___
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] AS2 Flash Remoting Troubles

2006-11-24 Thread Alain Rousseau

Hi Graham,

Did you check your typos ? we forget sometimes but, this is often the 
first place to look !


pc.responder = new RelayResponder(this, onEchoResul, onEchoFault);

you forgot the t in onEchoResult :)


A.


Graham Pearson wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I am working on moving my AS1 Flash Remoting Applications over to AS2
and having a devil of a time. The problem that I am running into is that
the code within the RelayResponder does not execute to my knowledge.
Here is an example of what I am doing.

function onEchoFault(rs:FaultEvent) {
trace(-- onEchoFault has been executed );
}
function onEchoResult(re:ResultEvent) {
trace(-- onEchoResult has been executed );
}

var pc:PendingCall = myService.makeEcho(Hello World!);
pc.responder = new RelayResponder(this, onEchoResul, onEchoFault);


When I run the application in my debugger window I get the following


11/25 7:26:11 [INFO] logger1: Creating Service for properties.cfc.HelloWorld
11/25 7:26:11 [INFO] logger1: Creating gateway connection for
http://devel.yourcfpro.com/flashservices/gateway
11/25 7:26:11 [INFO] logger1: Successfully created Service
11/25 7:26:13 [INFO] logger1: Invoking makeEcho on properties.cfc.HelloWorld
11/25 7:26:15 [INFO] logger1: properties.cfc.HelloWorld.makeEcho()
returned Hello Hello World!

I do not get the Trace statement on the onEchoResult. What am I doing wrong.


- --
Graham Pearson, System Administrator / DCG Administrator / Application
Developer
Northern Indiana Educational Services Center
Mishawaka, IN 46544
Voice (866) 254-5322 or (574) 254-5210 / Fax (574) 254-0148
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.4 (MingW32)
Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFZuU8akuGrBT7wfkRApksAJ9qWm+1smugV6f6NQpKu5J4MKZxSwCffCzU
253+eiz1UnkZrkdSDBG05Rk=
=k8fY
-END PGP SIGNATURE-

  

___
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] AS2 Flash Remoting Troubles

2006-11-24 Thread Alain Rousseau
This may be a scoping problem,
As you define your result handling function inside your clic handler. You
could try this :


import mx.utils.Delegate;

// your usual code here


createAccount.click = Delegate.create(this, clickHandler);

function clickHandler() {
var checkUsername_pc:PendingCall =
FlashChat.CheckUsername(username_txt.text);
var checkUsername_res:RelayResponder = new RelayResponder(this,
CheckUsernameResult, CheckUsernameFault); // btw you had twice the same
var name here checkUserName_pc for PendinCall and Responder

}

function CheckUsernameResult(msg) {
trace(-- CheckUsernameResult was  + msg);
}

function CheckUsernameFault(msg) {
trace(-- CheckUsernameFault was  + msg);
}


HTH

A.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Graham
Pearson
Sent: 24 novembre 2006 10:05
To: Flashcoders mailing list
Subject: Re: [Flashcoders] AS2 Flash Remoting Troubles

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Here is my entire code which I am having issues with:

import mx.remoting.Service;
import mx.remoting.PendingCall;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
import mx.services.Log;

var gatewayServer:String = devel.yourcfpro.com; var webServiceLog = new
Log(Log.VERBOSE); var createAccount = new Object();
createAccount_btn.addEventListener(click, createAccount);

CheckSO();
var FlashChat:Service = new Service(http://; + gatewayServer +
/flashservices/gateway, webServiceLog, properties.cfc.flashchat, null,
null);

createAccount.click = function() {
var checkUsername_pc:PendingCall =
FlashChat.CheckUsername(username_txt.text);
var checkUsername_pc:RelayResponder = new RelayResponder(this,
CheckUsernameResult, CheckUsernameFault);
function CheckUsernameResult(msg) {
trace(-- CheckUsernameResult was  + msg);
}
function CheckUsernameFault(msg) {
trace(-- CheckUsernameFault was  + msg);
}
}

webServiceLog.onLog = function(txt) {
trace(txt);
}
stop();


Which produces the following in the Debug Window:
11/25 10:2:18 [INFO] : Creating Service for properties.cfc.flashchat
11/25 10:2:18 [INFO] : Creating gateway connection for
http://devel.yourcfpro.com/flashservices/gateway
11/25 10:2:18 [INFO] : Successfully created Service
11/25 10:2:23 [INFO] : Invoking CheckUsername on properties.cfc.flashchat
11/25 10:2:25 [INFO] : properties.cfc.flashchat.CheckUsername() returned
true



Graham Pearson wrote:
 I am working on moving my AS1 Flash Remoting Applications over to AS2 
 and having a devil of a time. The problem that I am running into is 
 that the code within the RelayResponder does not execute to my knowledge.
 Here is an example of what I am doing.
 
 function onEchoFault(rs:FaultEvent) {
 trace(-- onEchoFault has been executed ); } function 
 onEchoResult(re:ResultEvent) { trace(-- onEchoResult has been 
 executed ); }
 
 var pc:PendingCall = myService.makeEcho(Hello World!); pc.responder 
 = new RelayResponder(this, onEchoResul, onEchoFault);
 
 
 When I run the application in my debugger window I get the following
 
 
 11/25 7:26:11 [INFO] logger1: Creating Service for 
 properties.cfc.HelloWorld
 11/25 7:26:11 [INFO] logger1: Creating gateway connection for 
 http://devel.yourcfpro.com/flashservices/gateway
 11/25 7:26:11 [INFO] logger1: Successfully created Service
 11/25 7:26:13 [INFO] logger1: Invoking makeEcho on 
 properties.cfc.HelloWorld
 11/25 7:26:15 [INFO] logger1: properties.cfc.HelloWorld.makeEcho()
 returned Hello Hello World!
 
 I do not get the Trace statement on the onEchoResult. What am I doing
wrong.
 
 

- --
Graham Pearson, System Administrator / DCG Administrator / Application
Developer Northern Indiana Educational Services Center Mishawaka, IN 46544
Voice (866) 254-5322 or (574) 254-5210 / Fax (574) 254-0148 -BEGIN PGP
SIGNATURE-
Version: GnuPG v1.4.4 (MingW32)
Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFZwoKakuGrBT7wfkRAkBzAKDlD9fomYFZPT40EyqZvSvMBa36mwCgsWfW
DXv449oid5YtjdZh5HgoEHA=
=BBwv
-END PGP SIGNATURE-

--
This message has been scanned for viruses and dangerous content by our Email
Filtering System and is believed to be clean.

___
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.14/548 - Release Date: 2006-11-23
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.14/548 - Release Date: 2006-11-23
 


RE: [Flashcoders] MP3 sound cutting out

2006-11-09 Thread Alain Rousseau
Hi Paul,

Does your screen length (time) affect the sound or is it the sound that
determines the length of a screen ? Firsthand, it sounds like a synch
problem to me. Is there any other places where you call stopAllSounds() or
playSound() ? This might as well affect the cut off.

HTH

A.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Coupe
(LINE)
Sent: 9 novembre 2006 12:14
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] MP3 sound cutting out

Hi,

I've got a template-based e-learning application which plays a dynamic
mp3 voiceover file (typically around 200k in size) once a screen has loaded.


The problem I've got is that on a few screens, the audio more often than not
cuts off before it has finished - in a random place each time. Other screens
that are fine have exactly the same type of MP3 compression, and swapping in
the MP3 file from a screen that does work doesn't solve the problem. I've
noticed the problem is much worse in Player 9, doesn't happen as much in
Player 7, and even less if I simply run the .swf outside the browser.
Anybody got any ideas? It's driving me nuts!

The sound code is simply:

private static function playSound(soundToPlay):Void {
// stop any currently playing sound 
stopAllSounds();

var mySound = new Sound();
mySound.onLoad = function(success:Boolean)
{
if (success) 
{
mySound.start();
} else {
trace(Sound failed);
}
};

mySound.loadSound(soundToPlay, true);
}


Thanks for any help,
 
Paul Coupe
Lead Developer
  
LINE Communications
___
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.0/525 - Release Date: 2006-11-09
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.0/525 - Release Date: 2006-11-09
 

___
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 a click on an html link in a text field

2006-11-08 Thread Alain Rousseau
Hi Mark,

You should look into asfunction 
http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhel
p.htm?context=LiveDocs_Partsfile=1719.html

It lets you call AS functions through links in a html textlike this : a
href=asfunction:myFunction,arg1,arg2


HTH

A.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Burvill
Sent: 8 novembre 2006 11:39
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Detecting a click on an html link in a text field

Hi List,

If you have an href link within an html text field in Flash, is there any
way of detecting when the user clicks on it?

Not being a standard button, you obviously can't do:

on (press) {   
doStuff();
}


But is there another way?

Cheers.

___
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.0/524 - Release Date: 2006-11-08
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.0/524 - Release Date: 2006-11-08
 

___
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


  1   2   >