[flexcoders] Re: Embedding a SWF file in Flex

2008-03-06 Thread mailtoanzer
Use SWFLoader

Ansar
http://www.FlickrMailer.com 

--- In flexcoders@yahoogroups.com, CO_China_Girl [EMAIL PROTECTED] wrote:

 I have a SWF file that I did not create nor do I have the source for
 but I would like to embed it into my Flex application.  Is this
 possible to do?  If so, how?





[flexcoders] MP3 web site

2008-03-05 Thread mailtoanzer
Hi,
I am doing an web site for users to purchase speeches in the form of mp3. 

I want to make sure the user who bought the mp3 can only use it. I
want to restrict the mp3 usage to only the downloading machine or some
other kind of authentication before the user uses the file. Is there
anyway to do it.

One idea is don't allow the user to download the original file and
play the file directly from internet (work like a subscription
mechanism). Problem with this approach : the user always need internet
connection, loading time for low bandwidth connections

Any thoughts are much appreciated

Thanks and Best Regards
Ansar




[flexcoders] Re: Problem with ModuleLoader and List in Flex 3 - Possible BUG

2007-12-31 Thread mailtoanzer
Hi Venkat,
Thanks a lot.. The problem is solved.
I don't have any issue with other classes,, is this problem occur only
with DragManager class?? 

Thanks again
Anz 
http://www.FlickrMailer.com



--- In flexcoders@yahoogroups.com, rueter007 [EMAIL PROTECTED] wrote:

 This is common reference issue with using modules. One of your modules
 is loading the dragmanager and the second one cannot access it. One
 solution is to reference the DragManager in your main application
 
 import mx.managers.DragManager;
 var dragManager:DragManager;
 
 HTH.
 
 - venkat
 http://www.venkatj.com
 
 --- In flexcoders@yahoogroups.com, Anzer anzer@ wrote:
 
  Hi,
  
  I have two modules and each having lists to list different items. I am
  getting the below error when clicking on a list after loading second
 module.
  
   
  
  TypeError: Error #1009: Cannot access a property or method of a null
 object
  reference.
  
  at mx.managers::DragManager$/get
 

isDragging()[E:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\ma
  nagers\DragManager.as:158]
  
  at
 

mx.controls.listClasses::ListBase/mx.controls.listClasses:ListBase::dragScro
 

ll()[E:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\controls\l
  istClasses\ListBase.as:6989]
  
  at Function/http://adobe.com/AS3/2006/builtin::apply()
  
  at ()
  
  at
  flash.utils::SetIntervalTimer/flash.utils:SetIntervalTimer::onTimer()
  
  at flash.utils::Timer/flash.utils:Timer::_timerDispatch()
  
  at flash.utils::Timer/flash.utils:Timer::tick()
  
   
  
  I have uploaded a sample page to
  http://www.digitalmesh.com/staging/modulebug/ModuleTest.html 
  
  Right click to see the source code. 
  
   
  
  Please let me know if there is any solution to this problem. 
  
   
  
  Thanks
  
  Anz
 





[flexcoders] Re: Solutions for provide a secure access to a Web-Service using Flex

2007-12-23 Thread mailtoanzer
Hi,
If you have no problems with hard coding a Key, following
implementation is easy and may be useful in your situation

1. Define a hard coded complex string in your Flex app and server side
code.
2. on every requests to server send this ID along with other parameters.
3. Validate the ID in the server with the one from client.
4. If they match process the request, otherwise deny.

Its a very bad security implementation but will work as long as nobody
else knows the hard coded string. 

Regards,
Anz



--- In flexcoders@yahoogroups.com, João [EMAIL PROTECTED] wrote:

 We are dealing with one huge client that provides technological
 solutions based on SAP and .NET. They hired us for developing the
 presentation layer, and it's damn difficult to make them change the
 way they work, even if we know that they aren't making the best
 decisions. 
 Anyway, i don't see how changing from web-services to flash remoting
 would solve the problem. It's still a SOA architecture, with exposed
 services, and the only difference is that the data is transferred in
 binary (but not difficult to be interpreted - even more now with the
 release of the AMF specification).
 PKI seems to be the solution, but our expertise is not security. Also,
 i  have doubts on:
 
 1- Does Flex has tools to deal with this kind of things?
 2- From what i recall, PKI needs a private key on both sides. This
 would mean that the key was hard-coded on the Flash Client.
 
 I am thinking on something simple like:
 
 1- The client communicates with a web-service requesting access
 2- The server initiates a session, returning a random string
 3- The client runs some kind of algorithm, made by us, to encrypt
 the string, and returns it. Or, it uses a known algorithm that
 encrypts the string using a keyword.
 4- The server runs the same algorithm on the string, and compares the
 result with the returned encrypted string. If they are the same, the
 session changes it's state to validated, allowing access to the
 web-services. If not, the session is terminated.
 
 This is far from being perfect, and far from being secure because the
 client could be decompiled and the encryption algorithm could be
 easily broken, but at least it would be a bit more reliable than
 having the web-service completely exposed. We are dealing here with
 probabilities...
 
 What do you think?





