Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




What Is The Correct Event For This Situation?



Hello Folks,

So i've come up with a problem, I can't find the correct event class for the following:

I have 2 objects on stage and i want an event fired when one object is dragged over the other object. How ever, I can't find the proper event to make this happen.

Anyone have any ideas?



ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 03-11-2008, 03:49 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

What Is The Most Correct Way To Delete An Event?
i have an eventfor exa,ple like : onEnterFrame
what is and why is the best way to d delete it ?:
delete mc.onEnterFrame
OR
mc.onEnterFrame=null
OR
mc.onEnterFrame=""

thnaks in advance
peleg

Same Situation
Can u send me an email or can one of u guys forward it to me? lordhyphen@hotmail.com

I've Got An Odd Situation..
Ok I'm new to the flash business (well not really new but I haven't used it in three years so therefore I consider myself new again)..http://www.otakuvillage.com/flash/otakuvillageconstruction.html

now when I uploaded this into the server, it always loads halfway and then it stops. Anybody got any ideas as to why this may be happending? Thanks for your time I hope to get back into the flash rythm again very soon.

Bad Situation
Please help! I'm 99% done with a huge flash project. Problem is, I just added all the font embeds and the file jumped from 40k to over 100k. Because of all the fonts, the preloader doesn't show up until the thing is almost fully loaded. On a slow connection it's just a white space for 30 seconds.

I'd rather not use a javascript preloader, although if someone knows of an elegant PHP solution I'd be open to that.

As it is, I have 3000 lines of code referencing _root variables and functions, sometimes not strictly pathed. I can't repath the whole code, every single function, etc., so I'm creating a holder .swf that uses loadClip to bring the large project into level0.

The problem is, I have several variables passed in the GET data that need to make it into the _root of the large project. These get destroyed as soon as the large clip is loaded into level0, and I can't figure out a way to include them. Is there any way to force loadClip to pass variables into the clip it's loading, even when it's destroying its own _root as it loads that clip?

Please help!!! Much appreciate any advice other than "you're an idiot," which I already know...

XML Situation
Hi all,

this is the first time I'm actully utlizing XML with a pix gallery. I exeprience problems when surfing the gallery in a browser, however, not when I'm just executing the swf file. The problem is that some of the pictures are not displayed correctly. Is this a common problem and can it be fixed?

Thank you,

m.

XML Situation
Hi all,

this is the first time I'm actully utlizing XML with a pix gallery. I exeprience problems when surfing the gallery in a browser, however, not when I'm just executing the swf file. The problem is that some of the pictures are not displayed correctly. Is this a common problem and can it be fixed?

Thank you,

m.

Button Situation
How in the world.......
Do you create Button animation upon mouseover type of thing....
But... I don't want just a simple animation like it pushes down....... I want like something swirling around it?...
Do i do a new layer?
or what...
Any help appreciated...

Username/Welcome Situation
I need a username to be entered into a box field...
and then have it go to a screen that says the name of w/e they typed in.... I know how to make it get to the screen.... But i cant seem to get the name they typed to pop up...
I'm tryin to use something to the effect of...
set variable...
userwelcome == "UserInput"
but it seems to only write: "UserInput" on the "welcome screen"
Help....
pls...

Rollover Situation
on (rollOver) {
_root.textfield.t="1";
}

What I'm trying to do is, when the mouse passe one picture it apears a number in a textfield.
This must be simple to do i guess but i'm LOST anywhere and i dont where...

This exemple someone(thanks for trying to help me) give to me i lost in the variable "t".

Why i always stuck in easy things

Best Regards

Keys Situation
I am working on a WBT presentation. The whole project is designed in flash and embeded in HTML file.

As per standards, all the slides are loaded behind the template and each operation is well defined by a shortkey (keypress),


SITUATION : The template is equipped with all navigation buttons and fully functionable shortkeys

PROBLEM :

1) The shortkeys defined in the template i.e. the keys present inside the movieclip clip clashes with the slide loaded behind the template or another movieclip.

