[flexcoders] Load a Flash 9 SWF with loadBytes?

2007-06-06 Thread lar.drolet
Ok, not getting it, what small/stupid/simple concept am I missing?

I want to load a Flash 9 SWF into Flex and then call a function within
the SWF once loaded.  I can do it with a SWFLoader but I would like to
use loadBytes.


http://www.adobe.com/2006/mxml";
layout="absolute" creationComplete="initApp();">










[flexcoders] Flex certification, anyone take the exam?

2007-02-02 Thread lar.drolet
Just curious if anyone has take the exam and passed it?

I will not ask about the exam because I know you are not supposed to
say a thing, I will only ask if you felt prepared?

I read that the scoring was similar to the CF exam in that scoring
over 80% you were awarded an "expert" status while passing at 65% to
79.9% was just normal (rather lucky to have passed).  Is this true?


LD



[flexcoders] Holy crap, Flex 3.0 is going to be at 360Flex

2007-01-23 Thread lar.drolet
http://www.powersdk.com/ted/

I am only now getting into version 2.0.1 with mild success, feel as if
I have not touched on all that can be done, far from it.  Now I am
really glad I signed up for that conference, be nice to see what Adobe
has planned.  

Any guesses as to what more they could add?  

Some of my guesses:
More components
Better modularity
More/better support for Apollo

The article did say it will be released when the Flash 9 player hits
90% penetration, so that may be before the end of the year I guess. 
Bring it on!

LD



[flexcoders] New project in Cairngorm 2.1, begin with 2.0 version or from scratch

2007-01-19 Thread lar.drolet
Having a debate about a new project I am working on, going to use
Cairngorm 2.1 this time and I am debating whether to use another
project as a starter or to begin from scratch.  I think there may be
issues with the new project and possibly a larger compiled project
because I am using Cairngorm 2.1 up-sized from a 2.0 project.

Anyone have any thoughts on this?  Thanks.

LD



[flexcoders] Re: Image source doesn't affect Image size?

2007-01-19 Thread lar.drolet
Not sure if this will work but what if you placed your image inside of
a Canvas (100% x 100%), which is inside if your VDividedBox.  Create a
listener on the Canvas for a ResizeEvent.RESIZE and call a new
function on the event.  This call out may be able to stretch your
image to the proper size.  Good Luck.

LD


--- In flexcoders@yahoogroups.com, Russell Sprague <[EMAIL PROTECTED]> wrote:
>
> Great that works,
> any suggestions on how to get the scalled size of the image if I place 
> it in the top frame of a VDividedBox, and set the image w and h to 100%
> So the image will scale to fit into the pane when the dividerBar is
dragged.
> 
> 
> lar.drolet wrote:
> >
> > Try this:
> > trace("iw "+bImage.contentWidth);
> > trace("ih "+bImage.contentHeight);
> >
> > LD



[flexcoders] Re: Image source doesn't affect Image size?

2007-01-18 Thread lar.drolet
Try this:
trace("iw "+bImage.contentWidth);
trace("ih "+bImage.contentHeight);


LD

--- In flexcoders@yahoogroups.com, Russell Sprague <[EMAIL PROTECTED]> wrote:
>
> It seems that if an image is loaded into an Image tag at runtime, the 
> size is w=0 h=0, ex.
> 
> private var imgsrc:String;
> public function loadImage(val:String):void{
> imgsrc = "assets/images/"+val;
> }
> private function imgLoaded(e:Event):void{
> trace("tw "+this.width);
> trace("iw "+bImage.width);
> trace(e.target.width);
> }
> ...
>  horizontalCenter="0" verticalCenter="0"/>
> 
> if I call the loadImage function with a image url string,
> even after the image loads into the Image tag, it returns 0 for the 
> width and height of the Image tag.
> 
> I tried using a callLater function in the loadImage function, but it 
> gave the same results.
> 
> Is there a way to get the width and height of an Image tag if it loads 
> in an image at runtime?
> 
> Thanks
> Russ
>




[flexcoders] Re: It shouldn't be this hard.

2007-01-18 Thread lar.drolet
Had some issues with the Image too, use an 


The complete was the one method that seemed to fire when the image was
loaded.

Good Luck.

LD

