Flash Kit Community Forums - Actionscript 3.0 (incl. Flex/AIR)http://board.flashkit.com/board/
A forum dedicated to Adobe Creative Suite tools, ActionScript 3.0, Flash CS3/CS4, Flash Player related questions as well as Flex and Air, answers, tips and tricksenTue, 31 Mar 2015 20:39:42 GMTvBulletin60http://board.flashkit.com/board/images/misc/rss.pngFlash Kit Community Forums - Actionscript 3.0 (incl. Flex/AIR)http://board.flashkit.com/board/
Two font sizes in one dynamic text fieldhttp://board.flashkit.com/board/showthread.php?834101-Two-font-sizes-in-one-dynamic-text-field&goto=newpost
Thu, 26 Mar 2015 23:06:29 GMT=13) {
theHours=theHours-12;
}
//Adds '0' if there is only one digit.
if (String(theMinutes).length == 1) {
theMinutes="0"+theMinutes;
}
//Displays the time in the dynamic text field.
theTime.text =theHours+":"+theMinutes+" "+ampm;
}
I'm having trouble with varying the font sizes, though. Does anyone have any suggestions how to do this? I'm currently embedding the fonts with a dynamic text field called "theTime". I'd like to make the time Museo Sans 100, 280 pt and the AM/PM Museo Sans 100, 100 pt. I've tried using separate dynamic text fields, but that doesn't give me the flexibility that I need.
Thanks in advance!]]>Hello,

I'm trying to display the current time with am/pm, where the time is a large font and the am/pm is a smaller font. My as3 code for displaying the time with am/pm works and looks like this:

//This subtracts 12 from the hour when it greater than 13.
if (theHours>=13) {
theHours=theHours-12;
}
//Adds '0' if there is only one digit.
if (String(theMinutes).length == 1) {
theMinutes="0"+theMinutes;
}
//Displays the time in the dynamic text field.
theTime.text =theHours+":"+theMinutes+" "+ampm;
}

I'm having trouble with varying the font sizes, though. Does anyone have any suggestions how to do this? I'm currently embedding the fonts with a dynamic text field called "theTime". I'd like to make the time Museo Sans 100, 280 pt and the AM/PM Museo Sans 100, 100 pt. I've tried using separate dynamic text fields, but that doesn't give me the flexibility that I need.

Thanks in advance!
]]>Actionscript 3.0 (incl. Flex/AIR)arjaychttp://board.flashkit.com/board/showthread.php?834101-Two-font-sizes-in-one-dynamic-text-fieldAIR desktop app (Windows 7) - Big data set, XML or SQLlite?http://board.flashkit.com/board/showthread.php?834095-AIR-desktop-app-(Windows-7)-Big-data-set-XML-or-SQLlite&goto=newpost
Wed, 25 Mar 2015 14:54:04 GMTI am developing an AIR desktop application for a Windows 7 touch screen kiosk that needs to access and allow users to search a set of data, which could initially contain anywhere between 17,000 and 100,000 records. Each record could have perhaps 15 to 20 fields, and all the data will be stored locally on the computer, and updated with new data by memory stick, perhaps once per month. The kiosk will not be connected to the internet.
Can anyone offer any advice as to the viability / limitations of using XML, SQLLite, or some other means of data storage, to access this information from an AIR application?I am developing an AIR desktop application for a Windows 7 touch screen kiosk that needs to access and allow users to search a set of data, which could initially contain anywhere between 17,000 and 100,000 records. Each record could have perhaps 15 to 20 fields, and all the data will be stored locally on the computer, and updated with new data by memory stick, perhaps once per month. The kiosk will not be connected to the internet.

Can anyone offer any advice as to the viability / limitations of using XML, SQLLite, or some other means of data storage, to access this information from an AIR application?
]]>Actionscript 3.0 (incl. Flex/AIR)simonjkendrewhttp://board.flashkit.com/board/showthread.php?834095-AIR-desktop-app-(Windows-7)-Big-data-set-XML-or-SQLliteIf MovieClip existshttp://board.flashkit.com/board/showthread.php?834077-If-MovieClip-exists&goto=newpost
Tue, 24 Mar 2015 13:11:24 GMTQuite a simple question this one. I'm trying to prevent code being called on a DisplayObject if it doesn't exit.
This throws up an error

Code:

if (mc)
{
trace(mc);
}

Throws up the following error

Quote:

1120: Access of undefined property mc.

