Copy link to clipboard
Copied
Message was edited by: Naveen.Lingam
Copy link to clipboard
Copied
Why are you quoting that? Where does it come from? By itself it can't work so a more detailed explanation of what it involves will help.
If this is an experiment, what is the goal of it? I would think the goal of an experiment is to find an answer by trial and error. You seem to be asking someone else to do that work for you.
Copy link to clipboard
Copied
Brother sorry You have mistaken, I am not asking any one to do My work, I am requesting initial inputs to start working with Action Script 3.0 since I am new to it.
Yeah let Me explain You My Goal :
I have to work with a tool called 'ADTECH CANVAS' in future which is a rich media Ad service. Adtech has it own flash components which helps creating Flash Advertisments easy(here is the link for better understanding http://canvas.adtech.com/docs/building-templates/). Let Me explain You with a smal example (When an image called to the stage using Action script along with the Adtech flash component, I get a chance to change the image in any point of time Using Adtech Canvas tool).
I got into this assignment just today, so just started expermenting on small things like, how to call a Image on to the stage when a button click. I achived some how using the below code : button instance name is=button01 and image instance name=image01
button01.addEventListener(MouseEvent.MOUSE_OVER, image01);
function image01(event:MouseEvent):void
{
var libImage:char01 = new char01();
var holder:Bitmap = new Bitmap(libImage);
addChild(holder);
}
But some how I dnt have a control on where my image shud exactly placed, for example center of my stage. pleae help Me if could understand My request. thanks a lot.
Copy link to clipboard
Copied
function image01(e:MouseEvent):void
{
var holder:Bitmap = new Bitmap(new char01());
holder.x = Math.round((stage.stageWidth - holder.width) * .5);
holder.y = Math.round((stage.stageHeight - holder.height) * .5);
addChild(holder);
}
That should center your image for you - you just need to set x and y properties of your Bitmap.
Copy link to clipboard
Copied
Thanks Brother, its really help full . thank you so much for your time.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now