You can also try the below
1. Using Loader load iamge file,in Loader complete Event function
assing the loaderobj.content to image source
import flash.net.URLRequest;
private var loader:Loader;
private var request:URLRequest;
loader=new Loader();
request=new URLRequest(image_path);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
loader.load(request);
private function onComplete(event:Event):void {
img.source=loader.content;
//this.addChild(loader); // this is also one more method,i get when
searching,but doesnt work for me,try this also
}
2. Why you want to hang the System,Browser and all.Is that enough to
protect the application access
try the code
"Application.applicatio.enable=false" in button click
This will block the user intraction
Gnanz.../
http://gnanz-flexworld.blogspot.com
<fx:AnandVardhan/> wrote:
> :) u r amazing. May be you are the first who want to crash his
> system.
> 1. You can use Embed code like following,
>
> [Embed(source="assets/images/ionLogo.png")]
> [Bindable]
> private var myLogo:Class;
>
> and then use <image source="{myLogo}"/>
>
> 2. on button press, create an infinite loop, say run a loop of
> creating instances till 0<1
>
> Done.
>
> Anand
>
> On Feb 27, 3:57 pm, Mudassir <[email protected]> wrote:
>
>> Hi Friends,
>> I have 2 doubts in flex can any one help me
>>
>> 1. To a image components in flex we provide source as a string eg:
>> assets/addimages.jpg which is nothing but a url..
>> Now my question is, is there any way other than this to provide a
>> source to a image.
>>
>> 2. I want to crash(Hang) my application while running or on a Button
>> Press.. Just like how the PC get Hang up(only my application Browser
>> should Hang not my PC)
>>
>> Thanx in Advance
>>
>> Regards,
>> K. Md. Mudassir Hussainhttp://mudassirsprofile.blogspot.com
>> Atelier-soft Pvt Ltd
>> Chennai
>>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---