--- In flexcoders@yahoogroups.com, Russell Sprague <[EMAIL PROTECTED]> wrote:
>
> well that is what I thought, but I couldn't get it to work.
> 
> Shannon Hicks wrote:
> >
> > You could always set the x/y by hand when you load the image. 
> > Something like this:
> >
> > loadImage():void {
> > image.source = mynewimage.jpg
> > callLater(centerImage);
> > }
> >
> > centerImage():void {
> > image.x = (wrapper.width / 2) - (image.width / 2);
> > image.y = (wrapper.height/ 2) - (image.height/ 2);
> > }
> >
> > Shan
> >
> > Russell Sprague wrote:
> >
> >> @Matt
> >> yea I don't really hate the docs, I was just a little frustrated, 
> >> because most of the examples are Actionscript examples, and if I am 
> >> looking for an example of how to do something in mxml, I don't know 
> >> enough to translate the AS to mxml.
> >>
> >> @roman
> >> I tried the horizontal and verticalCenter, and it didn't work
> >> I think part of the problem is there is nothing in the component 
> >> until I load the image, so there is nothing to measure to.
> >>
> >> Russ
> >> Matt Horn wrote:
> >>
> >>> > I hate the flex documentation...
> >>>
> >>> Also, if there are specific problems with the documentation,
please let
> >>> the doc team know by either posting to this list, adding a
comment to
> >>> livedocs, or filing a bug at http://www.adobe.com/go/wish. 
> >>>  Thanks,
> >>>
> >>> matt horn
> >>> flex docs
> >>>
> >>> > -Original Message-
> >>> > From: flexcoders@yahoogroups.com 
> >>> 
> >>> > [mailto:flexcoders@yahoogroups.com 
> >>> ] On Behalf Of Roman Protsiuk
> >>> > Sent: Thursday, January 18, 2007 7:51 AM
> >>> > To: flexcoders@yahoogroups.com

> >>> > Subject: Re: [flexcoders] It shouldn't be this hard.
> >>> >
> >>> > The first thought is:
> >>> >
> >>> > 
> >>> >  >>> > verticalCenter="0" /> 
> >>> >
> >>> > To scale, dunno, but maybe something like:
> >>> >
> >>> > 
> >>> >  >>> > source="{yourSource}"
> >>> > width="{imageContainer.width < image.width ?
> >>> > imageContainer.width : image.width}"
> >>> > height="{imageContainer.height < image.height ?
> >>> > imageContainer.height : image.height}"
> >>> > scaleContent="true"
> >>> > horizontalCenter="0"
> >>> > verticalCenter="0" />
> >>> > 
> >>> >
> >>> > This one probably won't work, it's very dirty, however might
> >>> > give you a clue... ;)
> >>> >
> >>> > And the easiest way to scale, but still, not so nice from the
> >>> > point of ui (it scales both way) is just:
> >>> >
> >>> >  >>> > width="100%" height="100%" />
> >>> >
> >>> > Have fun,
> >>> > R.
> >>> >
> >>> >
> >>> >
> >>> > On 1/18/07, Russell Sprague <[EMAIL PROTECTED] 
> >>> 
> >>> >  >>> > > wrote:
> >>> >
> >>> > I hate the flex documentation...
> >>> >
> >>> > All I want to do is dynamically center an image on my stage.
> >>> >
> >>> > I have a VDividedBox with an image in the top, and text
> >>> > in the bottom.
> >>> > I loading in images by setting the source of an image
> >>> > tag(probably not
> >>> > the best way to do it, but again I hate the Flex docs...).
> >>> > So when the image loads I am trying to set it to center
> >>> > in the upper
> >>> > pane of the vdividedbox, but all my attemps have failed.
> >>> >
> >>> > It would be nice to also resize the image as the
> >>> > divideBar is dragged,
> >>> > but only to the original size of the image, then it
> >>> > just centers.
> >>> >
> >>> > Thanks
> >>> > Russ
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>>
> >>
> >
> >
>




[flexcoders] Loading Modules issue/confusion

2007-01-18 Thread lar.drolet
Playing with the whole Module loading thing and discovered a few
things that seem odd, or maybe I just don't get Modules like I thought
I did.

I created an Application with a ModuleLoader including two listeners:
Setup and Ready.

