Basic MovieClip Usage In FlashDevelop

Apr 6, 2011

I'm just started doing 'hands-on' learning of Actionscript 3 using FlashDevelop. I've now managed to subclass a sprite, load a graphic from the library, and manipulate it around the stage. Next step is doing the same with a MovieClip, but it doesn't seem to be as simple. Basically, I want a simple subclass of MovieClip, that uses a SWF that I created & exported in Flash CS5 (anything else that can create them?), and then added it into my library in FlashDevelop.

In my 'Main' class, I want something like this:
package {
import flash.display.MovieClip;
import flash.events.Event;
public class Main extends Sprite {
private var myClip:MovieClip;

But that says the child is null, and I'm not sure I should be creating a 'new' MovieClip inside my sub-classed MovieClip anyways.

View 1 Replies


Similar Posts:


Flex :: Flex - Basic Usage Of Swffit. How To Make It Work

Feb 10, 2010

How swffit (http://swffit.millermedeiros.com/) can be used? I mean in my project I have dynamically expanding flash application, so once the expanding part riches the bottom I see standard flash scroll bar. Not browser scrollbar...

Here is how I defined my application:






public function addPanel(evt:Event):void
{
var panel:Panel = new Panel();
panel.name = "new";
panel.title = "new";
panel.height = 30;
panel.width = 100;
this.addChild(panel);
SWFFit.fit('my_flash', 800, 600);
}


public function main(event:Event):void{
SWFFit.fit('my_flash', 800, 600);


}
]]>
</mx:Script>
<mx:Button label="Add" click="addPanel(event)"/>




The html file (same as described in docs):

<html>
<head>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript" src="swffit.js"></script>
<script type="text/javascript">
swfobject.registerObject("my_flash", "8.0.0");
swffit.fit("my_flash",800,600);
</script>
</head>

<body>
<object id="my_flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%">
<param name="movie" value="Sample.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="Sample.swf" width="100%" height="100%">
<!--<![endif]-->

<div>
<a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" title="Get Adobe Flash player" /></a><br />
You need <a href="http://www.adobe.com/go/getflashplayer">Flash Player 8</a> and allow javascript to see the content of this site..
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>

</body>
</html>


Will be happy to hear any feedback,



Added fixes described in answer 1. but come across interesting issue: e.g. browser scroll bar appears only on browser window resize, not when clicking add button...

http://img.skitch.com/20100210-qx9trerh8rq5athhnuwtidetr6.png

After add is clicked several times, I see flash default scroll bar...

View 1 Replies

Flex :: Embed Movieclip With FlashDevelop?

Feb 7, 2010

I am trying to embed a movieClip with flashDevelop but apparently its not working because its not recognizing the movieclips that are within it.[code]...

View 3 Replies

Flex :: Cannot Access MovieClip Properties In FlashDevelop

Feb 12, 2010

In my controls I have keydown events that control my hero. As of right now, I am trying to rotate my hero but he refuses to turn . Below is my Hero Class, my control class, and gameobject class. pretty much all the classes associate with the controls class.

package com.Objects
{
import com.Objects.GameObject;
/**

[Code]....

View 2 Replies

ActionScript 3.0 :: FlashDevelop - Loading Local PNG Into MovieClip

Jan 25, 2011

At the moment I'm using FlashDevelop to make an entirely AS3 Project, my first task was to load a local '.png' into a MovieClip. So This was the code I was using:

Code:
package {
import flash.display.Bitmap;
import flash.display.Loader;
import flash.display.MovieClip;
import flash.display.Sprite;
[Code] .....

It compiles fine but I get this error when it runs:
"Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found."

View 3 Replies

Actionscript 3 :: {FlashDevelop} Building IOS With AIR And FlashDevelop

Aug 3, 2011

I'm having trouble using the following tutorial and flashdevelop template to build a flash project for iOS. [URL] Whenever I compile my project (using FlashDevelop 3.3.4) I get an error from adl.exe saying "Error loading initial content". Using the iOS applicationpackager.bat, I get an error saying: application.xml: error 305: Intial window content SWF version 11 exceeds namespace version [URL]I'm using air 2.7 and Flex 4.5.1 on Windows XP.

View 1 Replies

ActionScript 2.0 :: Basic Movieclip Scale Effect?

Sep 17, 2009

I am currently working on a website for a studio based in Sydney and have been developing (very basic actionscripting 2.0...) it for the last week or so, and up until now I haven't had a problem.

The site layout is simple and is essential 10 blocks stacked next to each other 5 on the bottom and 5 on the top. Each block is a button that highlights when a user rolls the mouse over.I have created the button animation as a movieClip which is being controlled by a Button symbol with actionscript on the button symbol:

[Code]...

View 0 Replies

ActionScript 3.0 :: Basic Custom Class - MovieClip Not Display At Runtime

Jan 14, 2009

I have a blank FLA. with document class index. I have an AS file name index saved in same folder. My custom package looks like this, but the movieClip does not display at runtime. I'm just trying to begin work with OOP and custom classes and I'm not sure why this isn't working for me:

package {
import flash.display.MovieClip;
public class index extends MovieClip {
public function Main () {
var D:MovieClip = new dMC();
D.x = D.y = 100;
addChild(D);
}}}

View 2 Replies

Flex :: Flash - Total Memory Usage And TaskManager Memory Usage Are Different?

Aug 24, 2010

I wrote an application in flash AS3, and when I trace from flash the total memory usage of the total application is only about 9MB, But at the same time Task Manager Shows the memory usage as 110MB. Around 100MB difference.Flash Trace Method System.totalMemory difference of the Trace from the Beginning of the application to end of the application.

View 2 Replies

Flex - Getting Better At FlashDevelop?

Feb 9, 2010

I have been programming with as3 for the past 4 months and Ive been getting rather good at it. I just recently decided to work with flashdevelop. I notice that there is alot of code that is availible in the flex sdk that isn't available in as3 with flash cs4. Like embedding of assets and such. I've been trying to find some up to date tutorials on how to embed things like xml and so far the tutorials are inaccurate or unclear about how to go about doing so. Ive been trying to find some good books that cover that and havnt been able to.

The books either cover as3 with flash or as and flex builder. Which is more towards working with the mxml. I havnt been able to find any books on how to work with as3 and flex sdk. Which show examples like embedding of xml and so on. I was just curious does anyone know of any good books that cover EVERYTHING there is to know about as3 and the flex sdk. Not so much on flex builder and mxml.

In a sense, I just want to get better with working with as3 projects with flashdevelop. And it would be great if there was books that covered that. Cause lets just face it, We developers sometimes just get sick of searching the web for bits of pieces of things. and its just great to have that one good book that references everything.

[Code]...

View 3 Replies

ActionScript 3.0 :: Using SWC In FlashDevelop

Dec 28, 2009

I'm trying to use a swc in a FlashDevelop AS3 project, and have been wracking my brain trying all kinds of ideas with no luck. Here is the situation.

1. i have created a swc of a Combobox in the Flash IDE (CS3 Version 9.0) and published it as a swc named "ComboBox1.swc".

[Code]...

View 2 Replies

FlashDevelop - External Interface Not Available

Jan 5, 2010

Im testing a program in FlashDevelop, which uses Flash player 10. Need externalInterface to work, but on running this simple test program, it displays "ExternalInterface is not available". How do I get ExternalInterface working? [URL]

<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function init():void {
if (ExternalInterface.available) {
[Code] .....

By the way, this script shows "External Interface is available" when I run it in my browser. Its only when I run it in Flash Player 10, that it is not available.

View 2 Replies

Flash :: Can't Embed XML In FlashDevelop?

Feb 9, 2010

I am trying to embed some xml into my application but I get the following error Fault] exception, information=TypeError: Error #1090: XML parser failure: element is malformed.Here is my code.

package
{
import com.objects.EngineApi;[code]................

View 1 Replies

Flash :: Using FLVPlayBack In FlashDevelop?

May 24, 2011

Trying to learn some flash and got a question. How do I play a flv video, below code compiles correctly and load flash player but doesn't play anything

var vid:FLVPlayback = new FLVPlayback();
var ui:UIComponent = new UIComponent();
this.addChild( ui );

[Code]....

View 1 Replies

ActionScript 3.0 :: How To Embed An Swc In Flashdevelop

May 3, 2011

I've tried a few ways of import an swc I made in flash but i keep getting a transcoding error. The symbol is set to export for actionscript and its baseclass is Movieclip. What is the simplest way to do this

View 2 Replies

ActionScript 3.0 :: Different Between Flex And FlashDevelop?

Jul 18, 2009

I'm using FlashDevelop (cos it's free!) with Flash CS4. Is FlashDevelop basically the opensource version of Flex or is it something completely different again? Or is that what AIR is?

View 2 Replies

ActionScript 3.0 :: From FlexBuilder To CS3 Or FlashDevelop?

Nov 28, 2009

I have inherited a Flash project that (I THINK) was started in FlexBuilder, but I dont have FlexBuilder. I have CS3 and FlashDevelop, is it possible for me to continue this project using the tools that I have?

There are a bunch of wierd files like ".project" and ".actionScriptProperties", and obviously no .FLA file.How can I get up and running using either CS3 or FlashDevelop?

View 2 Replies

ActionScript 3.0 :: Add A Combobox In Flashdevelop?

Jan 19, 2010

I need to add a combobox in my project. But every example i see is for CS3/CS4 or a as3 flex project. or sfw files

I'm working in Flashdevelop AS3 Project. Does anyone have the most basic script version with a combobox so we can use it, and add on to it.

View 6 Replies

ActionScript 2.0 :: Add A Clickable Button In FlashDevelop?

Jul 29, 2009

So I got this AS3 game thats completely written in Flex without the .fla file and I want to put a clickable button that links back to a webpage to the mainmenu screen.

In the IDE and AS2(which is what I usually work in), it was just simply:

Drag button onto the screen Convert it into a button symbol and then do this:

Code:
on(release)
{
getURL("http://www.urlhere.com",_blank);
}

[Code].....

View 2 Replies

Flash :: Format Actionscript In Flashdevelop?

Jun 16, 2009

is there a way to format/beautify actionscript (as3) in flashdevelop? if not are there easy ways to do this without using the Flash IDE.

View 2 Replies

Flash :: Flashdevelop Is Not Finding Png File

Jan 3, 2010

I am trying to load my png file to my application. here is the code

var map:mapLoader = new mapLoader();
map.loadMap("tile.png");

Then here is my file that loads it. it throws the error right when it gets to

loader.load(new URLRequest(currentMap));

if I comment it out. then the error goes away. below is the code in its entirety

package {
import flash.display.Loader;
import flash.net.URLRequest;

[Code].....

View 1 Replies

Flex :: Flashdevelop Not Compiling Correctly?

Feb 7, 2010

When I try to compile my application in flash develop. it wont compile. even if I put a simple trace in the Main class. Nothing happen. the sdk is in the correct place.

View 2 Replies

How To Create TextField With Scroll In AS3 And FlashDevelop

Feb 23, 2011

I am working on a flash game based on an AS3 project using FlashDevelop. I need a textbox with scroll bar. I was able to create an editable TextField, but I can't find a way to add a vertical scroll bar.

View 3 Replies

Flash :: FlashDevelop And Compile A Theme Using FD 3 Or 4?

Jul 22, 2011

How to compile a theme using FD 3 or 4? I have a CSS file with assets and would like to get a SWC file (not SWF) like halo.swc

View 2 Replies

Actionscript 3 :: Add An FXG Image To An AS3 FlashDevelop Project?

Jul 24, 2011

I've got an ActionScript 3 project in FlashDevelop. How can I embed an FXG file and use it? I've tried to import the file directly (import graphics.Filename) and instantiating it, but doesn't draw anything.

View 1 Replies

Flex :: Use Example From Adobe Reference In FlashDevelop IDE

Aug 19, 2011

I try to use the example from Adobe help reference as following address:

[URL]

I open FlashDevelop IDE, creat a new Flex 3 project, then copy the code of example to the main.mxml, save it, then run builder.

It failed with "...TreeExampleTreeExamplesrcMain.mxml(5): Error: Could not resolve <s:Application> to a component implementation." error message.

There is a "How to use this example" link beside this example, but I didn't find any useful information I want.

How can I run this example in FlashDevelop IDE?

View 1 Replies

Actionscript 3 :: Get FlashDevelop To Show Right Api Documentation?

Nov 1, 2011

I have been working with Flixel in FlashDevelop for quite some time, and I recently updated my Flixel library to the latest version. Some things have changed names or have been moved or had their inputs changed. For some reason, FlashDevelop is still showing me the documentation from the old version of Flixel as I type things in, so I keep trying to use variable and functions etc that no longer exist.

View 1 Replies

Php :: Configure FlashDevelop To Debug In Web Browser?

Feb 26, 2012

I'm following directions to set up a debugging in FlashDevelop in web browser.I'm getting confused on 'Configure your project' step. It says:

Open the Project properties and change the "Test Movie" option to "Open Document...". Click on the button which should appear, and enter bin/index.html (path to html page, relative to project root) in the prompt.

What is the bin/index.html file? Is it where my SWF is loaded? I currently have a SWF that loads from a PHP page. So I pointed it to my PHP project's index.php page build project. After build I get a generic Windows message that Windows cannot open the file with that extension.

Is it possible for me to debug my SWF from my PHP page which loads it?

View 1 Replies

ActionScript 3.0 :: Cannot Import Fl. Classes In FlashDevelop

Dec 25, 2009

i am tryin to impor the following classes in my FlashDevelop project, import fl.transitions.Tween; and fl.transitions.easing.*; however, in my flashdevelop project i can't seem to find this, i can only seem to find the flash.XXX classes. What do i need to do to gain access to the fl.XXX classes? do i need to download a new sdk or change my ide to something else?

View 5 Replies

ActionScript 3.0 :: FlashDevelop - SWF Not Working When Copied

Nov 16, 2011

I am developing a word game using flashDevelop . the game is working fine when I compile and run using flashdevelop and it also working fine when I directly open [swf] file from the source [bin] folder. But the problem is when I try to copy and open [swf] file from other than original location its not working. I have also tried to copy the whole bin directory but that also not working. I am using XML file to load in swf file. I am also using flash [swc] file for fl.controls.package.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved