Flash :: DOUBLE_CLICK Dont Work In Actionscript3
Jun 5, 2010MyMovie.addEventListener(MouseEvent.CLICK, goClick)
function goClick(e:MouseEvent):void
{
trace("Trololo");
}
It's work. Why don't work?
[Code]...
MyMovie.addEventListener(MouseEvent.CLICK, goClick)
function goClick(e:MouseEvent):void
{
trace("Trololo");
}
It's work. Why don't work?
[Code]...
port1a_mc.addEventListener(MouseEvent.DOUBLE_CLICK, pageClick)
function pageClick(e:MouseEvent){ gotoAndPlay(port1);}
trying to add this to my 4 _mc but keep recieving an error message:
1120: Access of undefined property port1a_mc.
1120: Access of undefined property port1.
when i export this file that have my script to swf flash (Action Script 2.0) Flash 8.0 CRASH but when i run the script under action Script 1.0 work fine. what can i do to fix this problem.. i want to use the script under AS 2.0
[Code]...
this is my code..RollOver and Out works great, but I can't seem to get function DOUBLE_CLICK to work.
home_mc.doubleClickEnabled=true;
home_mc.useHandCursor = true;
home_mc.buttonMode = true;
this.home_mc.addEventListener(MouseEvent.DOUBLE_CLICK, click_home_mc);
[code]...
The code is working perfectly, and all the event listeners except DOUBLE_CLICK works
Code:
}
var patch:MovieClip = new MovieClip();
[code].....
i have a tlf text input in stage,i want dispatch ahndler for this object when enter key in press, but i can't do this
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
import flash.display.Sprite;
tlf.addEventListener(KeyboardEvent.KEY_DOWN,handler);
function handler(event:KeyboardEvent)
[Code]...
I don't know why but this function will not work with double click I want a double click button on frame 2 to go to frame 1.The function works fine if it is a mouseClick event but double click prevents it from working. what is with that?
PHP Code:
table_mc.back_btn.addEventListener(MouseEvent.DOUBLE_CLICK, mainMenu);
table_mc.back_btn.doubleClickEnabled = true;
function mainMenu(event:MouseEvent):void {
gotoAndStop(1);
elementType_txt.text ="";
}
Im very new to flash and a colleague provided me with perfectly functioning swf presentation. I opened it with flash to make some minor mods and now when i save the pause/play buttons he had put on the presentation no longer work no longer work.
View 1 RepliesIve got this script. when u press a button u can create a movie clip called man. when u press another button u can create one called enemy. thay both create at different sides of the seane and thay walk past each other.but when thay touch each other thay should go to frames inside them. ect Attack,Die.
var mans = 0;
function addman() {
if (Gold>=10) { [code]....
I'm trying to use addChild in a for loop to add lots of copies of one mc, but they are not appearing on the stage.
[Code]...
why this array script don�t work?
Code:
submenus = ["sub_menu1.portfolio", "submenu2_.contact"];
for(i = 0; i<submenus.length; i++) {[code]....
I am editing an existing application that has three sets of wheels that spin. inside each each wheel are buttons that lead to a second movie layer.this second movie layer is on rollover and on release to show information.after wheel has spun twice the button actions inside the wheel still work but they are the wrong actions for each button symbol..........
prior to the wheel spinning it makes a calculation in a form.would i use movieclips as button symbols? ..
I made a movie that has sound in it being activated and deactivated by using the sound object and linkage id's and it works like a champ.Now i take that movie and load it into another movie like so actNav_mc.loadMovie("test.swf");Now the sounds dont play or work.So just for fun i brought the sound files into the library of my _parent movie and the sounds worked. Since i must have the sounds in the loaded file this is not a viable option. I then tried using the import linkage on an empty mc in the parent movie and it worked but i could shut the sound off.I spent all day on this and as i was typing this thread i found a fix..
View 4 RepliesI made a movie that has sound in it being activated and deactivated by using the soundobject and linkage id's and it works like a champ.Now i take that movie and load it into another movieike so.....actNav_mc.loadMovie("test.swf");Now the sounds dont play or work.So just for fun i brought the sound files into the library of my _parent movie and the sounds worked.Since i must have the sounds in the loaded file this is not a viable option. I then tried using the import linkage on an empty mc in the parent movie and it worked but i could shut the sound off.
View 5 RepliesI'm fairly new to actionscript and could use some help. I'm using Flash CS3, AS 1/2.I have made a musicplayer that is inside a movieclip, but when i pull the movieclip onto the stage the buttons inside the movieclip stop working.Inside the Movieclip:I have the music start on frame 1 and then gotoAndPlay at frame 3.Frame 3 has a stop();, a button that stops the music and gotoAndPlay "play".Frame 2 has a stop();, a button that plays the music and gotoAndPlay "stop".it all works fine on its own, but as soon as i stick it on the stage it stops working.Labels have been set up fine, it works when i use 'Test Scene'. I've hardcoded all the buttons to work on the timeline frames and not on the buttons.[code]
View 1 RepliesI have made some buttons that call in external swf files and these work perfectly on my own machine when tested in various browsers. My problem is when i upload to the server and then test in the browser, the buttons don't work anymore
View 1 RepliesI made a movie that has sound in it being activated and deactivated by using the sound object and linkage id's and it works like a champ.Now i take that movie and load it into another movie like so actNav_mc.loadMovie("test.swf");Now the sounds dont play or work.So just for fun i brought the sound files into the library of my _parent movie and the sounds worked. Since i must have the sounds in the loaded file this is not a viable option. I then tried using the import linkage on an empty mc in the parent movie and it worked but i could shut the sound off.[code]
View 4 RepliesIm using Flash 8 to make a meny for my webiste. When you point whit the mouse on the meny it will scroll down, and if you take it outside it will scroll back. But im facing a problem When i try to put buttons or linked text into the movieclip, they just wont work... Anyone know what i have done wrong?Here you can download the movieclipHeres the code.
on (rollOver) {_root.html.gotoAndPlay(2);}on (rollOut) { _root.html.gotoAndPlay(7); }
okay so what i cant figure out is...(still earning as3)i have these 2 buttons that are nested inside of movie clip........i havent added any code to em yet or nothing....ALL I LITERALLY did was, i have MC-a and went inside it, created 2 button symbols, and tested movie just to see how it'd look but when i rolled over the buttons they didnt work. they dont have roll over/out/press/hit states at all...it acts like its a regular graphic.i took the same buttons, copy/cut/paste on the main stage and work just fine.
View 2 Repliesi have used the following code to upload file which works in php4 server but dont work inphp 5 server.The flash code is as follows:
import flash.net.FileReference;
import gs.TransformManager;
//Allow this domain[code]....
i am uploading the php file.
Windows XP - Flash CS3: I have a family of fonts installed on my sytem, all Printer Font Metric (.PFM), Flash IDE only shows 2 of the 4 Do I need to use/convert to OpenType fonts for universal compatibility?
View 1 RepliesI am trying to create a SWC library for use in my Flash AIR project. I have created a seperate FLA called SceneLibrary and followed the steps defined here:[URL]..to create a new SWC component. I saved the created SWC into a lib folder within my Flash Dev project, I then right click on the SWC item in my project window and choose "Add to Library" This all seems to go fine.
In my code i then go import FirstScene (this is auto completed by Flash Dev) It seems a bit weird to me that the path to this class would simply be
[Code]...
I made a simple project which you paste XML into a TextField and and uses this. It works great however it doesn't keep the original structure which wasn't much of a problem until i recently noticed if i load or copy and paste XML which contain comments like:
<min>0.0</min>
<max>255.0</max>
In the TextField it turns to this:
<min>0.0</min>
//
<max>255.0</max>
Which creates problems as from what i can tell it would then run lines of code it should not. I would prefer if it kept the same text structure as the loading/copy and paste method seems to adjust it for some reason.can you keep the exact same XML text structure with working comments? when the XML is in the TextField it removes this part:
<?xml version="1.0" encoding="UTF-8"?>
why does it remove that rather than keeping the text exactly the same? and can i make it keep that or would i have to manually append that text again?
Having some problems adding the default spark.components.VScrollBar scrollbar. All I'm doing is creating a new VScrollBar, setting it's coordinates, a width and height and doing an addChild but it's not showing up. I'm adding other components too that do show up in the same code so that shouldn't not be the problem.What might I be missing?
var a:VScrollBar = new VScrollBar();
a.x = 100;
a.y = 100;[code].....
i want to have the music always playing and the ability to mute different parts. It is for a project where you click on different people and they come to life to play music. a stop and play would not have them in snyc. I have not been using action script long
var my_sound:Sound = new Sound();
my_sound.load(new URLRequest("triumphant.mp3" ) );
function setMute(vol){
var sTransform:SoundTransform = new SoundTransform(0);
[code]....
How can I get to know that the device is iphone or ipad using actionscript3.0?
View 1 RepliesPadding left can be done by TextFormat.leftMargin. And padding right can be done by TextFormat.rightMargin.
But there is no topMargin or bottomMargin property in TextField or TextFormat.
How can I do padding top and bottom?
Example code of left and right padding(margin) of TextField:
var format:TextFormat = new TextFormat
format.leftMargin = 40
format.rightMargin = 40
[Code].....
I have a piece of XML that goes out and grabs data. That data is being updated every so often. I want the user to be able to see the updated data by creating a way to reload it every x amount of time.
How do I use the timer to do this in Actionscript 3?
Do you have to perform some kind of VooDoo magic to get MouseEvent.DOUBLE_CLICK to workhere's my code:
Code:
import flash.events.*;
box_mc.addEventListener(MouseEvent.DOUBLE_CLICK, openFolder);
[code].....
let's see if i understood the logics behind this new cool feature in as3:
Code:
var a = new Sprite();
var b = new Sprite(); //imagine there's some graphics inside there...
[code].....