Inside of my Module.swf (swf to load into the ModuleLoader) I have a
simple Canvas object, within the Module tag I also include a
creationComplete which calls initMod.  Also inside the Module.swf I
have a function called getInfo that does a simple trace.

When I compile my Application I expected to see some traces in the
following order:

Loading Module...
Module Setup...
Loaded Module created...
Module Ready...
getInfo called...

or 

Loading Module...
Module Setup...
Module Ready...
Loaded Module created...
getInfo called...


My thinking was that as I load the Module.swf I would see the Setup
called when it begins to load, then when the Module.swf is loaded the
creationComplete would fire, followed by the Ready with my getInfo
call firing last.  The Ready and the creationComplete may be flip
flopped I was not sure which would fire first.

What did trace out surprised me.

Loading Module...
Module Setup...
Module Ready...
getInfo called...
Loaded Module created...

So what stumped me is that the getInfo call actually worked before the
creationComplete fired.  Why did this happen in this order?

Also having issues with the idea of passing data on the Query string
but that is for another post still playing with the code.

Thanks.

LD




[flexcoders] Re: Blog post on Flex 2 Developer Certification exam

2007-01-18 Thread lar.drolet
Here is another link I found last night regarding the Flex
certification exam: http://www.igorcosta.org/?p=12

On this page is also a link to a PDF with information about the exam.
http://www.igorcosta.com/blog/wp-content/uploads/2007/01/Exam_Guide_Flex2.pdf

Is this is accurate this exam will follow the likes of the CF exam and
those who score 80% or better will acquire the 'Expert' Certified
status while the others [who pass] will get the Certified status. 
Guess that means hitting a book or two to find the obscure information
you know Adobe will ask about Flex.

I looked at Pearson's site and they do not have a listing for the exam
although Thomson Prometric does ($150).  How about a discount for
those people attending the 360Flex conference or FlexManiacs; Vue and
Thomson are you listening?

LD


--- In flexcoders@yahoogroups.com, "lar.drolet" <[EMAIL PROTECTED]> wrote:
>
> Saw this and thought it would be of interest to the group.
> 
> http://casario.blogs.com/mmworld/2007/01/flex_2_develope.html
>




[flexcoders] Re: Applying actionscript to

2007-01-17 Thread lar.drolet
Your AS file can be a transition, an object/class for which you pass
the Image once it is loaded.  When the image finishes you may use an
event handler to call your new Reflection Class file to handle your
reflection effect.

private function onImageLoadComplete( event:Event ):void
{
// call your reflection class here and pass to it (event.target) 
// or the name of the image if it is specified.
}



Good Luck.

LD


