Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 09-01-2006, 10:42 AM   #1
thor918
Registered User
 
Join Date: Sep 2006
Posts: 1
Default some starting questions

Hi.
I startet working on a little component in flash, just to learn how to do it.
the component is written in actionscript.

this is a simple example of the component.
what is the problem is that the circle is drawned in x=0,y=0 (the center of the circle) to the uicomponent. what I want is that the moviclip is centered to the uicomponent. the movable area of the uicomponent have to cover what I draw in my movieclip.
something I would also like to know is how one would add scaling to the component.

package components {
import flash.display.MovieClip;
import flash.utils.setInterval;
import flash.display.Sprite;
import mx.core.UIComponent;

public class clock extends UIComponent{
public var myclock:MovieClip = new MovieClip();
public var circle:MovieClip = new MovieClip();

public function clock():void {
this.addChild(myclock);
myclock.addChild(circle);

circle.graphics.lineStyle(6, 0x000066, 114);

circle.graphics.drawCircle(0,0,114);
}
};
};

a summary of what I like to know:
* center a moviclip to another object
* add scaling to the component

thanks for all the help

edit:
I got the centering of moviclip working, just by calculating where the coordinates for the center is.
scaling is a little bad. I was hoping to get a scaling where the component where close to the drag points.
but it works ok, I guess..

Last edited by thor918; 09-03-2006 at 09:43 PM.
thor918 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Randomly Loading Questions from XML for Quiz. Dave At ADC ActionScript 2.0 0 12-14-2005 01:49 PM
How to get answers to your scripting questions pixelwit General Chat 150 10-12-2005 05:12 AM
how questions should be answered smoothhabitat General Chat 15 08-03-2004 01:46 PM
[Q] Do we need those forums??? CyanBlue General Chat 59 07-27-2004 11:13 AM
Starting a new flash web site. A few questions. Gerebeto ActionScript 2.0 1 04-23-2004 02:18 PM


All times are GMT. The time now is 10:54 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.