Can u pls guide me a way out.

2) OK.. now is there a way to make the shorcut key with double key functionality. i.e... for example shift+1 or ctrl+1

Kindly reply soon.....deadline is coming clooooooooose!!!

Loadmovie Situation
Ok...how can we load a movie on LEVEL at a particular position, i.e. a particualr x and y position. Mind u at a LEVEL.

Situation: Standards
Hi all,
Can you please guide me about the standards that prevail universally regarding a WBT or a CBT.
Standards like the filnaming conventions, the movie dimansion like for WBT is it 800*600 or otherwise??, etc.
I believe there must be some well defined parameters to go about it.
Please reply to this soon....thanks.

Situation: Guidelines
Hi all,
I've posted this on general help also...Seniors...kindly guide me...

Can you please guide me about the standards that prevail universally regarding a WBT or a CBT.
Standards like the filnaming conventions, the movie dimansion like for WBT is it 800*600 or otherwise??, etc.
I believe there must be some well defined parameters to go about it.
Please reply to this soon....thanks.

Situation: CurrentFrame
I am trying to use the following in html to get the current frame no of my main timeline of a swf file embedded inside html. It is not working....


function gettingtotal()
{
var flashMovie=getFlashMovieObject();
flashMovie.TCurrentFrame(_level0);
alert(flashMovie.TCurrentFrame(_level0);
}

Help Crosshair Situation
hey, i am tryin to make a crosshair that moves with the mouse, to do this i have made a button inside a movie clip, and made the movieclip the mouse, it seems to be workin, but a message keeps appearing,
the message is
Symbol=crosshair buttom, Layer=Layer 1, Frame=1: Line 1: Clip events are permitted only for movie clip instances
onClipEvent (enterFrame) {

could anyone help me please, or if there is an easier way to make a crosshair the info on that would be good to

thanks, fit_hunk

Please Help In A Horrible Situation.
Hi everyone, nice to meet you, first time at this forum.

well.. here's my story, in my adv. computer tech class, i was supposed to do the first 3 tutorials in flash mx (6?). I didn't think he was going to collect the files so i decided not to do the tutorials..... So yesterday, he tells us that he's not only collecting it, but he's also making us present our projects. I already have the stilleto file (from this forum thank you!), but i will need the 2nd and 3rd tutorials please. Please send any links you can.

thank you

How Can I Use The IF Command In This Situation?
this is what i want to say.


if loadmovie num 1 = true stop

else loadmovienum(1)




in other words

i have abutton , i want it so when i click on it , it loadsmovie , but if i click on it while that movie is loaded , to not reload.



thanks

Looping Situation
Basically on a frame within a movieclip i have this code:


Code:
this.onEnterFrame = function(){
if (_global.APOSITION == "1" && _global.BPOSITION == "2" && _global.CPOSITION == "3") {
gotoAndPlay ("play")


delete this.onEnterFrame;

}

}
This works fine. BUT I want to add some 'else if' statements to it. so it will look something like this:



Code:
this.onEnterFrame = function(){
if (_global.APOSITION == "1" && _global.BPOSITION == "2" && _global.CPOSITION == "3") {
gotoAndPlay ("play")

}else if (blah blah blah bla) {
then do this

delete this.onEnterFrame;

}

}
The else if doesnt work. Doesnt seem to read it. What is wrong? Is there another way around this? I just want the code to read no matter what

Help With Simple Situation :(
I've looked EVERYWHERE!
I'm using Flash MX....Ok so this is a simple example of what I'm trying to do...I have my main time line and I added a circle...I converted the circle to a movie clip...I double clicked it. In the movie clip I double clicked the same circle and converted it into a button....Ok so in the movie clip I click actions for the button that i've created and did a on release goto and stop on frame one of scene two script....I added a scene 2 to the file with a stop action in frame one....when I load up the movie and click the button it DOESN'T goto scene 2. I believe it's because I don't know how to script nested things can someone PLEEEASE help me? What is the syntax for nexted things like this????

Sound Situation - Please Help
hey guys im still pretty much a beginner to flash and im having this situation if u guys cld help me please.

Sorry if this has been mentioned before i clndt find anything related.
I have made an intro for a site using flash and now added a new layer and imported a sound file into it. Now from layer 1 to layer 5 i have a loading script. Then it starts playing normally the sound is ok . I have a skip and a replay button and when pressing skip the sound is ok, continues normally, but when pressing replay the sound continues playing and somehow another starts again so basically i have the same sound playing twice and all discoordinated. i would apreciate your help guys.

Thanks in advance

Weird Situation
Hello,
I need to be able to totally disable access to the Adobe Flash Player Settings small window accessed by right clicking on the flash while it is playing and then choosing settings from the menu displayed after the right click. This access is a security issue and that is why I need to be able to disable any kind of access to this popup. I am hoping there is a registry change I can make to do this. If anyone can point me in the right direction, I would appreciate. Flash Player 9 is the version currently installed. Thank you in advance.

An Interesting Situation With XML
Hi,

I have an XML from where my application receive data. Now, at runtime using back end tachnology, i am updating the XML file. and i want to see the changes will reflect in running application..?

I am not sure is it possible or not ?

But, still if any one can help !!

Best Menu For This Situation
I'm not sure where the best place to post this is so if a mod wants to move it please feel free!

I am trying to figure out the best menu system for this particular situation:
I will have a map of a very large region. On this map will be dots or whatever for particular locations. There will be something like 115 of them so I will have to implement some kind of zoom/pan tool. Anyway, I would like each dot location to have its own menu - sort of. I'm sure that many of the dot locations will have similar links but not all - some will have more than others, etc.

So I'd love to get some opinions on the best way to handle this. One menu? Many menus? What's possible? I'm thinking xml is a nice way to go because the files are small and fairly easy to manage but I'm open to suggestions. Also, with many menus - how would you call them to appear/disappear on rollover/rollout of the dot button?

Thanks all for any input!

Emergency PHP Situation
ok, i know nothing about PHP. so i have NO IDEA, why this could be happeneing. here goes. i have this contact form that sends off the varibles with a PHP file. it works PERfectly fine if i use my yahoo email address to send to, but when i try to make it go to my regular ISP inbox (verizon) it never shows up. even MORE importantly, it wont send to the REAL address that is for the site either. does anyone have any idea how i can fix this?

thanks so much

Php+flash Situation...
Houston we got a situation...


It's allways the same old story... everytime that i make a flash form with php, it ends up like this... i already passed lots of time trying to figure out what's wrong, but i just can't....


Can somebody see the atachments and please tell me why the heck does the form doesn't work? i'm getting kind of despaired here

Thanks very much in advance!

Complicated Mc Situation
I have this file that I found on the web and modified. It's a bunch of letters shuffling and finally settling on a word I type in the code. The whole thing is a file with actions on the main timeline which duplicates one movie, and movie clips nested inside one mc. The file works fine all by itself. However, I need to use this thing as a movie clip in another file. When I make a new mc symbol, transfer all the code to the timeline of the mc, the duplicateMovieClip does not work. All it does is to play the first mc that's placed.

I have included the fla for the original thing. Can someone tell me how to make the shuffling letter thing in this file one movieclip so I can use it in other files?

Best Menu For This Situation
I'm not sure where the best place to post this is so if a mod wants to move it please feel free!

I am trying to figure out the best menu system for this particular situation:
I will have a map of a very large region. On this map will be dots or whatever for particular locations. There will be something like 115 of them so I will have to implement some kind of zoom/pan tool. Anyway, I would like each dot location to have its own menu - sort of. I'm sure that many of the dot locations will have similar links but not all - some will have more than others, etc.

So I'd love to get some opinions on the best way to handle this. One menu? Many menus? What's possible? I'm thinking xml is a nice way to go because the files are small and fairly easy to manage but I'm open to suggestions. Also, with many menus - how would you call them to appear/disappear on rollover/rollout of the dot button?

Thanks all for any input!

In What Situation Do You Use Scene?
Have you ever use Scene in your flash?

I recently edit a fla file which partition their design into different 'scene'. At first it drove me crazy because I expect all the code/element will be in one scene, and I didn't notice there is another scene in the file.

I just wonder any good reason to use scene? I use it in flash version 4 just for preloader function, and since then I never use it again. i almost forget it's existence.

Navigation Situation
Hello.

I'm really struggling to get to grips with something that clearly should be very simple. I've got a flash nav (in an HTML page) which has one top set of links - depending on which main link is clicked, s number of sub-links appear in beneath - when these are then clicked the page goes to wherever it should but the selected link stays hi-lighted!

It sounds simple, I think it should be, but im struggling - please see the half-demo @ http://www.highersites.co.uk/devsite/thinknav.php

Only link working is portfolio, but if another is added, it displays both and the variable isnt picked up....

If anyone knows of a quick workaround I'd be so grateful. Thanks loads

Tom

[as] Movment Situation
Here is the actions for my object

ActionScript Code:
onClipEvent (load) {
    speed = 400;
    pos = -50;
}
onClipEvent (enterFrame) {
    x = pos-_x;
    _x += x/speed;
}

what this does, is takes the current possition of the object and moves it to -50 (_x). My problem is that i want this to "tween" across the screen wich it does, but at a constant speed, at the moment, its moving slow at the beginning and even slower at the end, sort of easing. but i just want it to move at a constant speed. (no easing) thanks in advance for all help.

Complex Situation With DHTML
You might well have seen gif's on peoples site that fly around or are dragable over the top of content. This is pretty easy to do with DHTML.

I need to do this with a flash movie. I can layer the flash on the top of the page and starting placement is pretty straight forward.

However the problem with moving the flash around the page out foxes me. IE doesn't interpret clicks on the flash movie.

I'm not sure the best way to go about it, 3 options spring to mind, but each has it's draw backs.

1. Layering a transparent gif on top of the flash but I can imagine running into troubles when getting the relationship between the flash movie area and the gif area.

2. Creating the flash movie the entire size of the page, then dragging the object within the flash. Probably the easiest solution, apart from if the user decides to select some of the HTML underneath and finds that they end up selecting the flash movie instead.

3. Calling JS functions from the Flash. Sounds easy but the flash movie doesn't know it's relative position on the page. Also as soon as it moves 1 pixel the flash movie will escape from the mouse down.

Any ideas?

Thanks
[Edited by Psyduck on 08-18-2001 at 07:49 AM]

FMX Scroll Bar_Link Situation
Ok here's the thing I'm having trouble on how to create links on scrollable text : So far I have created the text grouped with the scroll bar : i know how to do that much >> but I need some of the text with actions to specific links : so when i scroll down the links are still with the corresponding text!

please, please help : thanx : She ...

here is the link to show u guys what I'm talking about it's right on the main page http://www.acornmarine.com/AMwww2.html

Keypress Activation Situation
Ok...here is a situation which I donot know you all have some across or not, but I am right now facing it...kindly help solving this...

>> A flash content is published as an html.

>> Now when this html page is opened it shows the embedded flash (swf), obviously. nothing great in that.

>> In the flash I have a button which uses a keypress code, let it be anything for now.

>> Now when I view this swf file like i said as an html, this keypress does not work by default, try it. What I've to do is click on the swf with my mouse ( i donot know for what??? but think..this makes that swf file inside html active ) and then when i press the given key it works!!!!

>> So...how do we solve it???? I want to obviously avoid a mouse click before the key press.

Keypress Activation Situation
Ok...here is a situation which I donot know you all have some across or not, but I am right now facing it...kindly help solving this...

>> A flash content is published as an html.

>> Now when this html page is opened it shows the embedded flash (swf), obviously. nothing great in that.

>> In the flash I have a button which uses a keypress code, let it be anything for now.

>> Now when I view this swf file like i said as an html, this keypress does not work by default, try it. What I've to do is click on the swf with my mouse ( i donot know for what??? but think..this makes that swf file inside html active ) and then when i press the given key it works!!!!

>> So...how do we solve it???? I want to obviously avoid a mouse click before the key press.

Disabling Keypress Situation
Ok..We can disable a button by giving a disable script. with this the mouse click and the rollover hand is disabled. However, if I put a keypress on the same button it remains active!!!!

How do I deactivate the keypress too???

Situation: Html Button
Hi...a situation...

I have a swf embedded inside the html file. swf file has 10 frames. the next button is coming from html.

so the idea is the next button must be deactive till frame 9 so i cannot go ahead and skip the current slide. As soon as I reach frame 10 he next button (html) must get activated for a user to click. how do I track this.

Kindly give the complate code if anyone can....soon...I am trying my best.

Thanks in anticipation!!

Situation: System Details
How to display system details oon the user end, like the flash version, RAM etc.?

Situation: Timeline Slider
Hi,
Does any one know's or has a tutorial to create a timeline slider. For eg. a slider like a volume controller, which when dragged will move through the main movies' timeline.
Thanks...

Situation: Projector Location
Hi,..
Can we load/call a projector at a particular location i.e. a specified x and y coordinates on the screen.

The same way can make an projector open as fullscreen by giving the fullscreen command outside the projector viz, giving the script on the button thats launching the executable?????

Situation: Projectors' Dimansion
Ah...hi..

Can we make buttons in flash to resize our projector's dimension ie. width and height.

Suppose i have three buttons

1) 640*480
2) 800*600
3) 1024*768
so, now it is upto the user to click his desired view type. Thanks in anticipation!!!

