Import Mx.controls.Alert; Not Working In Cs3
1172: Definition mx.controls:Alert could not be found.
Hey there is there any particular reason why I can not access the mx classes from flash cs3.
or more so where can I get them to install into my class path directory???
many thanks
brndn
KirupaForum > Flash > ActionScript 3.0
Posted on: 11-21-2008, 07:42 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Mx.controls.Alert;
Hi there,
I am trying to use mx.controls.Alert and am getting the following error:
"Failed to create a new alert, probably because there is no Alert in the Library"
But i clearly have the component in my library!!
I have it working in another file but when I copy the code into that it doesnt work either... any ideas ?
Thanks in advance!
I am just using an example from the help file to get it working.....
Attach Code
import mx.controls.Alert;
// Define action after alert confirmation.
var myClickHandler:Function = function (evt_obj:Object) {
if (evt_obj.detail == Alert.OK) {
trace("start stock app");
}
};
// Show alert dialog box.
Alert.show("Launch Stock Application?", "Stock Price Alert", Alert.OK | Alert.CANCEL, this, myClickHandler, "stockIcon", Alert.OK);
Can't Import Import Fl.controls.ComboBox
Hi all!
I am starting learning AS 3.0 (used to use AS 2, that was sweet times ) and actually can't understand simple thing - why I can't include that package from action script?
I actually start new Action Script 3 file, and put single line in first frame
Code:
import fl.controls.ComboBox
and got errors
Code:
1172: Definition fl.controls:ComboBox could not be found.
1172: Definition fl.controls:ComboBox could not be found.
Actually thats part from the code listed at the manual and I don't have any idea, why it doesn't work.
Also when I open components window and drag combobox to scene error is not showed any more.
Any ideas how can I solve this problem without adding combobox to the library?
Import Mx.controls
For some reason, I get a compile time error everytime I try to import mx.controls.* What could be the cause of this?
Code:
package src {
import mx.controls.MenuBar;
public class MainMenu {
public function MainMenu() {
}
}
}
gives me this error:
1172: Definition mx.controls:MenuBar could not be found.
Movie Controls... Import An AVI
Hi guys,
I am new to the world of flash. And i have a problem with something i need to do.. maybe you guys can help me out.
I imported a huge AVI movie and conpress it enough to be manageble.
So Flash creates 1 frame per each frame of the AVI. So i have this pretty long Flash movie. What i want to do is give it playback options. Like Play, Pause, Stop, Fast Foward and Rewind.
I know how to do the Play, Pause and Stop... and i am having problems with fast foward. What i want it to do is that the person press the button down and hold it.. and as long as the button is holded down the movie will Fastfoward 10+ plus.. until the person let's go of the button.. then it plays normal.
is it possible? what's the code i need to put on the fastforward button?
Import Mx.controls Question
i have a main movie which loads external swfs.. and many of the external swf files contain ComboBoxes and/or Listboxes. In order to make the Combo/List components function properly, i understand i need to use code:
import mx.controls.ComboBox;
import mx.controls.List;
my question is instead of having to do this individually in each external swf...wouldn't putting the import mx.controls for the comboBox and List in the main file make them accessible for all files loaded into the main movie?... Is there some way to do this?....i guess it would be making the controls global?
i have just found that importing the controls into individual files produces a longer preload time for the files....
any ideas?
TIA
Unable To Import Fl.controls.*
Hi,
I recently upgrated to Flash CS3 and have been porting my AS2.0 app to AS3.0 (phew!). I've been moving along - slowly but steadily till now. For some reason, I get error #1065 - variable button not defined even though I import the pertinent class.
so,
import fl.controls.Button;
..
..
-->some_button = new Button ();
addChild(...);
and I get the error on the indicated line.
Any ideas?
Thanks,
S
Error - Import Fl.controls.TextInput;
so i was working on this project making it in classes and i tried to do this:
import fl.controls.TextInput;
and i kept getting the error
1172: Definition fl.controls:TextInput could not be found.
once i placed a TextInput component on the stage through flash cs3 and then deleted it the project started to compile without errors.
Import Fl.controls.Button; Error
Can you explain this to me
I opend a new flash file and put in it one line
import fl.controls.Button;
And the compiler says:
Definition import fl.controls.Button could not be found
Wh dose that happen???
NOOB2AS3 Problem With Import Fl.controls
Hi again, so I can't seem to do:
import fl.controls.Button;
Even though I am working in flash, in an *.as file which is located in the same folder as the project... what gives?
I added my path to the AS3 settings in the preferences and entered the complete path, just to be sure:
Cortex:Applicationsesigner:Adobe Flash CS3:Configuration:Component Source:ActionScript 3.0:User Interface:fl
But it still says it doesn't know what I am trying to import...
Any ideas?
Easy Question About Import Fl.controls.Button
Hi, I'm new to flash/AS3 and I'm having trouble figuring out how to use the library. I understand that when I include the line
import fl.controls.Button
I need to have a button in the library (otherwise I get a compiler error) but how do I put a button there? I tried copying a button from Common Libraries into may library, but that didn't help. I also tried drawing a rectangle, dragging it to the library, and clicking on "Button" in the properties box, but that doesn't work either.
Also, do I have to set the linkage properties to export the button?
Thank you!
Alert Component NOT WORKING
Hello, all i want to do is add a alert component to my flash movie. When I followed the help in the flash program:
import mx.controls.Alert;
myClickHandler = function (evt){
if (evt.detail == Alert.OK){
trace("start stock app");
// startStockApplication();
}
}
Alert.show("Launch Stock Application?", "Stock Price Alert", Alert.OK | Alert.CANCEL, this, myClickHandler, "stockIcon", Alert.OK);
=========
And then when I start my movie i get this error message:
**Error** Scene=videos, layer=actions, frame=1:Line 3: Syntax error.
import mx.controls.Alert;
=========
AHH SOMEONE HELP !
Alert.show() Not Working
i m creating an alert box but it seems not working as i have the alert component in my library. But when i call for it Alert.show(), it wont appear! why?
Attach Code
function checking(){
if (_root.mc.hitTest(_root.bar) && _root.mc.hitTest(_root.bar2) ){
mx.controls.Alert.show("Hello, world!");
}
else if (_root.mc.hitTest(_root.bar) || _root.mc.hitTest(_root.bar2) ){
mx.controls.Alert.show("Error!!");
}
}
[AS 2.0] Alert Not Working In Browser
I was wondering if anyone might know why my Alert box doesn't appear when viewing the .swf in firefox when I click on the button that evaluates the code responsible activating the Alert.show command. It appears when I open the .swf in the flash player and inside the 'play movie' command within Flash itself. Do I need to include some type of file in the relative directory?
Video Controls Not Working.
Hi all,
I have a bit of a problem and I can't seem to find any solutions. I am pretty new at flash.
I'm making this magazine using page-flip. On one of the pages there is a little movie playing, but at the moment it starts playing a few pages before you reach the page (page-flip caching need to be a few pages before...otherwise people need to wait on every page). and it won't stop playing when you close the page.
Like I said I'm very new to this.
What I have at the moment on that page is a swf file.
actionscript:
function onOpen(){
book.flipOnClickProp = false;
}
function onClose(){
//
book.flipOnClickProp = true;
}
lo = {canPlay: false, videoLoaded: false, page: this};
lo.progress = function(evt){
if(evt.target.bytesTotal > 0 && evt.target.bytesLoaded >= evt.target.bytesTotal){
this.videoLoaded = true;
if( this.canPlay || this.page.visible ){
this.canPlay = true;
evt.target.play();
text_mc._visible = false;
}
}
}
lo.complete = function(evt){
if( this.canPlay ){
evt.target.stop();
evt.target.play();
}
}
media.addEventListener("progress", lo);
media.addEventListener("complete", lo);
function onOpen(){
lo.canPlay = true;
if(lo.videoLoaded) {
media.play();
text_mc._visible = true;
}
}
function onClose(){
lo.canPlay = true;
if(lo.videoLoaded) {
media.stop();
text_mc._visible = true;
}
}
Keyboard Controls Not Working In Browser
I'm working on a simple move and shoot game that uses keyboard controls (arrows to move + space to shoot). This works fine when I test the movie, but when I publish it and test it through a browser, it won't work. Other actionscripted movement (eg moving targets) are working, but nothing happens when I press the keys.
Any ideas
FLV Playback Controls Not Working When Loaded Into Mc
Hi.
I've got an FLV playback component with a seekbar and replay button and everything works perfectly. When I load it into another mc (or a level) the replay button works once and only once, and the seekbar doesn't scrub to where it's dragged, it just ignores the position and continues playing.
I've been searching for a solution everywhere and completely stumped. Any ideas out there?
Many thanks.
Gary.
FLV Playback Controls Not Working When Nested
Hi.
I've got an FLV playback component with a seekbar and replay button and everything works perfectly. When I load it into another mc (or a level) the replay button works once and only once, and the seekbar doesn't scrub to where it's dragged, it just ignores the position and continues playing.
I've been searching for a solution everywhere and completely stumped. Any ideas out there?
Many thanks.
Gary.
[F8] How To Get The 'start' And 'end' Button Controls Working In This File
Hello,
In the attached file, I would like to be able to navigate to the first frame in the main timeline - for the start_btn and then to the end of the drill_mc 's timeline whenever the user clicks on end_btn.
I can't seem to get the code working for this. Any ideas please on how this could work?
Thanks
FLVPlayback Controls Stop Working After Being Used The First Time
Hi
I am working in Flash 8 and creating a dynamic flv player.
I have an issue when the flv file is loaded and starts playing, if you click the seek, stop, next or previous buttons in the movie controller they will work once and then all the buttons in the movie comtroller will stop working. Below is the code i have used to create the dynamic flv player. The code is from the "Creating a Dynamic Playlist for Streaming Flash Video" article on adobe's site, which i have used for progressive download video.
Code:
listListener.change = function( evtobj ) {
var nav = list.dataProvider[list.selectedIndex];
var reset = true;
attachMovie("FLVPlayback", "my_FLVPlybk", 10, {width:380, height:304, x:176, y:4});
for ( var i = 0; i < nav.childNodes.length; i++ ) {
var stream = nav.childNodes[i];
if ( stream.nodeName == "stream" ) {
//center the FLVPlayback component when FLV is ready to play
var listenerObject:Object = new Object();
/*listenerObject.resize = function(eventObject:Object):Void {
//center video in playback area
newx = (460 - my_FLVPlybk.preferredWidth)/2;
newy = (470 - my_FLVPlybk.preferredHeight)/2;
my_FLVPlybk._x = newx;
my_FLVPlybk._y = newy;
};*/
my_FLVPlybk.addEventListener("resize", listenerObject);
listenerObject.ready = function(eventObject:Object):Void {
my_FLVPlybk.setSize(380, 304);
};
my_FLVPlybk.skin = "LoadedExternalNoVol.swf";
my_FLVPlybk.clear();
my_FLVPlybk.contentPath = nav.attributes.url + "/" + stream.attributes.name;
my_FLVPlybk.autoSize = true;
//trace(my_FLVPlybk.contentPath);
reset = false;
}
}
}
My question is why do the controls stop working? and how can I make it so that they dont?
thanks for the help
Video Player Controls Stop Working
Hi there. I'm creating a website in Flash CS3. The FLV video in the center of the page utilizes one of the stock video control panels in the video encoding process (SkinUnderPlayStopSeekMuteVol.swf) . Upon testing the movie, both in Flash and uploaded on my server, the controls work fine for about 10 seconds then seize up and stop being functional. The page is simple as can be. 1 frame long, a couple pieces of text, a static background and the FLV in the middle. Any ideas on why the control panel freezes up?
Working With Gradient Masks And Movie Controls
I am using multiple gradient masks within a single time line and I need help using them with movie controls. My forward and rewind buttons are not working correctly with them. When you start backing up or going forward the masks are no longer applied and the actual black and white bitmap mask appears. Is there are work around to this other than adding the cacheasbitmap action to every frame, because some overlap?
Flash FLV Playback Component Controls Not Working
I have an FLV Playback component in a website that I'm working on and for some odd reason the controls do not work. The video loads and plays fine and the controls appear but you cant click on anything like you can when you assign the skin in the parameters. It is a default Flash skin. At first I thought it was due to the video layer being under a mask, so I moved it on top and it didnt change anything.
Anyone have any ideas?
Flash Volume Controls Not Working In Quicktime Mov Format
Hi All,
Need help if anyone knows the answer.
I am working in Flash 5. I HAVE to for this project. My issue is that I have created a volume slider control within a flash movie that controls the volume on a QT.mov. My final file format will be .mov.
The slider works in flash but when I publish the final file as a .mov. The slider just starts to drag all over the screen and doesn't adhere to the x,y coordinates its been given in Flash.
Has anyone else faced this issue and/or has anyone found a solution?
Thanks all.
Import Not Working
when i use the import feature of flash 8 it works in flash itself. (pressing ctrl + ent), however when i go to preview the movie on my localhost "http://localhost/blah.swf" it does not work. i have gone to publish settings and set the folder directory for the AS class file, and it still, does not work! :( can anybody tell me what i am doing wrong please? any help is much appreciated!
Import From Swish2 Not Working
i have a made something (very simple) in swish 2 and would like to import it in to flash but when i do this flash gives a messages saying
"one or more files were not loaded because there was a problem reading them"
Import From Illustrator Not Working (PNG / SWF)
I have spent 2 days making some lovely pictures in illustrator, all ready to get them animated in flash. However I saved them in PNG format (from illustrator) and tried to import them to the stage in flash and when I clicked OK nothing happened! Nothing on the stage, nothing in the library. The only way i could get the images to appear at all was by exporting them in swf format and importing them into flash that way. The problem that then arose was when I went to publish the flash movie there was nothing on the stage (despite my lovely picture being there on the stage in the fla file.
Has this happened to anyone else before? or does anyone have any suggestions as to what the problem may be or how I could resolve it. Greatly appreciated. I am begging for your help. Thanks.
(png attached)
Import Class Not Working
Hey,
Im using actionscript classes which are contained in the follwoing sub folders from my flash doc.... classes/hello/hello2/code1.as and classes/hello/hello2/code2.as
im currently importing (or so i think) them using....
Code:
import hello.hello2.code1
import hello.hello2.code2
"The class or interface 'hello.hello2.code1' could not be loaded......."
do i have to link to them some how or does that action script code do it all for me?
Regards
Al
Import Classes Not Working
Today Flash decided to stop importing any of my classes. Everything worked fine yesterday. I came in today and it can't find anything. I know the files are there.
Code:
import com.mine.Test;
var t:Test = new Test();
Outputs "1172: Definition com.mine:Test could not be found.
Using Xml In Gallery And Not Working Is Css Import
I have the gallery loading anxml file of external images and it all works fine. but when I add the swf into my portfolio it doesnot load. I have checked the file paths, class paths, and nothing.
any help
brian
Import Filesystem Not Working?
From what I've read, the fileSystem class (which I need to write a data file to disk from a projector) works in Flash CS4 as long as you have the AIR runtime (which I do), according to the documentation.
I found quite a bit of sample code, but I can't even get the package to load and all of the types and functions and classes are undefined.
Here's my code:
import flash.filesystem.*;
function writeFile():void {
var file:File = File.documentsDirectory;
file = file.resolvePath("data.txt");
var fileStream:FileStream = new FileStream();
fileStream.open(file, FileMode.WRITE);
// Create string
var cOutStr:String = "This is output data";
fileStream.writeUTF(cOutStr);
fileStream.close();
}
When I "test movie" in CS4, it doesn't even make it past the "import" statement, which is strange since that library is included in the default implicitImports.xml on my installation.
The errors I get start with:
1172: Definition flash.filesystem could not be found.
And continue with expected errors if the library was not loaded:
1120: Access of undefined property File.
Anyone have any ideas? I can't find filesystem.as in my install folders. Perhaps it's somewhere else?
Or perhaps I misunderstand the documentation and you can't use fileSystem in a flash projector with AIR?
Or is there some setting in Flash I need to adjust to work with the library and AIR?
Please help. I'm on deadline for this project and I don't have a clue of any other way of writing a text file to the local hard disk. Any assistance greatly appreciated.
Imported MC W/in Import Not Working
Hi,
I've imported movie clip A into an empty movie clip. The problem is that movie clip A has a button on it that when you click allows you to advance to the next image, as part of that clip. However, when imported into the empty movie clip, the functionality of that button to advance to the next image is gone. Any ideas?
Thanks in Advance,
Alpesh
[AS3] Package Import Not Working?
I've been playing with AS3 and I just can't get my package to import into my fla. My folder structure is as follows.
Code:
|Fireworks
|--|classes
|--|--Fireworks.as
|--fireworkApp.fla
|--fireworkApp.swf
As far as I know the code below, which is inside my FLA should work.
Code:
import classes.Fireworks.*;
var userInput:UInput = new UInput();
The package is as follows:
Code:
package classes.Fireworks{
import flash.event.*;
import flash.display.Sprite;
import flash.geom.Point;
public class UInput extends Sprite{
public function UInput(Void){
trace("UI Initalized");
addListener(MouseEvent.MOUSE_DOWN, makeFirework);
}
private function makeFirework(evt:MouseEvent):Void{
addChild(new Firework(Math.random()*100));
}
}
class Firework extends Sprite{
private var pNum:Number;
public function Firework($numParticles:uint){
pNum = $numParticles;
init();
}
private function init(Void):Void{
for(var i:Number = 0; i < pNum; i++){
var vector:Point = new Point(Math.random()*3, Math.random()*3);
addChild(new Particle(Math.random()*3, vector));
}
}
}
class Particle extends Sprite{
public function Particle($radius:uint){
var circle:Shape = new Shape();
circle.graphics.lineStyle( 2, 0xFF0000);
circle.graphics.beginFill( 0x0000FF, 100);
circle.graphics.drawCircle($radius);
addChild(circle);
}
}
}
Any help would be greatly appreciated .
AS3 / Flex2 Import Not Working
I can't seem to import correctly... I've been trying for almost 24 hours and still nothing.... So here is the code, It's in a flex2 project.
Code:
creationComplete="start()">
<mx:Script>
<![CDATA[
import main.startup;
public function start()
{
startup.start3();
trace('hi');
}
]]>
</mx:Script>
and in the main project folder I have a main folder with a startup.as in it... with the following in side it...
Code:
package main
{
import flash.display.Sprite;
public class startup extends Sprite
{
public function start3():void
{
trace ('start');
}
}
}
And It won't work. . tells me i got a possibly undefined start3() through reference of static type class... or something like that... which is like swahili to me
Package Import Not Working
Hi i had created 1 folder and name it "S" and inside 1 fla is there and code goes like this
package s {
import flash.display.Sprite;
import flash.text.TextField;
public class Suplemental_1 extends Sprite
{
private var tField:TextField;
public function Suplemental_1 ()
}
public function thisTest ():void
{
tField = new TextField();
tField.autoSize = "left";
tField.background = true;
tField.border = true;
tField.x = 200;
tField.y = 200;
tField.text = "Hello You, what is your name?";
addChild(tField);
}
}
but m getting 1 erorr as package cant b nested , i dont knw d reason ,
i want to execute the code , so plz help and do i req to do cretian change in path
Imported MC W/in Import Not Working
Hi,
I've imported movie clip A into an empty movie clip. The problem is that movie clip A has a button on it that when you click allows you to advance to the next image, as part of that clip. However, when imported into the empty movie clip, the functionality of that button to advance to the next image is gone. Any ideas?
Thanks in Advance,
Alpesh
Import From Illustrator To Flash Not Working (PNG/SWF)
I spent 2 days making some lovely pictures in illustrator, all ready to go into flash. I first exported them into PNG from illustrator and tried importing that that way but after clicking OK nothing appeared on the stage or in the library. There were no error messages. I then tried exporting from illustrator in swf format. This time the picture appeared on the stage, with associated symbols etc. in the library, but when I came to publish the movie, the picture wasn't there at all. I finally tried copying and pasting from illustrator. This simply crashed flash every time.
Has this happened to anyone else before? Or does anyone have any suggestions as to what the problem might be or how i could go about resolving it? Any help greatly appreciated. I'm begging for your help. Thanks.
Adobe Illustrator CS2, Flash 8, Mac. (Png attached)
Import From Illustrator To Flash Not Working (PNG/SWF)
I spent 2 days making some lovely pictures in illustrator, all ready to go into flash. I first exported them into PNG from illustrator and tried importing that that way but after clicking OK nothing appeared on the stage or in the library. There were no error messages. I then tried exporting from illustrator in swf format. This time the picture appeared on the stage, with associated symbols etc. in the library, but when I came to publish the movie, the picture wasn't there at all. I finally tried copying and pasting from illustrator. This simply crashed flash every time.
Has this happened to anyone else before? Or does anyone have any suggestions as to what the problem might be or how i could go about resolving it? Any help greatly appreciated. I'm begging for your help. Thanks.
Adobe Illustrator CS2, Flash 8, Mac. (Png attached)
Import Video - Only Audio Working
Hello,
I have figured out how to get File>Import Video work.
The audio works, but the video does not. I only get a white screen.
Suggestions or a great tutorial?
Thanks!
Class Or Import Not Working Anymore?
I have this project that I had on ice for a long time. I just got asked to make it work again and am having issues with it.
I am using the lmc_tween.as class. My import looks like this and used to work fine.
#include "lmc_tween.as"
$tweenManager.broadcastEvents = true;
Now when I opened the project, it is no longer working. The files now is set to AS2 and player 8 and I am using the latest version of the class.
Any ideas why this might not be working how I can trouble shoot it to work?
Thanks a lot for any help with this!
Tween Class Import Not Working In MX?
Hi everyone, I just went over the motion tween tutorial for Flash MX, and every time I try to run the code, it pops up
Scene=Scene 1, Layer=Layer 1, Frame=1: Line 1: ';' expected
import mx.transitions.Tween;
Scene=Scene 1, Layer=Layer 1, Frame=1: Line 2: ';' expected
import mx.transitions.easing.*;
Can someone tell me why it's not working? Thanks.
Slice 9 Not Working On Fireowrks Import
Hi all,
I have been tearing my hair out over this. I've got a panel I need to use the slice 9 functionality on. I've gone through all the docs and even some of the tutorials and they all work. However they all seem to just work on graphics created in flash. I've got vectors created by a designer in fireworks that I'd like to use instead. They do have a drop shadow filter on them, but when I remove them it doesn't seem to make any difference. It doesn't work. I've tried it programatically and also by using the properties in the library. Am I being thick (i.e. This should work) or is this not possible. I've tried cut and paste from Fireworks, opening the Fireworks png - the lot.
Fireworks CS3 and Flash CS3 (AS2 FP8) btw.
Thanks
tim
Using [alert ("alert Message");] Aka Javascript In Flash
I want an alert to pop up in my movie, but I cant figure out how to use javascript inside actionscript.
I cant insert the code:
<script language="JavaScript">
alert('Alert Message")
</script>
Like i would in an html.
and I tried just putting
alert('Alert Message")
But that didnt work either.
Thanks for your time.
KillStickGuy
? Image Import Not Working, What's Wrong With This Code?
I have a clip within my main movie called clipBackground
and I want to load an image into that clip so I put
clipBackground.loadMovie("flash/image.jpg");
and the URL used is relative to where the flash is being played
but it's not working; why?
I thought it was lacking target and method, so I tried that too, but nothing changed
now, the funny thing is that I had this stuff working, but now it's not
any help would be appreciated
thanks,
Airnine
P.S. if anybody has a couple of minutes to write some code that would be really nice
[AS 2.0] Import Is Not Working: Cranks Out Syntax Error
...um... this is all i have in the script... and it gives me a syntax error on the first line! classpath is ~/ActionScript/ and the classes live in ~/ActionScript/com/<classes>. what in the nine levels of hell am i doing wrong?
Code:
import com.pixelWit.*;
superButton_btn.onRelease = function()
{
neuvaCol.fadeRGB(255, 0, 0, 1000, traceDone);
};
and if you need the pixelWit color classes: here ya go:
http://www.pixelwit.com/temp/colorfa..._colorfade.zip
thank you, o mighty brains of the forum!
WR!
2 Player Game. Moving Cars Controls Help With Controls
hi i have the controls for car number 1 that would be the arrow keys if
(Key.isDown(Key.RIGHT)) {
this._rotation += manuverSpeed;
} else if (Key.isDown(Key.LEFT)) {
this._rotation -= manuverSpeed;
}
if (Key.isDown(Key.UP)) {
if (speed<speedMax) {
speed += accel;
}
} else if (Key.isDown(Key.DOWN)) {
if (speed>-speedMax) {
speed -= accel;
but how can i make controls for car 2 ... i wann use wasd but i cant figure out how the key.a doesnt work.
Drag Controls Override All Other Controls On Movie?
I have a movie that loads into the main timeline and can be dragged around using:
on (press) {
startDrag("");
}
on (release) {
stopDrag();
}
That works great except that to close that movie again I've added a little button to say on press, unload movie.
Problem is none of the buttons or links on that page will work while it is being dragged around. How can I make the links and buttons work but still make the movie draggable?
Bulk Import Statments Vs. Specific Import Statements...any Performance Difference?
Lets say I have 20 classes located at nl/amsterdam/simulation/model/. Now I'm writing another class that is going to use some of those 20 classes. Is there any performance difference in the compiled swf if I import them all using a wildcard:
Code:
package nl.amsterdam.simulation.view
{
import nl.amsterdam.simulation.*
...
versus importing each specific one that I need?:
Code:
package nl.amsterdam.simulation.view
{
import nl.amsterdam.simulation.model.Tulip;
import nl.amsterdam.simulation.model.Canal;
import nl.amsterdam.simulation.model.Prostitute;
import nl.amsterdam.simulation.model.StonedTourist;
import nl.amsterdam.simulation.model.BuisnessMan;
import nl.amsterdam.simulation.model.Windmill;
import nl.amsterdam.simulation.model.CoffeeShop;
import nl.amsterdam.simulation.model.SkinnyBuilding;
...
Or is there only a difference in the time it takes to compile, not the time it takes to execute?
Player Controls For Swf Similar To The Flv Player Controls Component?
Is there a component that is similar to the flv component that will control playback of a swf? or can this component also be used for a swf? I tried to create a player that uses loadmovie to load a swf, which works, but when i tried to create play, pause, forward (next scene), rewind (previous scene) etc it doesnt work and the audio and playback of the animation doesnt follow the controls when i click on the buttons. t hanks
When Is Necessary To Use Import Statements To Import Classes?
Hi,
I'm sure that it must be necessary to use import statements in some situations, I'm finding that my code often works fine without them. For example, some instructions will say it is necessary to use import.flash.events.MouseEvent; before MouseEvent.CLICK will work, or that I must import the loader class before loading an SWF, but I'm finding that I can skip timporting and it works fine. Could anyone please explain why this it, and give me some idea of how to knew when to import and when I don't have to?
Thank you in advance!
|