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




STRUCT Or TYPE? In Flash?



does flash support anything like Struct or type?

If not, offer me an idea on how to store this information

1. create array of documents with title, and url attributes(props) = 3 docs total
2. Each Document has 100 pages. Each page has 4 coordinates
3. I need to relate coords to pages in document.

I thought :

1. create docs[] array (holds title, url)
2. for each item in docs array create multi-dim pageCordArray[]
3. Stick coordinates in multi-dim pageCordArray
4. "creatively" name each array the name of the document
5. Hope noone wants to include 1000 documents
6. Cry and wish Flash was more like C



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 10-27-2004, 10:07 PM


View Complete Forum Thread with Replies

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

Help How To Receive Struct From VC++?
Hi, I'm trying to send a data structure such as

struct packet
{
int a;
int b;
int c;
};
(where a = 99, b = 2, c = 3 for example)

from a Visual C++ MFC Application (using CSocket) to a Flash movie using the following code:

First, I declared a class as follows:

class Packet {
var a:Number;
var b:Number;
var c:Number;

// Constructor function
function Packet (a:Number, b:Number, c:Number) {
this.a = a;
this.b = b;
this.c = c;
}
}

I am able to connect to the VC++ Server succesfully and receive data using the following code:

XMLSocket.prototype.onData = function(msg: Packet)
{
trace(msg);
}

However, instead of receiving the packet i send from the server, Flash MX receives the character "c" followed by 2 lines of whitespace.

Can anyone help? I don't understand what i'm doing wrong here. Or are there alternate methods for server-client communication??

Help How To Receive Struct From VC++?
Hi, I'm trying to send a data structure such as

struct packet
{
int a;
int b;
int c;
};
(where a = 99, b = 2, c = 3 for example)

from a Visual C++ MFC Application (using CSocket) to a Flash movie using the following code:

First, I declared a class as follows:

class Packet {
var a:Number;
var b:Number;
var c:Number;

// Constructor function
function Packet (a:Number, b:Number, c:Number) {
this.a = a;
this.b = b;
this.c = c;
}
}

I am able to connect to the VC++ Server succesfully and receive data using the following code:

XMLSocket.prototype.onData = function(msg: Packet)
{
trace(msg);
}

However, instead of receiving the packet i send from the server, Flash MX receives the character "c" followed by 2 lines of whitespace.

Can anyone help? I don't understand what i'm doing wrong here. Or are there alternate methods for server-client communication??

Fancy Box Type Moving Graphic Type Cool Efect But Im To Dumb Type Thingy
i am tring to make a box thinky simaler to the one on www.starvingeyes.com but cant even work out how to start it. is there anyone who can point me in the right direction or to a tutorial ?

the box has a graphic inside a grided box the sections of the graphic fade in and out as the mouse goes over them and displays random sections when the user is not moving the mouse over the box

i did find java tutorials for this effect but would much preffer it to come from flash as java is a bugger to get working on some machines

Any way thanks in advance for any help

Steven Green one_mad_punk@yahoo.co.uk

WebService - What's A "Map/Struct" From A .cfc
okay, well i get the sense that with only two posts and zero responses in a month that i'm sort of 'sendin out an s.o.s.' here, but whatever...

my web service will work okay with a simple string or an array, but the real method that my cold fusion colleague has setup for me produces results that appear as a "CVC Query Recordset" or something in the Flash Web Services panel. I'm just describing the little description that expands from the panel, not what I actually get because I can't read that in to flash for the life of me.

now i'm new at this and was using the "Tip of The Day" tutorial at the macromedia site to get started using the WebService Component, and all their results are of a type called "Map/Struct" and I'm thinking that maybe if my cf guy can send me results like that I'd be able to use them or consume them or whatever.

just a hunch since i can get a string or an array but not the CF Query Recordset array of objects or whatever it is.

or maybe i just need a few pointers on how to access that array and he can do the recordset approach after all.

thanks.

Implicit Coercion Of A Value Of Type String To An Unrelated Type Function
Hi there

Why I can't use an "eval" function (i am not sure this is the right terminology) inside addEventListener (I put in yellow) ?

