A newb question

  • riefu
  • Born
  • Born
  • riefu
  • Posts: 3

Post 3+ Months Ago

I m trying to make a menu and i got some nice effects from another source and when i right click my movie clip ang go to action and write
on (release) {
getURL("index.php...");
}
the animation stops playing and its like a normal buton with no animation
what can i do to solve this

Thanks!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • montyt
  • Proficient
  • Proficient
  • User avatar
  • Posts: 275

Post 3+ Months Ago

try this
Code: [ Select ]
on (release) {

getURL("index.php","_self");

}
  1. on (release) {
  2. getURL("index.php","_self");
  3. }
  • classified
  • Expert
  • Expert
  • User avatar
  • Posts: 540
  • Loc: Bahrain

Post 3+ Months Ago

hmmm
you cannot assign that to movieclips as far as i know ... only buttons instance are allowed to be coded that way ..

give your movie clip an instance name like "animation_mc" then in the actions layer type in :

Code: [ Select ]
animation_mc.onRelease = function() {
       getURL("index.php","_blank");
}

      
  1. animation_mc.onRelease = function() {
  2.        getURL("index.php","_blank");
  3. }
  4.       


should work ok .
  • riefu
  • Born
  • Born
  • riefu
  • Posts: 3

Post 3+ Months Ago

tks for the reply but it dident work (maybe because of me :) ) ... Anyway i think here it is the problem >>>>
_global.active = PageNum;
_global.subActive = subNum;
_global.over = active;

numOfMenu = 10;
for (i = 1; i <= numOfMenu; i++)
{
this[i].bg.onRollOver = function ()
{
_global.over = this._parent._name;
this._parent.swapDepths(1);
};
this[i].bg.onRollOut = this[i].bg.onDragOut = function ()
{
_global.over = active;
};
this[i].bg.onRelease = function ()
{
getURL(link[this._parent._name], frame[this._parent._name]);
};
this[i].onEnterFrame = function ()
{
var _loc1 = this;
if (over == _loc1._name)
{
_loc1.direction = "next";
_loc1.nextFrame();
return;
} // end if
_loc1.direction = "prev";
_loc1.prevFrame();
_loc1.prevFrame();
};
} // end of for
<<< this is in the main lair and withouth this the other movieclips dont work
And i think here i need to modif something.... in this main lair i have about movieclips that i whant to put links to them :D tks i hope you'll understand something from this
  • classified
  • Expert
  • Expert
  • User avatar
  • Posts: 540
  • Loc: Bahrain

Post 3+ Months Ago

:s

Quote:
this[i]


refers to the current target/timeline you are writing the code in and i don't think this is applicable ..

so im still not sure of what r u trying to do here mate ...
  • Belk Media Group
  • Graphic Monk
  • Professor
  • User avatar
  • Posts: 778
  • Loc: In the heart of California, Fresno.

Post 3+ Months Ago

Im not sure what you are saying either. But I think you want a movie clip to play on release of a button?
Try this: Create a button and use this
Code: [ Select ]
on (release) {
MC.gotoAndPlay(1);
}
  1. on (release) {
  2. MC.gotoAndPlay(1);
  3. }
  • riefu
  • Born
  • Born
  • riefu
  • Posts: 3

Post 3+ Months Ago

sry i dident explain my self well but the this i whant is to make a banner with a menu items to some php pages an the problem is lieke this ...>
i have some nice effects got from other fla they are movie clips ... what this movie clips does is .. when you put the mouse on them they do a flashy animation and i whant to put on them a link (make them like a button).. i used this comand witch i used it in other menus]
on (release) {
getURL("index.php...");

} .. i put this comand by rightcliking a movie clip (the thing that is a whanna bee button :) ) and click on action and write there this CODE (ps: there was no other code there .... the code that make them react on mouse on is the long one above tha is played on the first key from my main layer where you cna find all movie clips) ..... after i write the
on (release) {
getURL("index.php...");

}
code when i place the mouse over the moviec clip its not playing the effect anymore just stas still like a 2d picture ..

I hope you'll understand me now :D


***If you really dont udnerstand me cand anyone take my fla and take a look at it il post a link if you whant it ***
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

yes i understood what you want.
I think the problem comes from nested movies.
There is a holder movieclip (let's say mcHolder) which contain another movieclip, the one with fx (let's say mcFX).
In their code, they have onRollOver for mcFX, so when u rollover it, it starts animation.
If you add any of the onPress, onRelease, onRollOver or onRollout on mcHolder, then all these methods assigned to mcFX will stop working,
since a nested movieclip will not receive these messages anymore if his parent traps them before.
Therefor you need to assign the onRelease method to mcFX in order to work.

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 11 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.