 |
 |
Index ‹ flash-actionscript
|
- Previous
- 2
- FileReference: event fires after delayHi,
We have the following case: server immediatelly returns error code to client
if request size more than allowed.
In this case 'onProgress' event continues to process uploading, but
'onComplete' or 'onHTTPError' event fires with delay in several seconds.
It seems that fileReference starts to process response from server only after
full file has been posted to server. As more file size - then longer delay
occurs.
Can somebody explain how we can immediatlly cancel uploading from server-side?
Environment: FF,IE, Safari. Flash 9.
Thanks in advance for any response.
- 2
- Button and MovieclipHi,
I would like to play and go to a specific frame on a movie clip when I click on a button
Please Help!!!!
Thanks
- 4
- Plugin classes?I am working on a project that has a wide variety of specialized classes that I
want to add and instantiate in a sort of plug in fashion.
My planned class hierarchy for these consists of a single parent class called
Actor, and many subclasses such as BadActor, MethodActor, Waiter, and
ChildActor.
I have two questions:
1. How best would I add these classes to my project? (as. files, XML, other?)
2. How would I discern the list of plugin classes available at runtime without
hard coding anything? (No massive precoded switch statements.) So I could for
example populate a list box with all of the available plugin classes and allow
the user to select and create(instantiate) one of the plugin classes.
See my pseudo code for example of what I am thinking of:
var a:Actor;
var f:SomeFactoryClass = new SomeFactoryClass();
a = f.spawn( ?SpecificClassName? ); //Spawn creates an instance of the
requested Actor type based on the string identifier passed to it.
if (a != undefined) //make sure we actually got an instance of Actor.
{
//Do something with the Actor.
}
- 4
- Outputing xml from flashHi there,
I want to output info from my flash application and store it in a database.
At present I am able to retrieve info from my database via php and xml and use
it in Flash.
Should I use the same path in reverse or is there an easier way?
Thanks,
Marty
- 4
- Geting the color that's on a point on the stageI have multiple objects on the stage that are all different colors and
opacities, these objects are also moving around, so the colors are changing
as objects pass through each other. I want to be able to find out what
color is currently at a point on the stage.
I've tried trace(_level0.getPixel(200, 200).toString(16)); and all it
returns is "undefinded".
Does anyone know how or if this can be done?
Thanks!
- 4
- 4
- Efficient use of onEnterFrameHello everyone,
Reading senocular's reply to a post in
http://www.actionscript.org/forums/archive/index.php3/t-68288.html, among
others, has got me wondering about how best to efficiently use onEnterFrame,
onMouseMove etc. in external class definitions. As I understand it, if you
define an onEnterFrame as follows:
function onEnterFrame() {
// procedure
}
then if at some future point you need to remove this functionality you're
stuffed. Routinely I use
function __onEnterFrame() {
// procedure
}
function someotherprocedure() {
onEnterFrame = __onEnterFrame;
}
and then later remove it as needed with onEnterFrame = null; However, I'm
still not removing the onEnterFrame, merely setting it to null. According to
what I've read you need to set the onEnterFrame of instances in order to be
able to delete them, but working with instances is no good if you're trying to
objectify the code. Does that make sense?
My question is simply is there any way that I can, *exclusively* from within
an external class file, delete an onEnterFrame previously set? I wish to
maximise efficiency, but I don't want to lose the OOPy quality of only working
from within a class file.
Sorry if I'm missing a trick. Browsing for a solution to this brings up so
many non-external script solutions but doesn't quite answer the nub of my
question, unless I'm being a twit.
- 5
- createEmptyMovieClip in _levelHi all
With the actionscript being on _level0, should the following work:
_level100.createEmptyMovieClip("my_mcl",1000);
For an unknown reason it is not working for me :(
Help!
Dave
- 5
- Opening a browse window from flashHi,
I have a problem like this. Please help me out.
I have a empty movieclip and a button in flash. When i click the button the
open browse window shld open and when i select any image of my choice i want to
display that image in that movieclip.
If at all i require to use the javascript with this. Please provide me that.
If Any links available please send it.
Eagerly waiting for the reply
Thanks and regards,
Madhava ram upadrasta
- 6
- passing a variable through a javascript callProblem::
I have created a site where I have integrated an administrative back through
the flash interface. The site is all flash.
In the admin area I created a form that allows admin staff to upload info to a
database. This includes image names, like bob.jpg... The image names go into
the database and are used to call jpg files for dynamic loading into the front
end. To allow the possibliity of posting the images onto the server, I am using
a getURL call.
getURL("javascript:openWin('my_ftp.php?sz=3');");
now notice to the addition of the sz=3 variable. I am trying to use a single
php page to upload a variety of different types of files to different
directories on the server based on the passing of a variable. I figued this
should work but it does not. The javascript that performs the new window
function looks like:
function openWin(myFile) {
window.open(myFile,"name","width=400,height=200'");
}
It finds the page, opens the page, however when I test for the variable, it
does not exist. Can anybody offer a solution?
gs
- 7
- load a symbol w/ actionscriptI want a symbol/movie clip to load on screen when another movie clip is loaded. how can i do this with actionscript
thanks
- 9
- Sharing FLV MoviesHello,
I have a flv player and I would like to include the option to share the movie
you just watched. I am very stupid with flash so any help is vary appreciated.
If someone can help me great but if you just point me to where I can find some
more info about this is ok also. Thanks
- 12
- Adding methods and propertiesHow would one go about adding a method or property to a native class in AS 2.0?
For example:
MovieClip.prototype.box = function(w,h,c) {
with(this) {
beginFill(c, 100);
lineTo(w,0);
lineTo(w,h);
lineTo(0,h);
endFill();
}
}
this.createEmptyMovieClip("boxxy", 2);
boxxy.box(200, 25,0x0);
- 12
- hitTestI have one circle that you can control with your arrowkeys and one wall, both
are movieclips...
I want the circle to bounce back from the wall when the cirlce touches the
wall.
(the circle shouldnt get threw the wall)
If somebody can the actionscripts and where to set them... the frame or one of
the movieclips??
PLEASE help me! :)
- 14
- Radio button stops move at end of playI have two radio buttons that are controlling my flv movies. The first one is
"cont" which is for continuous play, e.g. once the current movie is finished it
starts the next one in the order list.
What I want to add a radio button that, when selected, will only allow the
end-user to view one movie at a time. If they want to view the next, or any
movie for that matter, they must select the movie from the drop-down list.
Here's the actionscript that I have currently. Thanks in advance for any help.
I'm new to this.
____________________________________
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function() {
var nodes = this.firstChild.childNodes;
for(i=0;i<nodes.length;i++) {
list.addItem(nodes[i].attributes.desc,nodes[i].attributes.flv);
}
vid.play(list.getItemAt(0).data);
list.selectedIndex = 0;
}
xml.load("playlist.xml");
var lList:Object = new Object();
lList.change = function() {
vid.play(list.getItemAt(list.selectedIndex) .data);
count = list.selectedIndex;
}
list.addEventListener("change",lList);
var vidList:Object = new Object();
var count:Number = 0;
vidList.complete = function() {
if(cont.selected) {
if(count == list.length-1) {
count = 0;
}
else {
count++;
}
}
vid.play(list.getItemAt(count).data);
list.selectedIndex = count;
}
vid.addEventListener("complete",vidList);
|
| Author |
Message |
gigisfarleaza