Life And Death Situation ....
Hi,

a) I want to make a button inactive if pressed (on release) inside a movie clip?

b) How to stop a button from reloading a movie clip if that is already been loaded?

I’d really appreciate any help in this regard

This Situation Is Hard To Explain But....
There may be some examples of this somewhere. If anyone can just point me in the right direction, I'd appreciate it.

The tutorial on Kirupa explains how to load external swfs and transition between them:

http://www.kirupa.com/developer/mx2004/transitions.htm

Question: Say an external example1.swf loaded into a container as in the tutorial has a button within it which loads another external example2.swf. Is there anyway to transition out of example2.swf before example1.swf transitions out and plays another section?

-----joe

Masking Situation... Beginner Here
Been a while since I dipped in to flash. I am trying to do some masking.

What I have are two images of the same thing but one is illustrated as if you were looking at it through a dim light, it's sort of dreary... and the other is illustrated as if it were a bright happy scene. I'm trying to create a spotlight effect that shows the dark, dreary scene as the background and then when the spotlight goes over it shows the fun brighter scene in the light.

I have been looking at doing the "spotlight or flashlight" effect I see all over the net but I can not find a tutorial using two images. Is this hard to do? any tips would be great.

Thanks!!!!!!!!!

I'm Stuck On A MovieClip Situation..
I am trying to create a dynamic image gallery. This is my first attempt, so I will try to eplain it best as I can (and don't laugh @ my minimal actionscripting skills ).

1. I am scripting a createEmptyMovieClip.

Here is my script:
-----------------------------------------------------------
function holder(instanceName, number, image){
variableMC=instanceName+number;

var imageLoad:MovieClipLoader = new MovieClipLoader();
imageLoad.loadClip(image, variableMC);

variableMC._x=200.)

}
holder ("newMC",1,"image.jpg");
-------------------------------------------