for (i=1;i<10;i++) {
var constructFunction1:String;
var constructFunction2:String;
constructFunction1="choix3"+i+"Handler";
constructFunction2="choix3"+i+"HandlerClick";
MovieClip(this["choix"+i]).addEventListener(MouseEvent.MOUSE_OVER,constructFunction);


Then error in the compiler:

1067: Implicit coercion of a value of type String to an unrelated type Function.

Pixel/Bitmap Vs True Type/Open Type Fonts
I'm new to flash and I've been getting conflicting advice on which type of fonts to use. I've done several searches in the forms and I'm still just as puzzled so I've decided to start my own discussion on the subject. So here we go:
1) Are Pixel and bitmap fonts the same type of font?
2) Which is better to use True Type or Pixel (bitmap) fonts and where and/or why

Please help this newbie to flash and jump in with your opinion, experiences, etc.

Thanks

Making A String Type Into A Number Type
The title is probably misleading and because I’m new to flash and coding this is probably a very simple problem. What I am trying to do is make a function in which I give the name of an instance, it adds the ._alpha and then have the function take the instance and have the instance go from being visible to invisible.

The following is the code that I have developed.



function dealpha(dename:Number):Void{
dealpha = (dename) ++ (._alpha);
for(i=0;i<100;i++){
dealpha -=1;};
};
dealpha(mc_mc);

The error that I get when I compile the file is this

Syntax error.
dealpha = (dename) ++ (._alpha);

Total ActionScript Errors: 1 Reported Errors: 1


I appreciate any help that I can get with this code.

Compile Type Check For Object Type
I used Flex Builder 3 to compile my actionscript. I have a question regarding the compile type check for type Object. I have set my compiler to strict mode, but it does not seem to detect this compile type error:

var o:Object = new Object();
o.foo(); //this should generate compile type error because foo() is not method inside Object, but flex builder is just silent.

But if I try this

var s:String = new String();
s.foo(); //flex build flag this as error

flex builder correctly detects the reference error.

I can't understand the reason for the different behavior for the Object type versus the String type. Can anyone help to explain the reason for this?

Thanks.

Help With Flash Type
I created the file for flash typer but when I DL the file it doesn't give me the two buttons that do the special effects.... the play button and the play text fadeout button. Can anyone help? thanks.
email me back at JesseNLe@hotmail.com also thanks.

Type In Flash
hello all

just wondering when i have designed a website and then published it online i have found that the type on my imac17" is fine, but when friends log on to there pc at home normally 15" screens the type is very bad and fuzzy. why is this? is this because the type is done in flash and not dreamweaver?

Type In Flash
hello all

just wondering when i have designed a website and then published it online i have found that the type on my imac17" is fine, but when friends log on to there pc at home normally 15" screens the type is very bad and fuzzy. why is this? is this because the type is done in flash and not dreamweaver?

Xml Type In Flash Mx
I have a flash file that reads information from an xml file that looks like this...
<clients>
<node1> client 1 </node1>
<node2> client 2 </node2>
<node3> client 3 </node3>
<node4> client 4 </node4>
</clients>
and when i use the script