[flexcoders] Re: Which architecture to follow

2007-12-05 Thread mailtoanzer
tyeps of projects we are working on are simple DB applications,
e-commerce applications, project management tools with multiple
modules etc.
Currently we are using Cairngorm but if PureMVC is better we are
planning to move to that as we are already using MVC on .Net applications.

--- In flexcoders@yahoogroups.com, yigit [EMAIL PROTECTED] wrote:

 you should first provide what kind of an application you want to
develop.
 in other case, comments will be too general and useless..
 
 so , what kind of an application you want to develop?
 
 Anzer wrote On 12/05/2007 07:34 AM:
 
  Cairngorm or PureMVC?
 
   
 
  I have read some where PureMVC is the best choice.
 
  Please give your inputs.
 
   
 
  Thanks
 
  Anz
 
 





[flexcoders] Re: Cairngorm design questions about Command-View communication

2007-12-05 Thread mailtoanzer
I am also looking for the beast practice for Command-View communication. 
Currently we are using model variables and setter functions in the
View to achieve this. 


--- In flexcoders@yahoogroups.com, rmarples [EMAIL PROTECTED] wrote:

 As our product has gotten bigger, I have moved it from a standard
Model-View-Controller design to a 
 more strict Cairngorm-like Model-View-Dispatcher-Command design. But
one particular aspect of it has 
 left me a bit unsure as to the best practice. I'm hoping others can
share their views on this.
 
 There are various times when a Command needs to make a
non-data-related update to the view such 
 as: 
 - disabling/enabling buttons while a server operation runs
 - updating the focus of controls
 - changing component states
 - hiding/showing components
 
 We've had some debate about the best method to accomplish this. The
easy scenario is changing states 
 because we can simply have a model variable that the view's
currentState property is data-bound to. So 
 we can modify that model variable from within the Command which
indirect updates the view. But there 
 are other situations that are more tricky. For example, we have a
login view with a username and 
 password. We have a command that loads the stored username. If the
stored username is not found, 
 we'd like to set the focus on the username textbox, whereas if the
username is found, then we want to 
 put the focus on the password textbox. I don't believe you can set
up focus using data-binding (if you 
 can let me know). So we have postulated several different solutions
to this, all of which work but we are 
 trying to figure out which one is the most correct based on the
design pattern.
 
 1. Set up a ChangeWatcher to watch the a model username variable, in
the handler set the focus based 
 on whether that variable is null or not.
 
 2. Dispatch an event from the command that the view listens to. This
is used to notify the view when the 
 username variable has been populated and thus when it can run it's
focus logic.
 
 3. Have the view object store a reference to itself in the model
somewhere so that the command can 
 update it directly.
 
 I know this seems like a very granular point but I'm just looking
for the general practice in these types of 
 situations because there are lots of them.
 
 Any thoughts?
 
 Ryan





[flexcoders] Re: CursorManager problem in textinput

2007-11-29 Thread mailtoanzer
I have solved it myself by setting 

mouseChildren=false mouseEnabled=false for the TextInput

--- In flexcoders@yahoogroups.com, Anzer [EMAIL PROTECTED] wrote:

 Hi,
 
 I set the cursor of a textinput using CursorManager
 
  
 
 [Bindable]
 
 [Embed(source=assets/images/img_hand.png)]
 
 private var HandIcon:Class;
 
 private var cursorID:int;
 
  
 
  
 
 mx:TextInput rollOver=cursorID = CursorManager.setCursor(HandIcon);
 
 rollOut=CursorManager.removeCursor(cursorID);
 
  
 
 Reference:

http://blog.flexexamples.com/2007/09/10/changing-the-cursor-in-a-flex-applic
 ation-using-the-cursormanager-class/ 
 
  
 
 The new cursor is showing but it also showing the default text cursor on
 roll over of the text box.
 
  
 
 How can I solve it?
 
  
 
 Thanks
 
 Anz





