ActionScript 2.0 :: [MX2004] Can't Get The SubItems To Work With The OnRelease Function
Feb 12, 2004I'm attaching my new xml menu .The problem is that I can't get the subItems to work with the onRelease function.
View 1 RepliesI'm attaching my new xml menu .The problem is that I can't get the subItems to work with the onRelease function.
View 1 RepliesThe problem is that I can't get the subItems to work with the onRelease function.
View 1 RepliesDo I have to use a listener in order to make the onRelease function work? Right now it doesn't and I think it's because the png isn't loaded before the onRelease function is invoked.[code]
View 3 RepliesI can't seem to get th CV.swf to unload when I press the back button. The Home.swf loads ok. Anyone got any ideia why? And how may I solve this issue?
Here the codeit's on a frame on the time line of the CV.swf file, the Home.swf file is the starting point and has a similar code but no unload is needed).
[Code]...
Okay I have some files built in MX that use this on the main timleine:
Code:
function textLoad(filename) {
loadText = new LoadVars();
[code].....
Still creating the menu I ran into this problem with getURL.I've tried a lot of things, but it still won't go to the URL.Here's my AS code.I marked out where the getURL is.
[AS]
// Create xml-object
menuXml = new XML();
[code]......
I'm trying to use the print function in a button, a.s. below:
on(press){
print(_root.instance_1, "bframe");
}
This works fine...the mc "instance_1" is the only thing that prints. The problem is that I need to print 2 movieclips at once. So I have tried the following:
on(press){
print(_root.instance_1+_root.instance_2, "bframe");
}
on(press){
[code]....
None of these work though, the entire movie prints instead.
I'm using duplicateMovieClip to create instances of a clip. Then I use an array to name the clips. In the scrip that duplicates and names them, I also have an onRelease function to make the mcs do something when you click them. I can't get this onRelease part to work. I need to:[code]
- swap the depths
- load some text
- attach a movie from the library
I have a mc that you should drag to the right mc.The mc that you have to choose from are sometimes a little close so I made a code that the mc that you drag will xscale so it will be smaller.But then if I press on the end of the mc before dragging the mc is outside the mouse and you cant use the OnRelease code.How to avoid that.Enclose a small fla, and the code is:
function god ( t,t1,t2){
t.onPress = function(){
this._xscale = 20;[code].......
I need a rollover function and so I changed onRelease to onRollover but the rollover effect then doesn't work.
- Script is on seperate layer (on root)
- hit_mc is the movie clip on which the rollover should work
- mask_mc is the one that should tween when mouse goes over hit_mc
hit_mc.onRollover = function() {
tweenBall(mx.transitions.easing.Regular.easeOut);
};
[Code]....
I'm using duplicateMovieClip to create instances of a clip. Then I use an array to name the clips. In the scrip that duplicates and names them, I also have an onRelease function to make the mcs do something when you click them. I can't get this onRelease part to work.
I need to:
- swap the depths
- load some text
- attach a movie from the library
I can't see any errors with my script, so I hope someone can look at it and give me a clue. The part I'm having trouble with is:
[Code]....
I need help with onRelease after using loadMovieClip function. onRelease doesn't work on duplicateMovieClip. The code:function buildGallery (page Position)[code]
View 2 Replies I am designing and coding a navigation menu at the moment, and so far I have got the button instances to duplicate for each of the menu items, and set widths, positioning values and RollOver/RollOut functions. However, I would ideally like to include the onRelease button functions in the for loop too - as they are all the same apart from the variable "i". Here is the code snippet:
ActionScript Code:
for (i=1;i<(_root.noofmenuitems+1);i++){
duplicateMovieClip("mc", "mc"+i, i);
[code]...
Now my problem is that by the time the onRelease function is called, the for loop has been completed and the value of i returned is the last i value from the loop (_root.noofmenuitems+1). The this["mc"+i] part obviously works, because the trace function is called when I click any of the menu items.The problem is that I have 6 menu items, and when I click any of them, the trace function returns "test 7" - not the corresponding i values for each button.
I need the following script to run as soon the as the play head comes on the frame. Right now it is activated through an onRelease...need to replace that:
myButton_btn.onRelease = function() {
tweenBall(mx.transitions.easing.Strong.easeOut);
};
function tweenBall(easeType) {
[Code].....
im trying to make this code below as modular as possible. I would like to edit in only one place if possible, as opposed to every button.
Code:
onClipEvent (mouseUp) {
this.onRelease = function() {
_parent._parent.bg_pic_linkage = "im6";
[Code].....
take a look at my code. It only displays a square.
Code:
testClass = new Object();
testClass.childClass = new Object();
[code].....
a look/correct the attached file of why the onRelase function cannot triggered the loadImages function.
View 1 Replieswhy this doesn't work:
Code:
listContainer.next.onRelease = advance(1);
listContainer.prev.onRelease = advance(-1);
function advance(d)
[code]....
I know I can reference a function onRelease without any parameters no problem, but what if I want to pass a parameter to the function?
I need the following script to run as soon the as the play head comes on the frame. Right now it is activated through an onRelease...need to replace that:
[Code]...
i have a movieclip on the main timeline, and inside that mc I have 1 button on first frame and 1 button of second frame...From the main timeline i run this script for frame 1 button...
publisering2.avpubliser_btn.onRelease = function(){
publisering2.gotoAndStop(2);
}
And this works fine.. however, i run the exact same script for the button on frame 2, ofcourse changing the path and gotoAndStop(1) instead... And this isnt working.. The button's over frame works so its activated...
Just getting up to speed on looping and incrementing variables. A real time saver.I have a onRelease function that I would like to apply to several button objects:
phase1a.but1.onRelease = function() {
p=0;
thisImage();
}
I need the p variable as well as the target but1 to increment. This is my first attempt:
for (n=1; n<=23; n++) {
phase1a.but[n].onRelease = function() {
p=[n+1];[code].......
I get a good trace on n showing that the incrementing is successful but nothing on p when the button is clicked and no execution of the function thisImage(). Not getting any errors either. Can you not loop an onRelease statement?
I am working in CS4, but using as2 as the publish setting since the swf I need to load in was previously done in as2.I have an interface that I am loading a logo.swf into. This logo has animation that works properly both in test and in the browser. There is, however, a function in the logo.swf that is not working.
this.onRelease = function() {
getURL("http://www.yourdomainhere.com");
}
When I test with the IDE this is clickable within the interface, but when I view via the webpage it is not. AllowScriptAccess was set to sameDomain, but I have also tried that set to always.
Is there any way to pass parameters to mc.onRelease?
View 5 RepliesI can't get my getURL to work. It works when I use "_blank" but not when I use "_self" or "_parent" or "_top" or leave it empty. I've got it right off the main timeline. I've also tried putting it within an onRelease function.
So, this doesn't work:
Code:
getURL("images/aboutus.jpg", "_self");
But this does:
Code:
getURL("images/aboutus.jpg", "_blank");
Strangely enough I can't access the variable i in the onRelease function below. I guess it must have something to do with the position where I declared it. But I also tried to declare it outside of the functions but it didn't work either.. how to solve this problem?
[Code]...
I have the following code that lists 5 buttons with dynamic texts... when pressing each button a popUp_mc window will appear with some content show in dynamic text. Only one of these 5 buttons have some images that will have symbols_mc appear... in this case I just alpha this symbol to 100 only for this button, but for the rest alpha = 0. The button the I want to show the symbol is the third one. I'm a bit confused on how to show this symbol according to the following code below.
[Code]....
mc.onRelease = function(){
//Do something
}
I have this function on "mc".And I would like to call the function on ''mc" without clicking on "mc". How can I create the state where this "mc" is being pressed by script on a frame or another button?
I have some script for a sliding gallery and buttons to move the images. how to change the function from onPress to onRelease so I can animate the button.
this.onEnterFrame = function(){
if(rewind == true && counter > 0){
counter = counter - 1;
[Code]....
I'm trying to display thumbnails with a for loop but i would like that each thumbnail have an onrelease action.
here is my scriptnote: i use trace() for look if my loop works aswith the onrelease function)
HTML Code:
var posX = 163;//1st position
var posY = 103;//1st position
var Dec = 0;// var for the space between thumbnails set to 0
[Code].,...
I have another question about my For loop. I am designing and coding a navigation menu at the moment, and so far I have got the button instances to duplicate for each of the menu items, and set widths, positioning values and RollOver/RollOut functions. However, I would ideally like to include the onRelease button functions in the for loop too - as they are all the same apart from the variable "i". Here is the code snippet:
[Code]...