|
Posted: 2007-4-15 4:20:48 |
Top |
flash-actionscript, bitmap resize problem
I am creating a bitmap from stage, attach it to a movieclip, but when i resize
the movieclip the bitmap is not smoothed, I've put the smooth variable to
true in draw command from bitmap and in the attachBitmap command. What am i
doing wrong ?
I hope you understand my problem ?
please help
Thank you
|
| |
|
| |
 |
gigisfarleaza

|
Posted: 2007-4-16 14:30:00 |
Top |
flash-actionscript >> bitmap resize problem
Nobody knows ?
|
| |
|
| |
 |
| |
 |
Index ‹ flash-actionscript |
- Next
- 1
- Drawing a dynamic line graphI want to have a line graph where the user inputs variables in a text box and
then the graph is generated by the click of a button. Does anyone know how to
do this or know where I could find a tutorial on this?
- 2
- Pong Game 2... powerrshots and dodgy logicOriginally posted by: Anth2003
I'm putting together this little pong game and what I want to do is this:
Players can hold down the space bar to build up a bit of extra power. While
the space bar is down "extra_power" is incrementally increased and when the
ball hits bat1 "extra_power" is added to "ballXspeed" and its value is passed
to "spent_power" then "extra_power" is reset to 0. It also sets a variable
called "powershot" to 1 thus showing whether a power shot has been played.
That bit is fine but after a power shot has been played I want to reduce the
speed again when the ball hits bat2....
The way I figure it is " if the ball hits bat2 and powershot = 1 then do A
else if the ball hits bat2 and powershot = 0 then do B " which I wrote as:
if(ball.hittest(bat2)) && (powershot = 1){
ball._x -= 5;
ballYspeed *= 1;
ballXspeed -= spent_power;
ballXspeed *= -1;
spent_power = 0;
powershot= 0;
test = 1;
}
elseif (ball.hittest(bat2)) && (powershot = 0){
ball._x -= 5;
ballYspeed *= 1;
ballXspeed *= -1;
test =2;
}
I know its wrong because it doesn't work but as a complete newbie I don't
really know the syntax for if / elseif statements or how to use logical
operators properly...
Any suggestions or rewritten code would be very much appreciated.
Couldn't you write if ball hits bat2 and powershot = 1 then ballXspeed -=
extra_power
i'm only a beginner myself but i hope this helps
- 3
- Movie Clip movement using action script...i didn't understand that mess u put there but here's what is gotta be there:
// don't use onClipEvent() it sucks. Use MovieClip.onEnterFrame
guard.onEnterFrame=function() {
_y+=2; // make your moves
if ( ! still_Want_It_Move) delete onEnterFrame;
}
- 4
- variable = name of instance i just clickedOn main stage I have 4 buttons each with different instance name (but1, but2,
but3, but4).
On main timeline I want to create a variable whose value is equal to the
instance name of the button I've just clicked. How do I do this?
Thanks,
Jamie
- 5
- Function getURL Not Calling Right in MovieI'm trying to get multiple buttons to work inside of a movie clip. I've created
the functions on the main timeline. It's only wokring the first time through on
the first button though.
Here's a link to the site; http://www.aspenspasstl.com ;the problem banner is
on the lower left.
Here's a link to the fla file.
http://www.apepinc.com/aspenspas/home_spa_info.fla
Code that shouldn't be giving me a problem:
mc_spas.canyon_button.onRelease = function() {
getURL("http://www.aspenspasstl.com/canyon.htm", "_self");
};
mc_spas.extreme_button.onRelease = function() {
getURL("http://www.aspenspasstl.com/extreme.htm", "_self");
};
mc_spas.monarch_button.onRelease = function() {
getURL("http://www.aspenspasstl.com/monarch.htm", "_self");
};
mc_spas.sopris_button.onRelease = function() {
getURL("http://www.aspenspasstl.com/sopris.htm", "_self");
};
Hope someone can help,
David:embarrassment;
- 6
- loadvars help neededwhat is wrong in this script (can't see the text)?
**Warning** Symbol=Symbol 551, layer=Layer 5,
frame=2:Line 10: Case-insensitive identifier 'loadVars'
will obscure built-in object 'LoadVars'.
test = new loadVars();
Total ActionScript Errors: 1 Reported Errors: 1
_global.content = Array();
_global.content.txt_companyname =
"COMPANYNAME.COM";
_global.content.txt_copyright = "COPYRIGHT (C) 2005
COMPANYNAME.COM. ALL RIGHTS RESERVED";
_global.content.txt_link1 = "ABOUT US";
_global.content.txt_link1_desc = "ABOUT OUR
COMPANY";
_global.content.txt_link2 = "SERVICES";
_global.content.txt_link2_desc = "OUR SERVICES";
_global.content.txt_link3 = "PARTNERS";
_global.content.txt_link3_desc = "OUR BUSINESS
PARTNERS";
_global.content.txt_link4 = "SUPPORT";
_global.content.txt_link4_desc = "CLIENT SUPPORT
SERVICES";
_global.content.txt_link5 = "CONTACT US";
_global.content.txt_link5_desc = "CONTACT INFO &
FEEDBACK";
_global.content.txt_page1_ttl = "About our company";
_global.content.txt_page1_sttl = "<b>hello</b>";
new LoadVars();_global.content.
txt_page1_Content = "Welcome need help i cant see this
text in browser there is an error orci et dui. Nulla
facilisi. nunc.<br><br>Nulla eleifend, tortor at eleifend
varius, augue justo dignissim Pellentesque
sodales.<br><br>Aliquam ut purus eget nunc dictum
Pellentesque sodales.";
_global.content.txt_page2_ttl = "Our Services";
_global.content.txt_page2_sttl = "<b>Rutrum et
molestie</b>";
_global.content.txt_page2_content = "Fusce odio. Etiam
congue nisl ac pede cursus laoreet. Morbi elementum
feugiat enim. Quisque vitae velit. Nunc a tortor.
<br><br><b>Vivamus mi vestibulum</b><br>Ultrices
diam et turpis. Sed ut nunc. Praesent vitae nunc. and
so on can u help me?:confused;
- 7
- Please help with Stop and Play button Issue.A movie clip has been created with 2 keyframes, for stop and play.
For Stop the script is below
stop();
_root.playing = false;
_root.clip.stop();
For the Stop symbol the script is below
on ( press )
{
play();
}
For Play the script is below :
_root.playing = true;
_root.clip.play();
stop();
For the Play symbol the script is below:
on ( press )
{
play();
}
Question - I've placed this button on the stage to control all the movie clips
with the instance name of "clip", but it doesn't seem to be stopping all but
one of the movies which happens to be on the same frame column. Is there a
better way to stop and play the root movie without the script above? If there
is, please reply with answers.... It will be greatly appreciated.
Thanks.
- 8
- close button for loaded movieanyone can help me.I load external movie into main movie but I want this
external swf has its own close button to close itself . example I load mail
form into main movie and to press the botton in this mail form in order to
close itself or unload from this main screen.
- 9
- Arrays in Custom ClassesThe class below is in a document called (Node.as)
class Node {
private var _z = new Array();
public function Node(z) {
this._z[0] = z;
}
function getz(index) {
return this._z[index];
}
}
This is the actionscript of the main document
import Node;
//create line placeholders
var node0:Node = new Node(234);
trace(node0.getz(0));
var node1:Node = new Node(345);
trace(node0.getz(0));
var node2:Node = new Node(786);
trace(node0.getz(0));
Why does the trace yield completely different numbers?????
- 10
- How can I upload two files and send some variables to the same script ?I'm building a web form using Flash that should have two FileReference objects.
The form has five text fields, is there anyway to upload two files and send the
text fields to a PHP script? I've done this successfully for one file. I used
FileReference.upload and I appended the text variables to the URL. Please help.
- 11
- Trouble with Preloaders and formsI am working on a site for my friend. http://www.capturevideo.net/v5. We are
importing .flv files into many flash files on this site. I am having trouble
optimizing the site and putting in preloaders and getting the form to work.
Would anyone be interested in helping me fully optimize the site and help
install preloaders on all these videos. If someone knows how to make a bar
that shows how much of the video has been loaded and at the same time has a
draggable button on that bar playing progess of the video, that would be
awesome!!! We only have about $100 in our budget, but if you could help us on
this site, I think it will be a nice site to add to your development portfolio.
Please IM me at: email***@***.com (MSN-IM) or email***@***.com (AIM)
if you are interested in helping me out.
Thanks in advance to all of you for your input.
- 12
- Using XML to decide on formattingThe flash app I have made reads an xml file (rss feed) and displays the content
etc. What I wanted to do however, is be able to put formatting the xml file to
determine how the flash file would look, eg change the background
colour...change the header text. How would i go about performing this?
Currently I am using the xml connector to get the schema and do the bindings.
- 13
- Combobox for site navigation?I have a combobox with university proffessor's names. What I want to achieve is
that when user chooses a name from the list, movie goes to a certain marker.
How to acheive this?
I'm using Flash MX 2004
Sven
- 14
- open file from projector?I am trying to open an excel file in microsoft excel from a flash projector. I
am not sure what the code would be. I thought I should use the fscommand. Does
anyone have any suggestions? The file I am trying to open is called chart.xls.
on (release) {
(can someone please finish)
I appreciate any help, thanks, david
- 15
- Re:scrollpane border solutionhi
Yeah you're right, it does work... don't know what I done wrong the first time...
But still, how can you make it work global?
With:
_global.style.setStyle("borderStyle", "none");
_global.styles.ScrollPane.setStyle("borderStyle", "none");
|
|
|