Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setProperty will not work inside mask? 1

Status
Not open for further replies.

TulsaJeff

Programmer
Jan 29, 2001
870
US
I am using a mask to fill my logo on the preloader. First I am calculating the totalbytes vs loadedbytes then using that number *100 to move the position of my mask upwards(filling the logo)

This absolutely refuses to work inside the mask... I can change it from a mask to a normal mc and it just moves right up like it supposed to...it works great.

What is the deal? Ya' Gotta Love It!
sleepyangelsBW.jpg
 
Actually I am setting the scale rather than the position... I changed it earlier.... I would rather set the position if anyone has any ideas how to do that inside a mask.

Here is the code in case anyone cares to see it:

Code:
/:loaded = _root.getBytesLoaded();
/:total = _root.getBytesTotal();
if (Number(/:loaded) == Number(/:total)) {
    gotoAndPlay ("Main", 1);
}
/:percentage2 = (Math.floor(/:loaded/1000))+"K of "+(Math.floor(/:total/1000))+"K loaded";
setProperty ("_root.maskbox", _yscale, number((/:loaded) / (/:total)) *100);
setProperty ("_root.maskbox", _x, "248.1");
Ya' Gotta Love It!
sleepyangelsBW.jpg
 
A link or a .fla at the usual address?

Don't think you can move a mask as such!

Regards,
wink4.gif
ldnewbie
 
Writing posts at the same time!

What's maskbox? A mc?

Still working with Flash 4 syntax, hey?

Regards,
wink4.gif
ldnewbie
 
I copied the code from somewhere else just haven't converted it yet... basically just trying to see if it would work then work out the wrinkles in the code.

I don't have it uploaded yet... get to that tomorrow if nobody comes up with anything between now and then. Ya' Gotta Love It!
sleepyangelsBW.jpg
 
Having a hard time to picture this out!
Are you using a masking layer?
Or is the logo the mask being filled up from behind like a progress bar would be filled?
Can you e-mail me at least the swf you've got?

Regards,
wink4.gif
ldnewbie
 
I am off to bed...will check back in the morning. Ya' Gotta Love It!
sleepyangelsBW.jpg
 
So basicly you want to gradually fill your white "CD" logo with red, right? Just use a red mc over it, as you suggested, which works fine.
The problem probably lies in your graphic logo (a symbol), 'cause if you use text or a drawn logo with the pencil or brush tools, it works fine using the text or drawing as a masking layer. Flash just doesn't seem to like the graphic symbol logo when used as a masking layer!

Regards,
wink4.gif
ldnewbie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top