Adding classes to Flash CS3 project
Forgive me I'm a newbie when it comes to Flash projects. I
have the source code for a Flash based media player written in
Action Script 3 that I need to modify. I’m trying to add
classes to this project in Flash CS3 however after I import them
and try to reference the classes in an existing class within the
original source I get the following error when I try to build:
1172: Definition ‘classname’ could not be found.
However the project builds fine if I don’t reference
any of the newly imported classes. What am I missing here?
Scott
From a brief look you need to import your new package into
existing class:
import alducente.services.*;
Also make sure that you provide a path to this package in
Flash publishing preferences - you need to start with a directory
that one level up. For instance, if your new classes reside in a
path: c:/documents/classes/alducente/services, you need to tell
Flash that you classes are in c:/documents/classes - not in
c:/documents/classes/alducente
Similar Messages
-
Flex swc library in Flash CS3 project
Is it possible to use a swc library created in Flex in a
Flash CS3 project?Thank but It does not seem to work with Flex 3.0. I've tried
with the compiler "-compute-digest=false" option as suggested but
no luck. Do you have any idea?
Thanks -
Adding Easing to Flash CS3 AS3 UI Components
I am working on an AS3 project where I am forced to use
stock, out-of-the-box Flash CS3 AS3 UI Components.
Is there any way to add easing to the UIScrollBar [ and
the other components that use the UIScrollBar like the List,
ScrollPane, TileList ]
If anyone has a solution I will name my next child after you!!
Diane [ aka Eugenia ]Hi,
Thanks for your reply.
Does "unlikely" mean "definately not" or "you are not sure" ?
As I stated .....
"I am forced to use
stock, out-of-the-box Flash CS3 AS3 UI Components."...
So "making my own objects" is not an option.
Thanks again for replying,
Diane -
Adding .class files to your project and making them work.
Ok, im fairly new to java and having trouble understanding how to make importing of .class files work. Im using eclipse 3.2
I have the files in a directory and I have gone to project->properties->java build path->libraries->add external class folder and pointed it to the correct place.
Now, I am trying to use some of the classes it provides. I get no errors when creating the object with this code:
com.ECS.client.jax.ItemSearchRequest itemRequest = new com.ECS.client.jax.ItemSearchRequest();
Before I did the add external class folder that code would error cause it didnt know what com.ECS was. Now it works fine. My problem is that when I try to use a class, it does not recognize it as a class. After doing the above code I have:
itemRequest.setSearchIndex("Books");
its giving me an error on the period, saying: "Syntax error on token(s), misplaced construct(s)". Its not seeing that it is a class, so I can't use it. But when I am creating the object I get no errors. For reference, here is the chunk of code:
com.ECS.client.jax.ItemSearchRequest itemRequest = new com.ECS.client.jax.ItemSearchRequest();
itemRequest.setSearchIndex("Books");
the second line of which errors. So my question is, how do I get it to recognize that the itemRequest is a class when I have imported the .class files to my project already?It's working fine. It's just that you have to put your code in a method.
-
Hi,
I'm building a portfolio website in Flash CS3 for a school
project . It's going well.
I have several .SWF movies that I'd like to place in my
portfolio website. Here's what I want to do.
You come to a page and see a screen shot from one of the .SWF
movies. Below the image is a play button to launch the movie. When
the user clicks the play button it launches the .SWF movie. Once
the movie is launched the user should have use of all of the
controls in the movie (pause, stop, etc).
If the user decides they want to check out another area of
the website (btw I'm only using Flash to build this) I need the
movie to stop playing (including audio).
So, in summary - I have a new Flash CS3 project that I want
to add .SWF movies to. Is there a tutorial out there that explains
how to do this?
Thanks,
mindforgecheck the loader class. you can use it to load external
swfs. -
Captivate 3 is wrong size when importing into Flash CS3
I've tried exporting, publishing etc. and no matter how I
try, when I import into Flash CS3 the size of the Captivate content
(background screens, in particular) are too small. For example, I
captured a 423x424 area for my Captivate project. When I import
into a Flash CS3 project with the same dimensions the Captivate
content (screens) are more like 203x203.5 and the mouse path and
slide context starting positions are upper left corner. I've tried
adjusting some of the importing settings but can't get the screens
the right size unless I resize each one manually - and I have
around 100. Any help greatly appreciated!
-ScottI am using captivate 3 and I get an error whenever I try to
export to flash cs3. unknown error.
why the hell doesnt Adobe say that flash is required to
export to flash BEFORE I buy the software? I am using my pc for
captivate, but am primarily mac based and was going to edit in
flash on my mac. but captivate didnt allow for me to export to
flash at all without any kind of flash installed. I installed a
demo version of flash, but the export is coming up with an error.
any ideas out there? adobe??? I'm currently using vista OS.
thanks in advance. r -
Downgrading from Flash CS4 to Flash CS3 possible?
Hi, I have just bought the whole Creative Suite 4 Master Collection as I need most of the programs as a freelancer. Now I have just the task to debug a Flash CS3 project, but somehow it is definitely not possible to compile the main fla with CS4. Thus I would like to "downgrade" Flash to CS3. Is this possible?
No, I have just bought CS4 and used Flash 8 and the Flash CS3 trial before. I still have the trial installation on my system, but it has expired since quite a while.
Is there not any chance to acquire a Flash CS3 Serial number somehow? I urgently need it, since the project I'm working on actually cannot be compiled using CS4 though it should, regarding the amount of money I spend on this software...
P.S. I will NOT buy a second license of the old Flash, just for that purpose! Are you kidding me? -
AIR Intrinsic Classes-Tried and Proven Approach to building AIR applications in the Flash CS3 IDE
Hi everyone,
For all of you out there who would like to develop AIR
applications
from the Flash CS3 IDE but aren't sure how to get those pesky
intrinsic
classes working, I have a technique that you can work with to
create
your classes and make fully functional AIR applications.
First of all, those solutions out there that list
"intrinsic" functions
in their class definitions won't work. That keyword has been
taken out
and simply won't work. The "native" keyword also doesn't work
because
Flash will reject it. The solution is to do dynamic name
resolution at
runtime to get all the classes you need.
Here's a sample class that returns references to the "File",
"FileStream", and "FileMode" classes:
package com.adobe{
import flash.utils.*;
import flash.display.*;
public class AIR extends MovieClip {
public static function get File():Class {
try {
var classRef:*=getDefinitionByName('flash.filesystem.File');
} catch (err:ReferenceError) {
return (null);
}//catch
return (classRef);
}//get File
public static function get FileMode():Class {
try {
var
classRef:*=getDefinitionByName('flash.filesystem.FileMode');
} catch (err:ReferenceError) {
return (null);
}//catch
return (classRef);
}//get FileMode
public static function get FileStream():Class {
try {
var
classRef:*=getDefinitionByName('flash.filesystem.FileStream');
} catch (err:ReferenceError) {
return (null);
}//catch
return (classRef);
}//get FileStream
}//AIR class
}//com.adobe package
I've defined the package as com.adobe but you can call it
whatever you
like. You do, however, need to import "flash.utils.*" because
this
package contains the "getDefinitionByName" method. Here I'm
also
extending the MovieClip class so that I can use the extending
class
(shown next) as the main Document class in the Flash IDE.
Again, this is
entirely up to you. If you have another type of class that
will extend
this one, you can have this one extend Sprite, Math, or
whatever else
you need (or nothing if it's all the same to you).
Now, in the extending class, the Document class of the FLA,
here's the
class that extends and uses it:
package {
import com.adobe.AIR;
public class airtest extends AIR{
public function airtest() {
var field:TextField=new TextField();
field.autoSize='left';
this.addChild(field);
field.text="Fileobject="+File;
}//constructor
}//airtest class
}//package
Here I'm just showing that the class actually exists but not
doing much
with it.
If you run this in the Flash IDE, the text field will show
"File
object=null". This is because in the IDE, there really is no
File
object, it only exists when the SWF is running within the
Integrated
Runtime. However, when you run the SWF as an AIR application
(using the
adl.exe utility that comes with the SDK, for example), the
text field
will now show: "File object=[object File]". Using this
reference, you
can use all of the File methods directly (have a look here
for all of
them:
http://livedocs.adobe.com/labs/flex/3/langref/flash/filesystem/File.html).
For example, you can call:
var appResource:File=File.applicationResourceDirectory;
This particular method is static so you don't need an
instance. If you
do (such as when Flash tells you the property isn't static),
simply
create an instance like this:
var fileInstace:File=new File();
fileInstance.someMethod('abc'); //just an example...read the
reference
for actual function calls
Because the getter function in the AIR class returns a Class
reference,
it allows you to perform all of these actions directly as
though the
File class is part of the built in class structure (which in
the
runtime, it is!).
Using this technique, you can create references to literally
*ALL* of
the AIR classes and use them to build your AIR application.
The beauty
of this technique is its brevity. When you define the class
reference,
all of the methods and properties are automatically
associated with it
so you don't need reams of code to define each and every
item.
There's a bit more that can be done with this AIR class to
make it
friendlier and I'll be extending mine until all the AIR
classes are
available. If anyone's interested, feel free to drop me a
line or drop
by my site at
http://www.baynewmedia.com
where I'll be posting the
completed class. I may also make it into a component if
there's enough
interest. To all of you who knew all this already, I hope I
didn't waste
your time.
Happy coding,
PatrickWow, you're right. The content simply doesn't show up at all.
No
JavaScript or HTML parsing errors, apparently. But no IE7
content.
I'll definitely have to look into that. In the meantime, try
FireFox :)
I'm trying to develop a panel to output AIR applications from
within the
Flash IDE. GSkinner has one but I haven't been able to get it
to work
successfully. Mine has exported an AIR app already so that's
a step in
the right direction but JSFL is a tricky beast, especially
when trying
to integrate it using MMExecute strings.
But, if you can, create AIR applications by hand. I haven't
yet seen an
application that allows you to change every single option
like you can
when you update the application.xml file yourself. Also, it's
a great
fallback skill to have.
Let me know if you need some assistance with AIR exports.
Once you've
done it a couple of times, it becomes pretty straightforward.
Patrick
GWD wrote:
> P.S. I've clicked on your link a few times over the last
couple of days to
> check it out but all I get is a black page with a BNM
flash header and no way
> to navigate to any content. Using IE7 if that's any
help.
>
>
>
http://www.baynewmedia.com
Faster, easier, better...ActionScript development taken to
new heights.
Download the BNMAPI today. You'll wonder how you ever did
without it!
Available for ActionScript 2.0/3.0. -
Project created in Flash CS3 & Flash CS5 crashes both Safari & Firefox
I have a user with a brand new image including Snow Leopard 10.6.6 and the Adobe CS5. When creating a project in Flash CS5 and then trying to view it in Safari & Firefox the plug-in crashes which then brings down the browser with it. I went and installed Flash CS3 (as this is what he is used to using) and the problem still persists.
Any ideas?anyone?
-
Anyone know Flash CS3 embed font's Glyphs Range!! with font class(no TextField )
I have add some font by Font class in the library
(TextFeild.embedFonts=true)
but the font's glyphs looks not enough.
when i use text String " ü ä ö ß π
à â ç è é ê ë î ï
ô ù û œ "
only the "π" and "œ" is can be visible.
Font.hasGlyphs also return false;
if i only create a TextField, and Click the Embed button
selection glyphs range.
the text will be fine.
but i won't use TextField by drag to the stage
i heard in flex:
@font-face {
src:local("Arial");
fontFamily: myFont;
flashType: true;
unicodeRange:
U+0041-U+005A, /* [A..Z] */
U+0061-U+007A, /* a-z */
U+0030-U+0039, /* [0..9] */
U+002E-U+002E; /* [.] */
so what can i do in Flash CS 3?
thanks a lot
i really tried working on this.maybe i just need go back use
the .....TextField.Im not sure if u can do it with flash cs3.
i change a little ur code to :
package {
//import flash.util.describeType;
import flash.display.MovieClip;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.AntiAliasType;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormatAlign;
import flash.text.Font;
public class Test extends MovieClip {
// be sure this is pointing to a ttf font in your hardrive
[Embed(source="arial.ttf", fontFamily="foo", mimeType="application/x-font-truetype")]
public var arialfont:Class;
public function Test() {
Font.registerFont(arialfont)
var format:TextFormat = new TextFormat();
format.font = "foo";
format.color = 0xFFFFFF;
format.size = 130;
var label:TextField = new TextField();
label.embedFonts = true;
label.autoSize = TextFieldAutoSize.LEFT;
label.antiAliasType = AntiAliasType.ADVANCED;
label.defaultTextFormat = format;
label.text = "Hello World!";
addChild(label);
trace(label.text);
label.setTextFormat(format);
and it works fine with flash cs4, only first time it will ask to confirm flex sdk location ( have to have flex sdk to use embed, u can downlaod it free from adobe.com)
hope that helps -
Is it possible to get a count of all the class files in a Flash Builder project?
Is it possible to get a count of all the class files in a Flash Builder project?
Thanks!Resultsets are one per connection unless you have copied them. Do you have lots of connections are you properly reusing them or at least closing and discarding all references?
See tutorial and Javadoc of API too -
[Flash CS3] Probleme document class.
Bonjour j'ai un soucis avec Adobe Flash CS3 : lorsque je veux créer un Document class dans les properties du programme un message d'erreur apparait : "A definition for the document class could not be found in the classpath, so one will automatically generated in the SWF file upon export".
Merci d'avanceI hear ya.
-
Sending Captivate 3 projects to Flash CS3
I am have a consistant problem with the background slide
layer being sized when I export a Captivate 3 project to Flash CS3.
I have tried several different projects and they all react the
same. The Layer for the slide background resizes to about 1/2 of
the orginial size but the overal (screen) project size stays the
same with all other components remaining at the correct position.
I encounter the same problem when I import a Captivate 3 file
to the stage in Flash CS3 as well.
Everything else is as it should be but the graphic is
resized.
Does anyone have any ideas?> i'm not an expert Flash user and I can't solve a strange
problem. I hope
> in
> some useful suggestions : ).
>
> I exported several projects originally made with
Captivate 2 and re-saved
> with
> Captivate 3 to Flash CS3.
> After the export, the background slides size is
drastically reduced while
> the
> overall project size doesn't change (see also
>
http://groups.google.it/group/macromedia.flash/browse_thread/thread/840313a46eeb
>
18ca/f9a0f586a44c8376?hl=it&lnk=gst&q=export+Captivate+CS3+#f9a0f586a44c8376).
>
> I don't know what to do : ). Have you some ideas to fix
the problem?
>
Yeah this was asked and answered a couple of times recently
- The slide backgrounds are all held on one layer in Flash.
Looks to
consistently be layer 2, named Slide Backgrounds :-)
- This layer is locked. So click on the little padlock and
unlock the layer.
- Select "Onion Skin" and "Edit Multiple Frames"
- Two little 'start onion skin" and "end onion skin"
indicators appear at
the top of the timeline - move them to the start and end of
the timeline, so
they encompass the whole project.
- Select the Slide Backgrounds layer so that all of the Slide
Background
images are selected at once. You may need to also click on
the background.
- If you get it right. You'll see size and location values
for the
background in the Properties panel.
- Type in the correct slide background size, and position
0,0.
I sent in a draft technote to Adobe about this last week, so
hopefully it
will show up on Adobe.com sometime soon.
Steve
Adobe Community Expert: eLearning, Mobile and Devices
European eLearning Summit - EeLS
Adobe-sponsored eLearning conference.
http://www.elearningsummit.eu -
Adding a class file to JCOP project
I'm trying to add a class file a JCOP project, I'm using a class folder.
After the load commands I'm getting the following error:
Error code: 6985 (Conditions of use not satisfied)
Offending APDU: 6985
Wrong response APDU.
Is there any special configuration that I'm missing?
Thanks,
UriThank you very much for your help.
>Where are you getting the error ?
I'm getting the error at JCOP Shell after entire load (I think?):
RefLocation.cap loaded (27 byte)
Load report:
434 bytes loaded in 0.9 seconds
effective code size on card:
+ package AID 8
+ applet AIDs 15
+ classes 27
+ methods 129
+ statics 62
+ exports 0
overall 241 bytes
Error code: -4 (Malformed response APDU)
Offending APDU: 69859000
Error message: Invalid response length. Expecting delegated operation response
jcshell: C:/Program Files/eclipse/plugins/com.ibm.bluez.jcop.eclipse.targetpack_1.0.3.3/lib/scripts/sim-simul-capfile-autoinstall.jcsh[58]: Wrong response APDU.
jcshell: C:/Program Files/eclipse/plugins/com.ibm.bluez.jcop.eclipse.targetpack_1.0.3.3/lib/scripts/sim-simul-capfile-autoinstall.jcsh[58]: Unexpected error - script terminated!
>Did you authenticate to the CM first?
I think the shell does it automatically at the beginning of the script .
> Is your class an applet?
Yes, my class is an applet, but I�m trying to use(import) a regular class.
>are you trying to perform any crypto?
No
>Is there a PIN required to perform any operation?
I don�t think so.
I got the applet and this class from third party. The strange thing is that when I compile and convert it using DOS prompt, I can load it successfully on a SIM, but it doesn�t work in JCOP, does it make any sense? I�m probably doing something wrong�
Thanks again,
Uri -
A couple of weeks ago, I wrote in another thread about how
Flash CS3 (using AS3) can directly handle javascript. I must tell
you that this direct handling is limited. You cannot call custom
javascript functions from html this way. If you need to call
function in your html, you must still use ExternalInterface.
Flash CS3 has a new function called navigateToURL().
navigateToURL() is part of the flash.net package and is
asynchronous (does not return any kind of value).
Let's say you want to throw a simple javascript alert message
to a user. You need to first make a call to the URLRequest
constructor and pass it a string value that uses javascript
protocol. In the alert example, you'll be calling the string
"javascript:alert('Your first AS3 javascript call');" To those
familiar with HTML, this will look very very familiar. All put
together, it looks something like the code below....
This idea can be expanded on and added to custom event
handlers in classes for buttons and other things in your projects.
Remember though that you must call the javascript code as it
appears in the javascript protocol. So to open a popup window,
you'd need to use window.open( blah, blah, blah ). Personally, I
still use ExternalInterface to call my Javascript functions (if I
need them at all). The only reason I use navigateToURL is when the
browser I'm using does not support ExternalInterface.
Anyhow, the code for the above example is down below. If you
have questions, post them here.k,
my post 2+ weeks ago was adrenaline driven and premature. the
example I just gave was the code I was talking about. Why I ever
posted that URLLoader was capable of javascript interaction is
beyond me. I know better. The purpose of my post was simply to
answer questions I've been getting in my e-mail and to clarify my
original post 2 weeks ago.
As I stated, navigateToURL is meant for specific scenarios
just as getURL was in AS1 and 2 which was replaced by navigateToURL
in AS3. This would be more for the Linux users and the a-typical
O/S users where ExternalInterface is not supported by the browsers
on those operating systems. I do not condone using navigateToURL or
getURL. I will always recommend external javascript files and
ExternalInterface. My apologies for leading anyone on with my
premature run-off of the typing finger.
Maybe you are looking for
-
Problems with my Ipad Mini Freezing/black screen/power off randomly
So I got my Ipad Mini about 3 weeks ago, maybe a little longer. I have had the first gen Ipad since it came out and never really had a problem with it. I wanted to the Ipad mini for a long time cause my buddies have it and I have loved it ever since
-
After firmware update wifi no longer works on ipad mini
wifi worked fine before upgrade to ios6.02 it sees networks but cannot join them? 4G works fine
-
How to open an url via command line?
Hi all, I want to open a pdf file via a command from a web location. I try this: "AcroRd32.exe http://server/path/file.pdf" to do so, but this way results in an error message about bad filename. Is it possible to open a pdf in such a matter? Backgrou
-
Hi! Ive earase very important video...is therw any way i could retrieve it? Please im despirate..;(
-
Just to give you a little background on myself: I graduated with a BSCS degree last year and have been developing web applications using Cold Fusion ever since. I'm looking to return to my roots in object-oriented application programming and have sta