set _x and _y for loadMovie and "STATE BUTTONS"

  • mvotre
  • Novice
  • Novice
  • mvotre
  • Posts: 21

Post 3+ Months Ago

hey dudes. soryy for tyhe HUGE amount of questions!!!!
they hopefully will end soon :wink: :wink:

i was building my ofiice site after lostinbeta instructions, and in a moment i think to myself: " i got a site wich will open 12 ilustrations. (in the first idea, in 12 frames). so why i just dont make it with 1 frame??"
actually, i can make the movieclip load with no problem, but how i set the _x and _y properties without a target MC?? if i need a target MC i will need one MC for each image, right??
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

your target movieclip is the movieclip symbol you load the movie to. So let's say you are loading the movie to a clip called "container", then you would target it as container._x or container._y.

And yes, you will need one MC for each image... since you can only load one movie to one clip (otherwise the previous movie loaded gets overwritten). You can do it via actionscript with duplicateMovieClip() though... check that out in the ActionScript Reference in Flash :)
  • mvotre
  • Novice
  • Novice
  • mvotre
  • Posts: 21

Post 3+ Months Ago

thanks, but i found another way (stupid way) that works:
in the first and only frame of my animation, i put a target movie clip. then i load the first image in it. in the second ilustration, i just change the position and width/height of the MC, load the image in it and ....... surprise !!! it works!!!
i still have to test a lot to find the right place, but whatever.
  • mvotre
  • Novice
  • Novice
  • mvotre
  • Posts: 21

Post 3+ Months Ago

sorry for asking some stupid questions, but the books i got really sucks!!

i need to press a button and a actionscript animation plays. but when i press the button, it plays just the first "frame" of my animation. if i press it a second time, it goes to the second "frame", and so on.

how can i code so when the button is released, the animation goes all the way???

i got this at the first frame:
function claro(){quadrin._alpha-=10;}
stop();

and in the button:
on(release){claro();}

(edited) so i thinked a loop could do the job and tried this:

function claro(){while(quadrin._alpha>0){quadrin._alpha-=10}}

but when i releas the button, the Mc goes to _alpha=0 in a single step...
  • mvotre
  • Novice
  • Novice
  • mvotre
  • Posts: 21

Post 3+ Months Ago

ahhaaaa!! i did it!! and found a new problem :D
but if someone could show me a better way, i will be glad

on the button i have this:

on(release) {_root.ze=1}

and in the MC :
onClipEvent (enterFrame){if(_root.ze==1)
{if(this._alpha>0){this._alpha-=10;}
else if (this._alpha<=0){_parent.gotoAndStop(2)}}}

pretty !!!! now i need to transform a white object in a orange object at steps (you can see the color changing) how im suposed to do it???
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Given your knowledge of Actionscript as it is, I say tween it. You will most likely overload yourself trying to figure out the setTransform() method of fading colors together because it is quite advanced.
  • mvotre
  • Novice
  • Novice
  • mvotre
  • Posts: 21

Post 3+ Months Ago

i dont know how this stuff is called. but i need to solve this kind of problem :

you got 3 buttons. the first time you click a button (any), it executes a gotoAndPlay and you see a animation. the second time you play a button (any), it executes a gotoAndStop, and just dont show the animation.

i think this could be done just giving a value when a button is clicked,

on(release) {ze=1;}

and then use if else if in the button:

on(release){if (ze==0){gotoAndPlay(10)}
else if (ze==1){gotoAndStop(2)}}

in the first frame i got just ze=0;

but guess what??? it dont works. anyone knows how to solve this???

PS: and also someone can link me to sites with great actionscript tutorials and .fla stuff, so i dont need to bother you so fast
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

It should work... I see nothing wrong on the coding side of it.... unless it is a targetting issue. Are you using button symbols as buttons, or movieclip symbols as buttons? If you are using button symbols as buttons, are they in the same timeline as the ze variable on the frame?

Good tutorials/open source fla sites....

http://www.kirupa.com (my favorite)
http://www.flashkit.com
http://www.actionscript.org

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 10 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.