2. This is the problem:
Inside the function, I want to call the newly generated movieClip via a variable instead of its actual instance name so I can achieve automation.
As you can see in RED, "variableMC" is the variable for the newly generated movieClip instance named "newMC". When performing a loadClip, it is able to recognize that "variableMC" is the variable for the "newMC", thus the image successfuly loads into "newMC".
However, when I try to space the movie clip by trying variableMC._x=200, flash does not recognize "variableMC" as a variable for "newMC" so this line of code is void. When I use newMC._x=200, it works.
3. The question to you all:
How can I replace actualInstanceName._x=200 with variable._x=200 and make it work?

This gallery is going to have more than one auto generated movieClips on the same page using this single function() thus I need the variable to work to make it fully automated.
Any help is appreciated, and sorry if my explaination may be confusing. Please reply back if a particular area needs more clarification. THANKS!

Shared Objects (useful For My Situation)
okay i am new to Shared Objects (only found out about them today)

in my game i have a movieclip which instance name is gameController in this movie clip (it is placed off screen basically as a storage pit) there is only a bunch of dynamic text box's which change as the game goes on.

for example. such text boxes are (these r the variable names)

character1Name
character1Level
character1Exp
character1Nexp

etc.. they go on, oncethe game is over there will me many many, anyway, when the game starts the character1Name text box is whatever the person playing choses it to be, if he choses JOHN then the character 1's name is john. as the game goes on the LEVEL, EXP and NEXP will be raised.