function update(newNode){
text1=newNode[0].nodeValue;

i always get a null value. so i checked the nodeName the same way and got <node1>, so i know it has the right node. I then checked the nodeType and it returns "1" an xml element. My question is how do i get the nodes to be type "3" or text nodes?

Is There A Way To Type A Flash Var?
Is there a way to type a flash var something other than String? I can’t seem to pass one typed as a String when it’s really a number (4 in this case) thru a switch expecting numbers. I tried to force it by assigning the string to a var cast as a number but had no luck.

Example

ActionScript Code:
var jumpTo:Number = jumpPage; // try to force jumpTo (the flash var) to be a number


As I understand it you can’t just change a vars type. Is there any way around this or a way to define it before hand?

Help With Flash Type?
I have seen a page filled with thumbnail images and when you click on an image, the full -sized image loads on top of the thumbnails. When you then click the full image it goes away leaving the thumbnails again.

I'm a beginner and not sure if this is action script or wwhat causes it. I would like to be able to create a page like this.

I am using flash 5 and windows xp

Hopefully Somebody Has Done This Type Of Flash Pop Up.
Hello,

I have been racking my brain trying to figure out how they do thos new flash pop ups with no walls and then make then blend with the background and shut off in a couple seconds.

I have seen then on tvguide.com cnn.com and couple other sites.

Anybody have a sample of how to do this?

Thank,

Href Not Useable In Flash. . .then Any Ideas On How To Make A FAQ Type Thing In Flash
Without having to make all of your questions into buttons ??

any ideas sugestions please help.. .thanks

Darin

1034: Type Coercion Failed: Cannot Convert Flash.display::Stage@1c4d9461 To Flash.dis
new to AS3 and working with classes (would consider myself knowledgeable enough in AS2 to be dangerous) and am encountering all kinds of migraine inducing fun while trying to make the leap to AS3.

latest is trying to reference the main timeline from within my class.

i am trying to reference it like this:

Code:
var home:MovieClip = MovieClip(this.parent); // variable handle referring to _root timeline
and getting this error(s):

Quote:




TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Stage@1c4d9461 to flash.display.MovieClip.
at Carousel()
Error: Error #2136: The SWF file file:///Macintosh%20HD/Users/Nate/Desktop/Flash%20%2D%20Learning/Lee%20Brimelow/with%20Classes/MainCarousel.swf contains invalid data.
at Carousel/frame1()




I believe the first error is that i cannot cast the _root timeline as a movieclip for some reason and am really starting to wonder why the Display List is such a pain to work with (or appears to be a pain anyway).

sure would be nice to have a way to reference the stage and clips on it without having to write extra code or chew my own lips off. grrrr!! The second error isn't even on my radar yet although it looks like a doozy.

How Do You Get Sharp Type In Flash MX?
I've got problems with type I've set looking pretty choppy in flash MX. It's been viewed on all sizes/resolutions....sometimes it's okay...sometimes it's gross....I'm most concerned about the black body copy

Font: Helvetica 11pt
Ouput: flash 5 compatible swf

http://www.gravity-interactive.com/imec/services.html

There's the link of the site in progress.... the navi is VERY much under construction...

ANY advice would be IMMENSELY appreciated.

Font Type In Flash-HELP
I have noticed that many of the greatest website is using a type of device font in their flash.
When zooming in, it's pixelerated in the curve area but it's definitely vector based. Therefore it's very clear even in very small view of flash. How do they do that??
I have tried many ways in order to comply this type of font but no matter how I tried (searching over more than 6000 font and try using Photoshop and paste the font onto flash) but still I cannot get the font.
They look very similar to the video font I have seen through searching but it differs when come to scrutinized view.
Can anyone help?

Or can anyone know what it's called?
Vector font?Screen font?pixelerated font?device font?

This could be a very good question for beginner like me...

Yahoo Type Flash Ads?
Does anyone know how or of a tutorial that explains how to do the Yahoo Style Flash Ads?

The ones where the Flash is a layer on top of a page but may have transparencies behind it to show the rest of the web page?

Thanks,
Brian

Movable Type & Flash
Dear all,
I am writing to request your help and expertise... I would like to have my movable type blog viewable in it's entirety inside of a flash movie. I know that i'm gonna want the data to be formated in an XML file and imoprted that way, So far i've managed (using the data connection wizard) to get flash to read and display the contents of atom.xml in a datagrid. I also know that eventually (when it all works) i'll have to bind the data to components. With this in mind my question is, how? Should i create a custom template for every file that MT will output or can i import the data from that atom.xml file? (it had entries and id's etc) Will doing this still enable me to have comments visible? Has anyone attempted / done this? Please help, any information is useful. Many thanks and respect.

Craig Mackenzie

Buddyprofile Type UI In Flash
Is it possible to make a nice UI in flash that will upload all the variables taken from the movie and stick them in a mySQL database? All I really need to know is how to set up a differant language than AS. aka,

onClipEvent(enterFrame){

language="ASP"{
/*
Code to send vars here
*/
}
}

Thats not really how I would code it, but I would like to know if it is possible before I design everything and find out I can't do it.

How Do I Do This... C++ Type Pointers In Flash
Hi everyone, I am veteran C++ programmer and new to flash. Kind of stuck here trying to populate an object with elements from an Array. Very easy in C using pointers but can't figure out a way of accomplishing it in Flash. Your help is greatly appreciated.

/* Trying to populate my_lv object with array elements so that I may submit it to a php script via LoadVars.sendAndLoad for processing
*/

// The array itself
var myArray:Array = new Array();
myArray[name] = "John Doe";
myArray[age] = 25;
myArray[height] = 70";

// The object declaration
var my_lv = new LoadVars();

// Loop to go through array elements and populate the LoadVars object
for (everyelement in myArray) {
trace ("myArray[" + everyelement + "] = " + myArray[everyelementname]);

// THIS IS WHERE I AM GETTING STUCK!!!
my_lv. & everyelement = myArray[everyelement];
// the & everyelement does not work because it makes no sense. Can someone please point me in a direction where I can make sense of it. Thanks.
}


BTW, the myArray.toString() function will not work for me because it only returns back the array data with the pointer name.

Thanks,
Mansoor Lakhani.

Thinkmap Type App In Flash
hello friends,
well it's come to this.
i'm desperate.

i'm trying to replicate the behavior
of the thinkmap
inside of flash.
here's an example done with java:
http://www.http://www.visualthesaurus.com
try typing in a word
and you'll se how it works.

and here's an example done with flash:
http://www.schnappstudio.com/example/
unfortunately it was writeen in flash 4 code
and is just about indecipherable.

has anyone seen anything
else like this online.
perhaps someone's seen
a sample fla floating around
i could work from.

at this point i'm so frustrated
with this flash 4 app that i'm ready
to give up on it and start over
even though the thing does
just what i'm looking for.

any help is appreciated.
even just a url that looks like this
would be really helpful
to start me in the right direction.

thanks,
jonathan

Somebody Please Explain To Me How To Do This Type Of Flash :D
If you go to http://www.the7threvolution.com/site/index.htm, you'll see a flash menu.

I really like the simplicity of that. Will someone explain me the whole.. way the thing works?

Like how the other buttons come from below. I would really like how to make that, and how to activate that by clicking the main buttons.

I hope somebody will help. Thanks.

VCR Type Controls In Flash - Please Help
Hi, I'm still a new user of Flash 8 Professional. I've created some FLA files that are short (15 seconds) and some are long (over 10 minutes).

I'd like to add some controls at the bottom of all my Flash files with standard controls like play, stop, pause and most important a seek bar so people know how long my flash file is.

I've tried searching the web for things like "flash vcr control" and "flash seek bar" and I'm not finding any helpful. I haven't use components before, but they look like they are for just controling video inside the flash file - not the entire flash file.

Please help!!! Thanks!

This Type Of Flash News?
Can anybody guide me to a tutorial that will help me make a news system that looks like these

www.gamespot.com
www.worldofwarcraft.com
http://demotemplates.joomlashack.com/lush/

You could just call it a flash gallery with a description, but can anybody tell me how to make these?

Thanks

Type Keyboard In Flash
i am making a type keyboard in flash and need some help.

when you click the keys (seperate mc's) they return the corrosponding letter in real (selectable) text. the problem is that, if you make an error in typing and want to select the text, delete it and correct it, the new text is added to the front of the text you created and not to the relative location of the blinking text cursor. i use an input text field so that the user can copy paste the text... here is the code i apply to the first keyframe, feel free to help me to optimize it as well:




a_btn.onRelease = function() {
_root.inputField.text +="a";
}

b_btn.onRelease = function() {
_root.inputField.text +="b";
}

c_btn.onRelease = function() {
_root.inputField.text +="c";
}

// ETC...


// and this delete feature doesn't work...
delete_btn.onRelease = function() {
_root.inputField.text -= " ";
}

FAQ Type Thing In Flash?
Hello all, i was curious as to how i would do this...or if it even at all possible...

You know how in HTML you can set anchor points in a document, where when you click a button it will go down to that anchor? such as a FAQ system where the user clicks a question and the list is automatically moved down to show the resulting answer, while still alowwing the user to scroll back to the top or down manually if need be. Now, i have NO idea how i could do this in flash...if it would even be at all possible...the workings would be like this:

|list of questions here|
text box with 1 long list of all answers. when a question is clicked on the box moves the display the appropriate answer, whilest still being to scroll around after being moved to the location...

consult a normal faq or something if you still dont get it...

any help would be greatly appreciated!

][

Can't Type Anything In The Flash Input Box
Hi guys! I hope anyone can help. I am working on a flash animation with input boxes... Now this swf will be embedded in a delphi program. The problem I'm getting is that whenever I test the flash within the delphi program I can't type anything in the input boxes. I think the issue lies with the program that the swf is embeded in but there might be some other way actionscript can control the input boxes....

the scenario is this. when I embed the swf in the delphi program it runs... I can actually select any input box and see the blinking cursor in it. but when I try to type in anything. it doesn't respond. Is there anything we can do to resolve this with actionscript? or is this a prob with the delphi program?

thanks in advance.

Type Conversion In Flash
i am loading data frm asp file
the data in this format

&Output=Deewaar (U/A) - Tickets Available for 12.45pm show at Imax Adlabs, 7-7-2004
Deewaar (U/A) - Tickets Not Available for 3.45pm show at Imax Adlabs, 7-7-2004
Deewaar (U/A) - Tickets Available for 6.45pm show at Imax Adlabs, 7-7-2004
Deewaar (U/A) - Tickets Not Available for 9.45pm show at Imax Adlabs, 7-7-2004
Dolphins - Tickets Not Available for 6.30pm show at Imax Adlabs, 7-7-2004
Harry Potter (U) - Show Over for 11.45am at Imax Adlabs, 7-7-2004


in flash it is loaded

scrollingText.text = Output \ but the
is not working
it is displayed as single text line
i require multiple line so it can scroll

when i check the type of the output

scrollingText.text = typeof(Output)

it return string

plz tell me what the problem might be

plz help me out

Flash Crash With Type
Whenever I try to use the type tool, then try to change the font in any way Flash CS3 crashes. Mac OS 10.4.10.
Any help greatly appreciated.

Movable Type In Flash?
Hey all. I only found one other post on this subject, and it didn't really answer my question sooo... here goes. The band I "work" for and I have been thinking about new content ideas and a new layout for their website, and I was planning on putting all the different sections up as different movable type blogs so that the guys could add silly things whenever they felt like it (such as "misguided thoughts from the lead singer"). So anyways, more and more I've been wanting to make them a flash website, just so it's that much cooler and eye catching, and I know there's gotta be a way to movable type's rss/xml feeds to dynamic text boxes... I just don't know how. So can anyone give me any pointers? Thanks in advance.

Problems W/ Flash Type
for some odd reason, when I turn on the "render text as HTML" option on my dynamic text field, a lot of the formatting I do is not recognized.

for example, when I add carriage returns in the dynamic text field, they are ignored.

can anyone tell me why this might be going on and how I can get around it?

thanks and your help is much appreciated.

Help: A Flash Type Marquee?
Hey guys,

I want to make a horizontal (one line) flash marquee.. so basically news headlines scanning from left to right then looping.. Preferably with the headlines being added into an XML file..

Can anyone help me out or let me know where I can get one?

Thanks so much!

Ben

Movable Type In Flash?
Hey all. I only found one other post on this subject, and it didn't really answer my question sooo... here goes. The band I "work" for and I have been thinking about new content ideas and a new layout for their website, and I was planning on putting all the different sections up as different movable type blogs so that the guys could add silly things whenever they felt like it (such as "misguided thoughts from the lead singer"). So anyways, more and more I've been wanting to make them a flash website, just so it's that much cooler and eye catching, and I know there's gotta be a way to movable type's rss/xml feeds to dynamic text boxes... I just don't know how. So can anyone give me any pointers? Thanks in advance.

Type Leading In Flash?
How do you change the type leading of pixel fonts within Flash? Or any type of font for that matter.

Can it be done?
(If not, Macromedia should be ashamed)

I Can't Type Any Cyrillic Characters In Flash 5
I can't type any cyrillic characters in flash 5. Each time I press a key I get some other characters which have nothing to do with cyrillic. I don't havesuch problems while using problems like photoshop, Paint shop pro, Word...
While typing in cyrillic in word, photoshop and so on using fonts like times new roman, arial etc. I don't eperience any difficulties
How do I overcome this problem(by the way I have the same problem with Dreamweaver)
thank you in advance! :}

Looking For Notepad Type Flash Application
Hi all
I asked this question long time a go but with no reply.
--------------------------
Maybe this I have a luck!
---------------------------
I am looking for flash application like kinda of NOTEPAD style...I searched FLashkit and here...well there are some but I am looking for one where you can mark the text and change color or type size ( fat,thin and kursive)...if any one seen a tutorials or sample fla...I would appericiate a lot...if you would share with me!
Thanks a lot
PilotX

Flash Gallery Type Site Help Please.....
Hi, I'm pretty new to flash mx, just getting into it but already have a project for fashion retailer where i need to thumbnails of the collection then when they are clicked on it brings up full size image. i'm going to do it all in flash mx and wondered if anyone had any tips or tutorials on doing this type of site as it must be quite a common thing
thanks everyone.

Flash + Adobe Type Manager
Has anyone out there managed to get Flash to use fonts from Adobe Type manager (PC)? It could be that I've converted Mac fonts to PC using TransType. But either way whenever I try and select one of these fonts it crashes Flash.

Any ideas? Or doesn't Flash like TransType converted fonts (other applications don't have any problems, Photoshop, Illustrator and so on)

Cheers!

Music Type Used For Flash Intros
What music type is best/smallest for using in an intro? Mp3?

also whats a good rate for keeping the file low but also quality ok...

160kbps
128
96
64

How Many Type Faces Can Flash Handle?
I have a client who wants to use loads of font faces maybe even up to 700 different ones.

I have never seen this many fonts in a Flash movie, but then again I have not heard anything about any limits to how many fonts a flash movie can have.

Does anybody have any experiences with huge amounts of fonts in flash movies??

thanks in advance

Did You Know That Flash MX Can Only Load JPGs Of A Certain Type?
For some reason I could only get Flash MX to load one of three JPGs I had. The reason was that the one JPG used "Baseline Standard" instead of "Progressive". When I switched the other two JPGs it loaded fine. Interesting problem. Just thought I would let others know of it, in case you encounter it yourself.

How To Create A Flag In Flash Type
someone know how to do it please tell me thank you

Adobe Type Manager/Flash MX
I recently upgraded to Flash MX from Flash 5 and the fonts that i use in my .fla's no longer auto-activate. Has anyone else run into this problem? If so, is there any fix? I am running Mac OS 9.22 and ATM 4.61. Needless to say its kind of a pain to remember which fonts I used in a specific file. Any help would be greatly appreciated.

I apologize in advance If this problem has been covered in the past...and if you could point me to that post that would be great also.

thanks-
P

Mac OS X, Flash MX And Type 1 Font Problems
I recently changed my operating system from Mac OS 9.2 to Mac OS 10.3 and now the type 1 fonts are all screwy in the flash files I created in the old system. Anyone else have this problem?

Is There A Type Of Blog That Works In Flash?
Is there a type of Blog that is Flash friendly? I'd kinda like to set up something that can be pulled in through a dynamic text field, but am open to other possibilities.
I'm trying to set up a blog because my client wants a "news" page that they can update often and easily. The first thing that came to mind was a blog. Does anyone know of a way to do this?

Shooting Type Game Flash MX
Im try ing to make it so that when i shoot this space **** it goes to a frame that makes it explode. Heres how I have it coded

-----------------------------------------------------------------------------
onClipEvent (enterFrame) {
_root.ship._x = _root._xmouse;
_root.ship._y = _root._ymouse;
}
onClipEvent (load) {
this._visible = 0;
if (_root.fbomb == 1) {
this._x = _root.ship._x;
this._y = _root.ship._y;
}
}
onClipEvent (enterFrame) {
if (this != _level0.bomb) {
if (_root.fbomb == 1) {
this._y -= 5;
this._visible = 1;
}
if (this._y<0) {
this.removeMovieClip();
}
}
if (this.hitTest(_parent.bad)) {
trace("EEXXXXXXPPLLODDDDDEEEE");
_parent.bad.gotoAndPlay(2);
}
}

-----------------------------------------------------------------------------

Every time it hits the stupid space ship it just restarts to the first frame of the layer instead of going to frame 2 and going from there?
plz help!!!

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