--- In flexcoders@yahoogroups.com, "Merrill, Jason"
<[EMAIL PROTECTED]> wrote:
>
>  
>  How do I access the sprite/movieClip instance (not sure which it is in
> the image class) of an image loaded into image tag and then pass that to
> an actionscript method?
> 
>
>   Basically, I have a repeater that loads dynamic images (based on
> XML data) into an  tag.  That works fine.  I also have a
> Reflection class  (I'm making it AS 3.0 compliant) which applys a
> reflection effect to a movie clip's bitmap data, which also works fine
> outside of Flex .  However in Flex, I know how to import the class, but
> not how to tie the rendering of the different dynamic images in my MXML
> with the Reflection class.  I read the help docs on mx.controls.image,
> and it seems like the image might be loaded into a sprite instance, but
> how to I send that sprite instance to my actionscript method right after
> the image loads?  
>
>   Any ideas?  Thanks.
> 
>   Jason Merrill 
>   Bank of America
>   Learning & Organizational Effectiveness
>




[flexcoders] Re: Module Interface Problems

2007-01-17 Thread lar.drolet
Try this:

public var modResult:Object;
private function onModuleReady( event:Event ):void
{
modResult = (modMyModule2.child as myResults);
modResult.searchResults = arrSearchResults;
}

Also if you are using an Interface you need to reference the Interface
within both the Application and the Module.

Check out this blog for some more information:
http://weblogs.macromedia.com/pent/


Good Luck.

LD


--- In flexcoders@yahoogroups.com, "Roger Gonzalez" <[EMAIL PROTECTED]> wrote:
>
> For what its worth, it appears at first glance that your code should
> work.
>  
> Have you tried strong typing rather than using "*"?
>  
> var results:IResults= IResults(modMyModule2.child)
>  
> Not sure why it isn't working though, sorry.
>  
> -rg



[flexcoders] Modules and Run-time CSS

2007-01-09 Thread lar.drolet
I saw an example of applying a run-time CSS to an application and a
thought came to mind; Can I apply a run-time CSS to a dynamic module
and in essence override the application CSS?

Would something like this be feasible (before I attempt it on my own
and blow up with errors)?

http://www.adobe.com/2006/mxml";
  width="100%" height="100%" 
  initialize="StyleManager.loadStyleDeclarations('styleForModule.swf')" >
  



Thanks.



[flexcoders] Re: Ending an Effect

2007-01-08 Thread lar.drolet
Just a thought but how about capturing when the zoom effects ends
(EffectEnd or Event.COMPLETE) and then checking if the Mouse is over
the same object. 
If not then call the reverse right away.

LD

--- In flexcoders@yahoogroups.com, David Steele <[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> I'm applying the zoom effect to multiple UIComponents on a canvas.
If I move the mouse quickly off one zoomed component and onto another,
sometimes the first will not reverse to its original size. I believe
this is because the isPlaying flag is true if *any* instances of the
effect are currently playing. Does anyone know a solution for this? I
want instance one to shrink back down to original size even if I move
quickly to instance 2.
> 
> 
> TIA
> 
> Code:
> 
> public function doZoom(event:MouseEvent):void {
> if (zoomAll.isPlaying) {
> zoomAll.reverse();
> }
> else {
> // If this is a ROLL_OUT event, play the effect
backwards. 
> // If this is a ROLL_OVER event, play the effect
forwards.
> zoomAll.play([event.target], event.type ==
MouseEvent.ROLL_OUT ? true : false);
>if(event.type == "rollOut"){
>  zoomAll.end();
>}
>//
> }
> }
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com
>




[flexcoders] Re: reload the same Image every second

2007-01-04 Thread lar.drolet
Had a similar issue and I am not sure if this is the best fix but it
worked for me.
I had to place a null reference into the image source before reloading
the same image on top of itself.
I would try something like:

var url:String = "http://localhost/frame.png";;
var urlReq:URLRequest = new URLRequest(url);
framePNG.url= null;
framePNG.url= sURL;
framePNG.send();

I posted my issue here a few days ago #60062
  .

Good Luck.

LD


--- In flexcoders@yahoogroups.com, "johnesocko" <[EMAIL PROTECTED]>
wrote:
>
> Has anyone load an Image and refreshed it automatically?
>
> What I would like to do is
> 1. Load Image on document creation.
> 2. Refresh the image every 100 ml secs
> 3. Its the same image another app that we wrote writes over the
> original
>
>
> thanks in advance
>
>
>
>
>
>
>
> This doesn't work at all
>
> 
> http://www.adobe.com/2006/mxml";
> initialize="initTimer()">
> 
>
> 
>
> 
>
> 
>



[flexcoders] Re: Full Screen Projector File for Flex 2 Swf

2007-01-04 Thread lar.drolet
You can use a product called Zinc (www.multidmedia.com) to do this.  I
have used this product for over 4 years and it is actually quite good.
 The latest version can take Flash 9 and Flex built swf files and
convert them into EXEs.  Turning it into a full screen app. on start
is super easy, one of the base settings allows for you to do this. 
Good luck.

LD


--- In flexcoders@yahoogroups.com, Shannon Hicks <[EMAIL PROTECTED]> wrote:
>
> That's Apollo. Now you just have to wait around 8 months (hopefully)
for 
> the release.
> 
> Luis Casillas wrote:
> > I developed an app in Flex 2 and need a way to turn the created swf 
> > into an exe that automatically goes into full screen without any user 
> > interaction. Please help.
> >  
> > Luis Casillas
> >
> > __
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
>




[flexcoders] Blog post on Flex 2 Developer Certification exam

2007-01-04 Thread lar.drolet
Saw this and thought it would be of interest to the group.

http://casario.blogs.com/mmworld/2007/01/flex_2_develope.html