[flexcoders] Re: icon path in ActionScript

2007-11-21 Thread mailtoanzer
Wow thats great... worked perfectly
Big thanks to you and Ben Stucki

Thanks again
Anz

--- In flexcoders@yahoogroups.com, Douglas Knudsen
[EMAIL PROTECTED] wrote:

 this approach might work for you
 http://blog.benstucki.net/?p=42
 Elvis ain't the only thing in Nashville, eh?
 
 DK
 
 On Nov 21, 2007 11:27 PM, Anzer [EMAIL PROTECTED] wrote:
 
 Thanks for the reply.
 
 
 
  But it will not work for me since the icon path is coming from
database
  and I can't give a static path.
 
 
 
  I have tried the following code, but that too will give a compile
error
 
 
 
   var iconPath:String = assets/ + item.IconFile.toString();
 
 
 
   [Embed(source=iconPath)]
 
   var iconCls:Class;
 
 
 
  Please help
 
  Anz
   
 
 
 
 
 -- 
 Douglas Knudsen
 http://www.cubicleman.com
 this is my signature, like it?





[flexcoders] Re: Croping area

2007-10-24 Thread mailtoanzer
Hi Ian,
Thank you for the reply. 
I tried your solution but I couldnt make the crop area draggable. I am 
trying to do something similar to the crop tool in
http://www.picnik.com/. My crop area is not resizable but the whole
image can be scaled by dragging the corners. 
I have completed the scaling of image and cropping, the only thing
remaining is the alpha for image area except croping area.

Please let me know if there is any solution

Thanks and best Regards
Anz

--- In flexcoders@yahoogroups.com, Ian Thomas [EMAIL PROTECTED] wrote:

 Hi Anzer,
Have two copies of your image; one set to 0.5 alpha and one in
front of
 that set to 1.0 alpha.
 
Use a rectangular mask on the image in front (DisplayObject.mask)
 
That should do it.
 
 Ian
 
 On 10/24/07, Anzer [EMAIL PROTECTED] wrote:
 
 Hi,
 
  I am working in an image manipulation application and I have almost
  finished with that.
 
  Now I have a problem with image cropping UI.
 
 
 
  I want to make the image shaded (alpha = .5) except what seen
through the
  crop area. The crop area is draggable. Please give suggestions to
do this
 





[flexcoders] Re: Croping area

2007-10-24 Thread mailtoanzer
Hi Jon  Ian,
Thanks alot for your valuable suggestions.
I made it workable using the first solution (2 images). I am gonna try
the second solution tomorrow. I will let you know the resluts.

And Jon its not a fully functional image editing app, its a simple
media uploader with scaling and cropping functionalities to plug into
a big project management application. I will send you the link once I
upload it to live.

Thanks again
Anz


--- In flexcoders@yahoogroups.com, Jon Bradley [EMAIL PROTECTED] wrote:

 
 On Oct 24, 2007, at 8:15 AM, mailtoanzer wrote:
 
  Hi Ian,
  Thank you for the reply.
  I tried your solution but I couldnt make the crop area draggable. I am
  trying to do something similar to the crop tool in
  http://www.picnik.com/. My crop area is not resizable but the whole
  image can be scaled by dragging the corners.
  I have completed the scaling of image and cropping, the only thing
  remaining is the alpha for image area except croping area.
 
 Didn't read the 'crop area draggable part' first time around.
 
 For the draggable crop area, use a transparent proxy that you drag  
 around the screen. You won't see it but it's clickable and draggable.  
 If you don't have to rotate or scale it, that's easy - just use  
 normal drag methods.  You can automatically have it be limited to the  
 boundary of the canvas it's in very easily if you want.
 
 For drawing the overlay that white washes the image:
 
 1. Get window size (container of the image and crop area)
 2. start fill on a new sprite that's on top of everything
 3. draw the window rectangle in the sprite at the full size of the  
 window
 4. draw the crop rectangle in the sprite, in reverse order using the  
 sizing of the crop box
 5. end the fill
 6. Run the draw loop as you drag the crop area around.
 
 cheers,
 
 jon





[flexcoders] Image manipulation tutorials

2007-09-29 Thread mailtoanzer
Hi,
I want to do some image manipulations like crop, resize, blur etc in
my current Flex project. Can some one please point me to some open
source project or tutorials for this.

Thanks and Best Regards,
Anz