seeing i am new to this Shared Objects i figure it can be used as a SAVING GAME technique.

so i will incorperate a Save game button which i hope will save all the info in the gameController movie clip, that is all i want saved seein this is the games memory.

If any1 knows how to do this please let me know,
my next question is LOAD ?

i want to incorperate a load button onto the main stage so when u press it it will read from the already played shared object file and it will fill in the text box variables in the gameController movie clip.

Thankyou for any assisstance, For more info please specify.

Unique Attachmovie Situation
Hey guys, here's a bit of a stumper, I have a unique way of calling on the attachmovie method in a file...

picture a radio with two speakers, when the dial hits a certain station on the radio dial, I want a clip to be attached...my code looks alright to me, but what do I know....im pretty sure this is where the problem lies, comments included for your ease:

else if (dial.hitTest(submitSensor)) {
this.attachMovie(dabrova, monkey, 1);

monkey._x = 200;
monkey._y = 200;

}


is this a situation where you guys would have to see the file?

anything would be appreciated, thanks guys.
Mark

Type Of Menu To Use In This Situation?
I'm making a game in flash at the moment, you can view it here - http://gorounreal.com/pixelcity.htm.

At the moment the items in the menu are manually placed into the flash. Someone told me I should try to make it so people can submit new items to a database. Well that's all good and i'd be able to do that but the problem is the menu since like I said it's manually done.

