Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Re: How would you modify the vertical position of an eleme

Re: How would you modify the vertical position of an eleme

2005-09-29       - By ud

 Back
Reply:     1     2  

I'm not sure I agree about avoiding onClipEvents, but your code has some
other problems.

1. take off the quotes for sure like MK said
2. set the value of vpos BEFORE you call move();
3. get rid of the conflicting line mcObject._y=0;
4. where is percentLoaded coming from? I don't see you setting it's value
anywhere.
5. this code would only work if mcObject is a child of the clip you've put
the code on.

-- -- Original Message -- --
From: "MK" <flabbygums@(protected)>
To: <pro_flash@(protected)>
Sent: Wednesday, September 28, 2005 9:40 PM
Subject: [Pro Flash Users] Re: How would you modify the vertical position of
an element while


> --- In pro_flash@(protected), "Tony" <thudman@(protected)> wrote:
>> How would you modify the vertical position of an element while
>> preloading? Using a standard preloader, I've added this to an object
>> on the stage:
>>
>> onClipEvent (load) {MovieClip.prototype.move = function(x,y){
>> this._x = x
>> this._y = y
>> }
>> mcObject._x = 425
>> mcObject._y = 0
>> mcObject.move(0,"vpos");
>> vpos = (600/percentLoaded)*100
>> }
>>
>> Why doesn't this work?
>
> In general you should try to stay away from onClipEvents..  then try
> taking the quotes off vpos - the quotes tell the player it's a string..
>
>
>
>
>
>
>
>
> =========================
> Pro_Flash: Professional Web Developers Using Macromedia Flash
> To subscribe: mailto:pro_flash-subscribe@(protected)
> To UNSUBSCRIBE: mailto:pro_flash-unsubscribe@(protected)
>
> Yahoo! Groups Links
>
>
>
>
>
>
>




-- ---- ---- ---- ------ Yahoo! Groups Sponsor -- ---- ---- ---- --~-->
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/IHFolB/TM
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----~->

=========================
Pro_Flash: Professional Web Developers Using Macromedia Flash
To subscribe: mailto:pro_flash-subscribe@(protected)
To UNSUBSCRIBE: mailto:pro_flash-unsubscribe@(protected)

Yahoo! Groups Links

<*> To visit your group on the web, go to:
   http://groups.yahoo.com/group/pro_flash/

<*> To unsubscribe from this group, send an email to:
   pro_flash-unsubscribe@(protected)

<*> Your use of Yahoo! Groups is subject to:
   http://docs.yahoo.com/info/terms/




Earn $52 per hosting referral at Lunarpages.