I've tried if(mc.stage), if (contains(mc)) and if (this.getChildByName("mc")) and none of them seem to work

]]>Actionscript 3.0 (incl. Flex/AIR)Degraiverhttp://board.flashkit.com/board/showthread.php?834039-Can-you-Rotate-a-Drawn-MovieClipRound number to nearest divisible numberhttp://board.flashkit.com/board/showthread.php?834027-Round-number-to-nearest-divisible-number&goto=newpost
Sun, 08 Mar 2015 22:06:05 GMTI have a draggable object that has a minimum (negative) and maximum (0) y position (-1200 to 0 for example).
When dragged between these y positions, I want to snap the object via a tween, to nearest y positon divisible by minus 300 for example. So when I release the dragged object, it will either be -300, -600 or -900.
I have tried a few functions I found online, but I am not getting this working.
The nearest I found is as follows:
Code:
---------
roundToNearest(roundTo:Number, value:Number):Number{
return Math.round(value/roundTo)*roundTo;
}
---------
I call it like:
Code:
---------
roundToNearest(ob.y, -300);
---------
The idea is to be able to drag the object as at present, but if I let go of the object at -400 y position, then it will snap to -300.
Anybody got any ideas?I have a draggable object that has a minimum (negative) and maximum (0) y position (-1200 to 0 for example).
When dragged between these y positions, I want to snap the object via a tween, to nearest y positon divisible by minus 300 for example. So when I release the dragged object, it will either be -300, -600 or -900.

I have tried a few functions I found online, but I am not getting this working.

The idea is to be able to drag the object as at present, but if I let go of the object at -400 y position, then it will snap to -300.

Anybody got any ideas?
]]>Actionscript 3.0 (incl. Flex/AIR)::bluemoth::http://board.flashkit.com/board/showthread.php?834027-Round-number-to-nearest-divisible-numberhow to convert Stopallsounds() to javascript for html canvashttp://board.flashkit.com/board/showthread.php?834021-how-to-convert-Stopallsounds()-to-javascript-for-html-canvas&goto=newpost
Fri, 06 Mar 2015 19:13:37 GMTI'm creating a flash html5 canvas project.
I have a movie clip that has audio on the timeline on frame 1 of that MC.
When i navigate to frame two of the root I want to stop the audio in the MC on frame 1.

You use to be able to use stopallsounds() to accomplish this.

is there a javascript alternative?
]]>Actionscript 3.0 (incl. Flex/AIR)Jdsflashhttp://board.flashkit.com/board/showthread.php?834021-how-to-convert-Stopallsounds()-to-javascript-for-html-canvasScreen recording of AIR app on Windows desktophttp://board.flashkit.com/board/showthread.php?834017-Screen-recording-of-AIR-app-on-Windows-desktop&goto=newpost
Fri, 06 Mar 2015 09:20:31 GMTI have developed an Adobe AIR application for windows desktop that runs at 60fps, full HD (classic display list, not Starling). I would like to record this app being used for promotional purposes, and have tried Camtasia and Action! Recorder (with software encoders), but neither of these achieve the required frame rate.
My PC configuration is:
i7-3930K @ 3.20GHz
32GB RAM
Windows 7 Pro 64-bit
2 x NVidia GT 440 graphics cards
500GB SSD
If I upgrade my Nvidia graphics card to one of the newer models, such as a Geforce GTX 970, I can make use of the NVENC technology that provides hardware video encoding of DirectX or the Windows desktop. Action! Recorder apparently supports the NVENC technology on the Nvidia cards, to provide improved video recording.
Does anyone have any experience of using NVENC to record Adobe AIR desktop applications that use classic display list, rather than Starling, and can I expect to record a decent frame rate?I have developed an Adobe AIR application for windows desktop that runs at 60fps, full HD (classic display list, not Starling). I would like to record this app being used for promotional purposes, and have tried Camtasia and Action! Recorder (with software encoders), but neither of these achieve the required frame rate.

If I upgrade my Nvidia graphics card to one of the newer models, such as a Geforce GTX 970, I can make use of the NVENC technology that provides hardware video encoding of DirectX or the Windows desktop. Action! Recorder apparently supports the NVENC technology on the Nvidia cards, to provide improved video recording.

i made a count down timer with a user input area.when you run the swf file it works well for seconds only but if you add minutes and/or hours to the input area, the counter doesnt stop when it gets to the inputed time,instead it continues with 61, 62......and so on. i have been trying to make it sync with the inputed time but it doesnt. i really don't know what i am doing wrongly thats why i have come here for help.
i named the input box: Time_txt, the dynamic countdown textbox is named: myText and a start button named Start_btn.