Scripting Is Supposed Flash Movie Much Cleaner
Scripting is supposed flash movie much cleaner, there should be a straight forward way to do this.
the example we can call "test.swf"
the movie clip we will call "fade" which resides inside the library
"fade" extends over 50 frames the first 30 have a snazzy animation upon a mouse click on a button in the main menu. I would like to use this movie clip again just starting at frame 30. My question is can you reference a frame label inside the "fade" clip from the "test.swf?"
Note tell target is usefull by adding a ../ script you can exit a movie clip. Can you preform this code to enter in a clip?
Much thanks
aspiring asssstronaught
FlashKit > Flash Help > Flash ActionScript
Posted on: 10-19-2001, 10:40 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Cleaner Scripting
I think the code says it all. For a current project I need to use a hit area to start an animation when a mouse rolls over a _mc.
If I use the movie clip instead of a button I can simplify the script by using the first section of the attached code. In the simplified code I only have to define one over and one out state and then I can use a this statement to control the action.
For any number of _mc's I just need one set of functions.
Using buttons, each _mc needs it's own over and out definition and it's own unique set of functions.
I've tried using a bunch of if (grnMC_button.onRollOver = true) {this statements apply only to grn_mc} (not really code) but I can't find anything that works. It would be a great time saver if I could because in the final project I've got about 75 movie clips to control with over functions.
One more thing. I can't use the movie based code because the animations move out from under the buttons and the mouse over area gets big and overlaps the other "buttons". I guess I'm really looking for a way to define a hit area and still keep the code simple.
Attach Code
Movie driven _mc sample code:
˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
// over-out definitions
grn_mc.onRollOver = over;
grn_mc.onRollOut = out;
blu_mc.onRollOver = over;
blu_mc.onRollOut = out;
red_mc.onRollOver = over;
red_mc.onRollOut = out;
// onRollOver functions
function over () {
this.overThis = true;
this.gotoAndPlay("start");
}
// onRollOut functions
function out () {
this.overThis = false;
Button driven _mc sample code:
˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
// button definitions
grn_btn.onRollOver = over_grn;
grn_btn.onRollOut = out_grn;
blu_btn.onRollOver = over_blu;
blu_btn.onRollOut = out_blu;
red_btn.onRollOver = over_red;
red_btn.onRollOut = out_red;
// onRollOver functions
function over_grn () {
grn_mc.overThis = true;
grn_mc.gotoAndPlay("start");
}
function over_blu () {
blu_mc.overThis = true;
blu_mc.gotoAndPlay("start");
}
function over_red () {
red_mc.overThis = true;
red_mc.gotoAndPlay("start");
}
// onRollOut functions
function out_grn () {
grn_mc.overThis = false;
}
function out_blu () {
blu_mc.overThis = false;
}
function out_red () {
red_mc.overThis = false;
}
Edited: 05/16/2007 at 11:25:53 AM by Rick Gerard
Cleaner Movie Clip Dragging
I briefly remember seeing a tutorial for this somewhere but I cant find it anywhere. But is there a way to drag movie clips around using startDrag but with a cleaner more fluent motion as it a bit jolty when moving?
Anydony know the answer?
Flash Media Cleaner Addons
I'm looking for an add-on lilke Sorenson Squeeze for Flash, but this is a little pricey for me.
http://www.sorensonstore.com/product.../sq4mfwin.html
Does anyone know of something comparable for less? I know. You get what you pay for, but I need something to get me by while I'm learning Flash.
I'm not looking for shareware, etc. Just an inexpensive, nifty program to get me started as a newbie.
Thanks in advance for any help.
Can I just say I'm loving Flash. I just starting using it a few days ago, and I'm hooked! This is so much nicer when embedding video to webpages. Whoa!
Edit:
Does anyone know if the addon comes with Studio MX 2004? Because I plan on upgrading very soon. I definately don't want to dish out $119.00 for the addon if it ships with Macro's latest studio.
Border Around Flash Image In Table, Not Supposed To Be There
On this page:
http://www.techartisans.net/speedMi....php?flash=true
you will find a table which includes one flash image. For some reason the flash image appears a pixel or two smaller than the table cell it is in, and so there is a dark blue border around it (it was a white border until I set the background color of the flash to dark blue). The cell is 326 pixels in height, and colspan=2 so it never actually says it is 360 wide, but it is. The flash image is also 360w x 326h.
Any ideas why this might be happening? I played around with adjusting the size of the flash but it didn't change much, just made the border slightly skinnier.
Thanks, Emily
Popup With In Flash Movie - Scripting
I have a movie with a table. I need to make it interactive. I have converted some text to buttons. When someone clicks the button I need to have it display some additional text like a pop up. Any help would be appreciated.
Problematic Flash Files: "Cleaner" Needed (Paid)
Hello all,
I've hit a wall in several small Flash movies that are integrated into one online course, things that I'm sure I can figure out with time, but time is something I ain't got. I need a Flash wiz who can figure out what I've done wrong, improve the actionscripting where necessary, and also finish off some elements that have me stumped (and tell me what I've done wrong in the process). It's actually pretty basic stuff...and all the major groundwork has been done...but there might be a few challenges. You need to be familiar with video/audio integration...everything else is standard stuff.
If you're interested, please send me an e-mail and let me know your preferred method of payment: hourly or project-basis...and if you prefer hourly, please let me know your hourly rate since I have to get approval. Also, please include a link to your Flash portfolio.
BTW - This could possibly lead to a long-term project-basis work relationship.
Thanks! I hope to hear from you!
John
Cleaner
Hi
Just wondering if anyone uses Cleaner EZ which comes with Premier etc to compress their video files into Quicktime?
Im stuck on selecting the right settings...I need the video to be fairly small but it ALWAYS ends up being too blurred...
Thanks!
Can This Be Cleaner?
this is a movieclip that can move threw a maze of objects. if the user hits an object the movieclip jumps to frame that shows it crashing. Everything works. my question is.. can the code be cleaner or wrapped up in a function?
onClipEvent (enterFrame) {
if (Key.isDown(37)&& hitTest(_level0.wall)==false) {
_x=_x-4;
}
if (Key.isDown(38)&& hitTest(_level0.wall)==false) {
_y=_y-4;
}
if (Key.isDown(39)&& hitTest(_level0.wall)==false) {
_x=_x+4;
}
if (Key.isDown(40)&& hitTest(_level0.wall)==false) {
_y=_y+4;
}
if (hitTest(_level0.wall)==true) {
this.gotoAndPlay("hit");
}
if (hitTest(_level0.wall2)==true) {
this.gotoAndPlay("hit");
}
if (hitTest(_level0.wall3)==true) {
this.gotoAndPlay("hit");
}
}
[F8] Is There A Cleaner Way To Do This?
This code works just fine for restricting the area I can draw in, but it seems very inefficient. Is there a better way?
Code:
onMouseMove = function () {
if (_xmouse>32 && _ymouse>32 && _xmouse<607 && _ymouse<397) {
drawingArea.lineTo(_xmouse, _ymouse);
}
};
My movie actually uses close to 100% CPU after scribbling a lot, and I think it might be this code thats doing it.
AS2 - URL Cleaner
Hello, this is a great tool that i use to filter path to test locally.
the function:
function cleanVBLE(vble)
{
a = new String(vble);
b = a.split("/");
return b.pop();
}
the usage:
trace(cleanVBLE("/formas/80094/canalune.swf"));
Cleaner Animation
I am trying to make a movie which will play fullscreen with a small area with 20% opacity visible in the center. Now my character (any image) will erase the black background so that a clear picture becomes visible.
Pls. help. urgent
Cleaner Code
I have a code that consolidates current moneys into the least amount of tokens possible. It works but the actual code is extremely bulky, i was wondering if anyone has a tip or sees something that can be removed/replaced for less code
Thanks
code: C_Amount = _root.betTotal;
if(C_Amount < 25)
{
NumLeft = C_Amount % 10;
if(NumLeft < 5)
{
dollar_1 = NumLeft;
dollar_10 = (C_Amount - NumLeft) / 10;
}else{
NumLeft1 = NumLeft % 5;
dollar_1 = NumLeft1;
dollar_5 = (NumLeft - NumLeft1) / 5;
dollar_10 = (C_Amount - NumLeft) / 10;
}
}
[CS3] Cleaner Code
Hi,
Is there an easier, cleaner way to write:
type = _root.page;
if (_root.pageOn == 1)
{
if (type == 'ftp')
{
_root.content.ftp.filters = [myBlurFilter];
_root.content.ftp._alpha = 50;
}
if (type == 'news')
{
_root.content.news.filters = [myBlurFilter];
_root.content.news._alpha = 50;
}
if (type == 'hello')
{
_root.content.hello.filters = [myBlurFilter];
_root.content.hello._alpha = 50;
}
if (type == 'contact')
{
_root.content.contact.filters = [myBlurFilter];
_root.content.contact._alpha = 50;
}
if (type == 'exhibitions')
{
_root.content.exhibitions.filters = [myBlurFilter];
_root.content.exhibitions._alpha = 50;
}
if (type == 'interiors')
{
_root.content.interiors.filters = [myBlurFilter];
_root.content.interiors._alpha = 50;
}
if (type == 'conferences')
{
_root.content.conferences.filters = [myBlurFilter];
_root.content.conferences._alpha = 50;
}
if (type == 'live_events')
{
_root.content.live_events.filters = [myBlurFilter];
_root.content.live_events._alpha = 50;
}
if (type == 'new_media')
{
_root.content.new_media.filters = [myBlurFilter];
_root.content.new_media._alpha = 50;
}
if (type == 'people')
{
_root.content.people.filters = [myBlurFilter];
_root.content.people._alpha = 50;
}
if (type == 'clients')
{
_root.content.clients.filters = [myBlurFilter];
_root.content.clients._alpha = 50;
}
}
Cleaner Code
Hi all, I'm currently working on creating a simulated training flash-based presentation and I'm looking to improve my coding habits.
Part of the simulation was to create a custom cursor that functions just as any data entry cursor would. Here's where I need to improve:
The user is restricted to only entering uppercase glyphs at this point, so the cursor should only respond if a letter character is pressed. All other characters should be ignored. I've figured a method to do this, and it works just fine, but the code is very repetitive and long. I'm guessing that there is a better way to do this by referencing a list of key codes in the conditional statement, but I'm not sure how to go about it. Here's what the code looks like
Thanks
Code:
onClipEvent(keyDown) {
//ignore tab
if (key.isDown(9)) {
this._x = this._x;
} else if (key.isDown(12)) {
this._x = this._x;
} else if (key.isDown(13)) {
this._x = this._x;
} else if (key.isDown(16)) {
this._x = this._x;
} else if (key.isDown(17)) {
this._x = this._x;
} else if (key.isDown(112)) {
this._x = this._x;
} else if (key.isDown(113)) {
this._x = this._x;
} else if (key.isDown(114)) {
this._x = this._x;
} else if (key.isDown(115)) {
this._x = this._x;
} else if (key.isDown(116)) {
this._x = this._x;
} else if (key.isDown(117)) {
this._x = this._x;
} else if (key.isDown(118)) {
this._x = this._x;
} else if (key.isDown(119)) {
this._x = this._x;
} else if (key.isDown(120)) {
this._x = this._x;
} else if (key.isDown(121)) {
this._x = this._x;
} else if (key.isDown(122)) {
this._x = this._x;
} else if (key.isDown(123)) {
this._x = this._x;
} else if (key.isDown(124)) {
this._x = this._x;
} else if (key.isDown(48)) {
this._x = this._x;
} else if (key.isDown(49)) {
this._x = this._x;
} else if (key.isDown(50)) {
this._x = this._x;
} else if (key.isDown(51)) {
this._x = this._x;
} else if (key.isDown(52)) {
this._x = this._x;
} else if (key.isDown(53)) {
this._x = this._x;
} else if (key.isDown(54)) {
this._x = this._x;
} else if (key.isDown(55)) {
this._x = this._x;
} else if (key.isDown(56)) {
this._x = this._x;
} else if (key.isDown(57)) {
this._x = this._x;
} else if (key.isDown(186)) {
this._x = this._x;
} else if (key.isDown(187)) {
this._x = this._x;
} else if (key.isDown(188)) {
this._x = this._x;
} else if (key.isDown(189)) {
this._x = this._x;
} else if (key.isDown(190)) {
this._x = this._x;
} else if (key.isDown(191)) {
this._x = this._x;
} else if (key.isDown(192)) {
this._x = this._x;
} else if (key.isDown(219)) {
this._x = this._x;
} else if (key.isDown(220)) {
this._x = this._x;
} else if (key.isDown(221)) {
this._x = this._x;
} else if (key.isDown(222)) {
this._x = this._x;
} else if (key.isDown(32)) {
this._x = this._x;
} else if (key.isDown(37)) {
this._x = this._x;
} else if (key.isDown(38)) {
this._x = this._x;
} else if (key.isDown(39)) {
this._x = this._x;
} else if (key.isDown(40)) {
this._x = this._x;
} else if (key.isDown(20)) {
this._x = this._x;
} else if (key.isDown(106)) {
this._x = this._x;
} else if (key.isDown(107)) {
this._x = this._x;
//don't move left of original position
} else if (key.isDown(8)) {
if (this._x > 104) {
this._x -= 10;
}
//don't move right of new position
} else if (this._x < 112) {
this._x += 10;
}
}
If/Else - Is There A Cleaner Code?
Hello all,
I am currently working on a flash file and I'm an intermediate user. My actionscript abilities are probably close to beginner, but I'm a quick learner (most of what I have learned with actionscript has been self taught).
In my flash file I have an animation of a rotating globe. Each frame of the rotation is a separate raster image - I don't know how you would represent a rotating globe otherwise, not really something that can be tweened (suggestions are welcome).
I have different locations off to the side of the globe. When the user mouses over a location, the globe spins to that location. When they roll out, the globe spins back to a static starting point.
I wanted the animation of the globe to be as smooth as possible, so, I have a }else{ statement for every possible frame. IE - if the globe animation is rotating back from a position and the user mouses over a new location before the animation stops, it doesn't jump back to the starting static position, it seemlessly flows from the position it is currently at to the new position the user has moused over.
Make sense?
It works flawlessly as is. I've spent quite a bit of time testing it. However, the code is bulky in appearance and according to the size report bulky in bytes as well.
Is there a differnent way to set this up to cut down on size - mainly byte size if possible?
I will include a bit of code so you can see what I'm talking about:
on (rollOver) {
if (_root.EarthClip._currentframe == 1) {
_root.EarthClip.gotoAndPlay(140);
} else { if (_root.EarthClip._currentframe == 160) {
_root.EarthClip.gotoAndPlay(156);
} else { if (_root.EarthClip._currentframe == 161) {
_root.EarthClip.gotoAndPlay(155);
} else { if (_root.EarthClip._currentframe == 161) {
_root.EarthClip.gotoAndPlay(154);
} else { if (_root.EarthClip._currentframe == 163) {
_root.EarthClip.gotoAndPlay(153);
and so on, and so on . . .
Any help would be greatly appreciated.
Thank you in advance.
-MShetler
Cleaner, Crisper Text
can anyone explain how to get cleaner, crisper text in FlashMX. Thank you.
LoriSchlitz
Cleaner 6 Or Sorenson Squeeze?
hi
I have cleaner 6, but a friend says sorenson squeeze it a better compressor for use of video in flash. Shoul i get a copy? or will cleaner suffice??
Techniques To A Cleaner Program
Hi, Im not an expert in flash, but I do on occasion help some buddies out if they want a menu or something on their webpage. When I am making these files, it seems like my organization and technique is sloppy. Any comments / suggestions / flames are welcome on how I could better organize this and other projects in the future.
~Thanks
Link to File:
http://www.geocities.com/matteoelbow/SR_Menu1.fla
Link to movie:
http://www.geocities.com/matteoelbow/SR_Menu1.swf
[CS3] Help Need A Cleaner Way To Write This Array Of Buttons
Hi there,
not sure how difficult this is going to be, but I have 30 movie clips, which will all be sequentially numbered. (pos1, pos2, pos3......pos30).
They will all have the same functions, with the only change being the number.
I know there is a more efficient way to write this code using arrays, but I will need help with it. I would rather have 10 lines of code than 150.
I also need help with writing the code, that will disable all other movie clips, once the first one is clicked.
Also, not sure how tricky the javascript part will be.
Below is the code i am trying to achieve, but the long version.
PHP Code:
pos1.onRelease=function(){
this.gotoAndStop("selected");
getURL("Javascript:JSposition('',1)");
(all other buttons).enabled = false;
}
pos2.onRelease=function(){
this.gotoAndStop("selected");
getURL("Javascript:JSposition('',2)");
(all other buttons).enabled = false;
}
pos3.onRelease=function(){
this.gotoAndStop("selected");
getURL("Javascript:JSposition('',3)");
(all other buttons).enabled = false;
}
pos4.onRelease=function(){
this.gotoAndStop("selected");
getURL("Javascript:JSposition('',4)");
(all other buttons).enabled = false;
}
... all the way to
pos30.onRelease=function(){
this.gotoAndStop("selected");
getURL("Javascript:JSposition('',30)");
(all other buttons).enabled = false;
}
AS Guru's please help!!!
Thanks.
Quick Question For Cleaner Code
Just need some advice on how to clean this code up. I know there has got to be a way to combine the 2 movieclips....
Basically I have 4 movieClip buttons. currently only the first is working.... How would I add the other f2, f3, f4 MC's without having to write a function for each one?
Here is the code I have:
Code:
f1.addEventListener(MouseEvent.MOUSE_OVER, hoverOver);
f1.addEventListener(MouseEvent.MOUSE_OUT, hoverOut);
f2.addEventListener(MouseEvent.MOUSE_OVER, hoverOver);
f2.addEventListener(MouseEvent.MOUSE_OUT, hoverOut);
f3.addEventListener(MouseEvent.MOUSE_OVER, hoverOver);
f3.addEventListener(MouseEvent.MOUSE_OUT, hoverOut);
f4.addEventListener(MouseEvent.MOUSE_OVER, hoverOver);
f4.addEventListener(MouseEvent.MOUSE_OUT, hoverOut);
function hoverOver(event:MouseEvent):void
{
f1.gotoAndPlay(2);
}
function hoverOut(event:MouseEvent):void
{
f1.gotoAndStop(11);
}
f1.buttonMode = true;
f2.buttonMode = true;
f3.buttonMode = true;
f4.buttonMode = true;
Is This Supposed To Happend?
Does anyone know if this is supposed to happend..
I have a dynamic text box with HTML checked.. I get tags when I view the SWF in Flash Player.. however this is not true when viewed through a browser or when the movie is tested from the "builder"..
_function Not Doing What It's Supposed To
I've been tring to adapt an email form tutorial to my own needs;
http://www.flashkit.com/tutorials/Dy...-658/index.php
For some unknown reason to me, I can't make more functions in the functions layer work. I want to make all fields required to be filled in. It works with 2 functions, but when I put a third one, it doesn't recognize it. In this .fla i've created a function (function layer) named ckPhone() which doesn't work.
Please help cause this is driving me nuts.
Jantunes
I'm Supposed To Spend $700?
Hello,
I'm on vacation for the holidays. Yesterday I played a really fun flash game called Hapland 2. Anyway, I already know how to program so I thought I would spend my vacation learning how to make a game like that.
I figured I would just need to learn a new scripting language and find an editor/compiler somewhere... was I wrong? All I see for development is a $700 flash 8 package from macromedia. Is this really what I'm supposed to buy just to play around on my vacation? I've never done anything web-based so I have no idea.
Please help me out if there are any alternatives. I see a $300 "academic license" package but that's still $300 and I have no idea what an "academic license" entails. I can't believe the only people out there with access to play with flash are professionals, students and people with parrots on their shoulders.
My Butto Wont Come Out To Where Its Supposed To Be
on my menu sytem when you rollover the dot four dots are supposed to come out and then the center dot is suppose to be a button for home and the center button you have to try to find the text. whats wrong i just want the dot to come out so it can be used for navigation.
Tween Doesn't Look Like It Supposed To Be
please check out:
pixelranger.com, then portfolio...
if you move over the different option, this very small, but neat tween appears, a rectangle , in which a pie-peace get cut out of,
i did the tween myself, but it just doesn't look at smooth as this one...., even if i use shape-hints for every corner... nothing...
can somebody tell me how they make it so smooth....?
greetz
melvin
Addition Is Supposed To Be Easy...
Problem: When I add two dynamic numbers they are joined rather than added (1+3 = 13). See below for more detail.
As an experiment I've been writing some code to construct musical scales based on a template. The template is an array of numbers. The following function is intended to construct the scale using a starting note in numerical form(rN) and the template(scale). A third index array (chromatic) is used to return the actual notes:
code:
function buildScale(rN, scale){
outputScale=[];
outputScale.push(chromatic[rN]);
for(i in scale){
rN+= scale[i];
outputScale.push(chromatic[rN]);
}
}
What seems to happen is when i add to rN (in order to find the next note in the scale) the two numbers are joined so 3+1 becomes 31 and i eventualy end up with an 8 digit number.
I guess this is something to do with extracting the numbers dynamically, but i'm stumped for a solution.
Variables Incrementing By More Than Supposed To?
Hi,
Ive run into a problem with some variables im using ok so in my game im developing as the player collects the balls the score variable increments by one (scores original value is set to 0) ok so on my first try i had the code as:
Code:
_root.score = _root.score + 1
This did not work and incremented by too much each time so on the first counter it became 1 then jumped to 3 rather than 2?.
Ok so i then tried just += 1 as below:
Code:
_root.score += 1
And this again incremented by too many?
How can i stop this from happening as i only want it to increment by 1 for each counter not like is has been doing 2?
If Loop Running Even Though Its Not Supposed To...
I have a variable "sceneCount" that tells the code what scene the movie is at. it starts at 1 for scene 1. When you click the next button it runs a function that looks at "sceneCount" and determines which scene should loaded next. Here is the bare bones coding for that...
Code:
function nextClick(event:MouseEvent) :void {
infoBox_mc.textBox_txt.text = "";
trace(sceneCount);
if (sceneCount == 1) {
scene2();
}
if (sceneCount == 2) {
scene3();
}
}
when the next button is first clicked, the sceneCount = 1, so it should run function scene2(). This works, but it also loads function scene3()...Any idea why?
DataGrid Popping Up Where It's Not Supposed To
I have a flash document with several scenes, and in one of the scenes I have 2 DataGrids that I've written in with code. Once I go to this scene and then go to another scene, the DataGrid floats over the text of the other scenes! Any thoughts on how to prevent this?
Publish Preview Is NOT What Is Supposed To Be .....
Sorry all I am very new to this and very frustrated...
I have tried to create a simple movie that rolls/fades
the letters in and then they should blow apart...
I see what I intend within flash on the workspace...
but when I preview and or publish it doesn't work correctly...
argggggg..
Any help is appreciated ....
I have attached a copy of the file
thanks
Echo4Bravo
Buttons/links...is It Supposed To Look Like That?
well, my project is not done. i have been working pretty hard @ it, and i (well actually it was lostinbeta, lol) have come across something that now bothers me. are those links supposed to look like that? im going with...no! i dont know how to fix them. i found the one topic about this, but it really didn't help me much. i tried editing the different states, but it looks the same to me. anyways, all help is appreciated!
Animation Not Playing When It's Supposed To... :(
http://www.matthewcorway.com/interface.fla
I'm working with this file, I've so far gotten my interface top to work how I want it to but I can't get the little man to animate when someone mouses over a button.
If you press the LEFT or RIGHT arrows he will animate properly but if instead you use your mouse and go over a button. It will assign a variable a direction and then it is supposed to tell the man to animate but it doesn't work.
Can anyone please give me a hand and tell me how to fix this? If I have to code something else to at least get him to animate while he is moving then so be it, I don't mind as long as it works in the end.
Thanks,
Publish Preview Is NOT What Is Supposed To Be .....
Sorry all I am very new to this and very frustrated...
I have tried to create a simple movie that rolls/fades
the letters in and then they should blow apart...
I see what I intend within flash on the workspace...
but when I preview and or publish it doesn't work correctly...
argggggg..
Any help is appreciated ....
I have attached a copy of the file
thanks
Echo4Bravo
Animation Not Playing When It's Supposed To... :(
http://www.matthewcorway.com/interface.fla
I'm working with this file, I've so far gotten my interface top to work how I want it to but I can't get the little man to animate when someone mouses over a button.
If you press the LEFT or RIGHT arrows he will animate properly but if instead you use your mouse and go over a button. It will assign a variable a direction and then it is supposed to tell the man to animate but it doesn't work.
Can anyone please give me a hand and tell me how to fix this? If I have to code something else to at least get him to animate while he is moving then so be it, I don't mind as long as it works in the end.
Thanks,
Big Ass Button Supposed To Be Small
hey.
i got a few buttons lined up in a row.
the first one, using a different font color, appears bigger than the rest.
not as big as an ass, but a pixel or two. this happens at different zoom levels. at maximum and the ones following that, it's ok. but when coming to normal size, it appears out of porportion. at small size, it's intact again.
this bad button has exactly the same size as the rest. which is why i don't get it; why it gotta act like this?
thanks!
How The Heck Am I Supposed To Use SET MASK?
I need help.
I've tried, but don't understand set mask.
Is this true? It is a way to make one movie clip, mask another movie clip?
Do they have to be on the same layer? Can they be different layers?
I can't get the code to work.
It doesn't even appear that I have the option to select two seperate movie clips. It just gives me the parameter to fill in one clip.
What gives?
Thanks.
Scripting A Button From One Movie To A Labeled Frame Of Another Movie (it's Scene 2)
Hello, I have researched this issue in this forum for days now and although what I have found, including the suggested tuturials, have helped me alot, I am still trying to make this work. The last script I attempted was this:
on (release) {
_level0.gotoAndPlay("Carlos_Portfolio_2005.swf_fra me_label1");
}
which didn't do anything. Not even an error... Before this script I tried this:
on (release) {
loadMovieNum("Carlos_Portfolio_2005.swf", 0);
_root.gotoAndPlay("label1");
}
but got this error:
Error opening URL "file:///Macintosh%20HD/Users/carlosguerra/Documents/My%20Art/flash%20pages%20for%20portfolio/Carlos_Portfolio_2005.swf"
The button itself, that I am scripting from, is named: return_button in the original movie.
I would appreciate any help!
Problem With Images Mutating When The Are Not Supposed To.
I have noticed that whenever I put a motion behind and image ....like a moving ball to create a moving glow. The image shifts, morps, or nudges when the motion occurs. This has happened in more than one file. Can any one tell me what can be done to prevent this form happening.
TIA
Button Plays Animation When Not Supposed To Help
Hi,
When a scene first loads up, my button plays its roll OFF animation even if i dont scroll of with the mouse curser. any one hit me with some code to stop this from happening?
check it out at
www.hfchose.tk
(Click the button in the button right corner to miss out the intro sequence and go straight to the site with the button)
fanks very much!!
Am I Supposed To Be Able To Use Arrays In The VAR Box Of Dynamic Text?
Basically, I want to have a table of names, in an array, so I can sort them.
I set some dynamic text, and in their "Var" box in properties, I try to refer to the array. This does not work, and it only works when I have the "Var" property as regular variable names.
For example:
My array would be called "names". So in the Var box, I'd put "names[0]" in an effort to display the name in that position in the array. This does not work. Nothing gets displayed in the dynamic textboxes.
Using a regular variable "name0", I can get the name to appear. This works. But I do not want to do it this way, mainly because I don't want to have to transcribe each separate name in the list in my array into its own String variable. It would be a real mess, and it would be a lot cleaner just to have one array for everything.
Why are these dynamic textboxes being so stubborn? What can I do about this?
Checkbox Is Supposed To Activate Button
Hi board,
what could be the reason why my checkbox doesn't activate the button?
ActionScript Code:
var btTerms:Button;
function addNextSectionButton():Void {
// ---------------- <create button to go to the "terms section"> -----------------------\
btTerms = _global.mcCard.createClassObject(Button, "btTerms", 10);
this.onEnterFrame = function() {
delete this.onEnterFrame;
btTerms.label = "Enter your contact details.";
btTerms.enabled = false;
btTerms._width = 270;
btTerms._x = 370; //(_global.mcCard._width - _global.mcCard.btTerms._width)-5;
btTerms._y = 341; //(_global.mcCard._height - _global.mcCard.btTerms._height)-5;
// Event Handler for Terms
btTerms.onRelease = function() {
_global.mcCard.destroyObject("btTerms");
_global.mcCard.gotoAndStop('form');
};
// ---------------- </create button to go to the next section> ------------------------- \
};
}
function addTermCheckBox():Void {
cbTestTerms = _global.mcCard.createClassObject(mx.controls.CheckBox, "cbTestTerms", this.getNextHighestDepth());
cbTestTerms.selected = false;
cbTestTerms._x = 370;
cbTestTerms._y = 320;
tfAcceptTerms = _global.mcCard.createTextField("tfAcceptTerms", 100, 385, 315, 300, 30);
tfAcceptTerms.htmlText = "I agree to the terms and conditions.";
}
// Create handler for checkBox event.
function checkboxHandler(evt_obj:Object):Void {
btTerms.enabled = evt_obj.target.selected;
}
cbTestTerms.addEventListener("click", checkboxHandler);
These Buttons Aren't SUPPOSED To Toggle
Hi there!
I could use some help...
the link: http://www.mc2ads.com/chapelhillshow
&
click "view show"
Only the first button (JCPenney - Women) is active. Once you click on that link, some thumbnails load at the button of the picture. If you click on one of them, it swaps out the picture (actually it takes you to a labelled frame that has the different picture). Problem is, that if you click the same thumbnail again instead of just going to the same spot, it goes the the next labelled frame. So it shows you a different picture instead of the one it is supposed to show.
The actions on the buttons read:
on (release) {
_root.mainpicholder.gotoAndPlay("jcW");
}
and there is a stop action at each of the labeled frames.
Any idea why this is being goofy??
Thanks!
SOMEBODY HELP, ITS SUPPOSED TO WORK, BUT IT DOESNT _root.target Help
Hi, thanks for looking at my thread and helping me
i got this actionscript to do this after posting a previous message requiring help with that.:
this is the script for the button 'New'
on(release) {
_root.target="sceneB";
_root.play();
}
the timeline is stopped, and when this button is pressed then it will play to the last frame in the scene where there is this actionscript:
gotoAndplay(_root.target);
it then goes to the scene for 'new' and to the frame which is labelled 'sceneB'
i have many buttons all corresponding to their own scenes, with similar scripts.
This script works fine in the first scene, but in the target scene, if i click on another button to go to a different scene then it does not work properely, but instead the buttons have this effect:
the 'home' button which should return to the first scene restarts the current scene.
all the other buttons which should go to different scenes, just go to the first scene, 'home' (frame label 'sceneA').
i do not understand why this is happening as the script in all the scenes are th same.
Small Script, Supposed To Be Easy I Guess...
I'm using Flash 8, this small script isn't working. I don't know what's wrong.
I have 4 MC's on the stage called mc_1, mc_2, mc_3 and mc_4.
They should move when clicked.
Code:
var mcArray:Array = new Array();
mcArray.push(this.mc_1);
mcArray.push(this.mc_2);
mcArray.push(this.mc_3);
mcArray.push(this.mc_4);
var endY:Number = 400;
for (var i:Number = 0; i < mcArray.length; ++i) {
trace (mcArray[i]);
mcArray[i].onRelease = function() {
mcArray[i]._y += (endY - mcArray[i]._y)/3;
trace(i + " " + mcArray[i]);
}
}
The TRACE always returns "4" for the variable i, no matter what mc I click on. It should just return 0,1,2 or 3, depending on the mc the user clicked on.
Also, the TRACE returns undefined for mcArray[i]. That should return the name of the MC the user clicked on.
Any idea what's wrong?
[F8] Button Not Working - Supposed To Go To Specific Frame
This issue is driving me mad - can someone PLEASE help me out???
Here is the issue, I have a button in frame 1, that when pressed should go to frame 2, but it doesnt. I think I coded it right, but I cant figure this out. I have attached the fla so could someone please let me know how I fudged this up??? The button I refer to is "music" in frame 1
Here is the fla:
http://www.yousendit.com/download/b...TeFVOMUEwTVE9PQ
Movieclip Supposed To Update MySQL Database
hi,
i am having a flash file that shows an advertisment.
Each time 2 products are visible, along with their respective image and price.
To mainain the add i have connected it with a mySQL database via PHP.
each product has its own row, identified by id=1 or id=2.
Everything works fine, exept for the fact that i seem unable to update the second product. (only the second, the first works fine!)
to update the add i have created a little form inside an mc. the data for the second product is filled into the form correctly, but when i press enter it does not update the mySQL.
I really do not understand this, since it is the same for both products, except for the id.
But why does this not work? i have checked the id's and they are correct.
Honestly i do not understand this, please help!
thanks!
Looping Functions That Aren't Supposed To Loop
I have run into this more than once and have never solved it. I can't be the only one. I have a number of functions in a script (over 600 line) and the one I just added, for some reason loops through itself about 1 and 1/2 times. The other times I have had this same issue, they did the exact same thing, looped about 1 and 1/2 time then just stopped. When it reaches the end, it just cycles back to the top and plays again.
I placed traces after just about every line in an effort to see what it causing it. I can "watch" it play - via the trace outputs - but can't see any reason for it. Is there a way to put something like a "stop();" at the end of a script or something?
This is very problematic, as you can well imagine!
Has anyone else experienced this and how do I troubleshoot it!
For Dynamic Text, Are Arrays Supposed To Be Usable In The Var Box Of Properties?
I can't get it to work, unless I'm simply constructing my arrays wrong.
What is the case here?
Basically, none of the text is appearing in my Dynamic Textbox. I've embedded the necessary glyphs.
I also have the text nested in stuff, which I've taken care of already in the Var box. Also, the object that the text is nested in is rotating. I read in a few topics that rotating dynamic text makes it disappear on people. Is this true?
|