What I was wondering was what would be the best way to have a menu in this that would work well with a database. e.g. would a listbox of sorts work well?

Thanks

Exporting FLV Files - Situation
Hey all. I'll get right to what I'm trying to do in Flash CS3 right now, and what roadblocks I'm encountering. Basically, I'm importing/embedding MPEG video files into Flash and saving them as SWF video files, ultimately to be included in a program created in Adobe Captivate. The SWF videos also include 2 buttons using actionscript (play/pause, and stop). When I play these videos on their own, they seem fine enough. When playing them in a published Captivate file, however, they play at least twice the speed of the original file. After telling a contact about it, he suggested that since Captivate's frame rate is 30 frames per second by default, that I should take the MPEG videos and convert them into FLV files.

So my two questions (both which may be incredibly easy to answer) are:
1) how would I convert an MPEG file already in my library to an FLV file

and

2) if I changed the frame rate of the video to 30 seconds in Flash (when importing to the library at the beginning), would that match the frame rate in Captivate, thus playing at the same speed?

I'll be happy to answer any other questions. Thanks in advance.

A Strange Situation With Publishing
I used to publish my works as an exe, it was take no time to get published, but now and suddenly, the same file take more than 7 minutes to been publishing, the file size is 27 mb, I asked if any one faced this situation before, or what I have to do to solve this problem…. Thank you…..

Copyright © 2005-08 www.BigResource.com, All rights reserved